Re: [Firebird-devel] Recovery from fb_shutdown possible?

2019-04-19 Thread Dimitry Sibiryakov
19.04.2019 10:36, Mark Rotteveel wrote: I'll need to investigate how I can unload and reload the library. You can prevent fb_shutdown() from shutting client library down using fb_shutdown_callback(). -- WBR, SD. Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] Max lock slots for Classic Server v2.5 x64?

2019-03-19 Thread Dimitry Sibiryakov
19.03.2019 17:03, Leyne, Sean wrote: Was wondering if increasing the number of slots would reduce the wait %. No. It will only reduce "Hash lengths (min/avg/max)" which are already fine in your case. -- WBR, SD. Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] Timezone id in big endian clients?

2019-03-07 Thread Dimitry Sibiryakov
07.03.2019 16:56, Adriano dos Santos Fernandes wrote: For *_TZ types, alignment is not a problem, the size is. Or at least it may look weird - UTC+TZ together occupy 10 bytes but sqllen returns 12 bytes.   And code will get crashed on memcpy(some_buffer, sqldata, sqllen). Why it will crash?

Re: [Firebird-devel] Timezone id in big endian clients?

2019-03-07 Thread Dimitry Sibiryakov
07.03.2019 16:25, Adriano dos Santos Fernandes wrote: sizeof(ISC_TIMESTAMP_TZ) == 12 i.e. the whole structure is padded (with two bytes) at the end I'm not sure whether it's "as desired" though. IIRC, alignment/padding is implementation-defined in C++, we're playing on the tricky field. But

Re: [Firebird-devel] Firebird 4: Could not find acceptable ICU library

2019-03-04 Thread Dimitry Sibiryakov
04.03.2019 14:57, Alex Peshkoff via Firebird-devel wrote: May be taht makes sense - in a case when we start to work with TZ-related data we should already have connection with any engine. In this case IAttachment must be a parameter for util functions to know which server to ask for

Re: [Firebird-devel] isc_database_info and current database user

2019-03-01 Thread Dimitry Sibiryakov
01.03.2019 11:32, Alex Peshkoff via Firebird-devel wrote: But if one writes some funny plugin which generates random names in authentication block - definitely yes :) They don't need to be random. I can imagine cases when they are a) tied to a current node in a cluster because Firebird

Re: [Firebird-devel] isc_database_info and current database user

2019-03-01 Thread Dimitry Sibiryakov
01.03.2019 8:59, Alex Peshkoff via Firebird-devel wrote: Mapped user name has nothing to do with connection pool. Are you sure that there will be never a case when single client-side user name is mapped to different server-side users depending on some conditions unknown to client? --

Re: [Firebird-devel] isc_database_info and current database user

2019-02-28 Thread Dimitry Sibiryakov
28.02.2019 20:42, Adriano dos Santos Fernandes wrote: Then the question: for what the client would need to known the mapped user name? The simplest example: connection pool must grouped by user name because currently there is no way to change current user of already established connection.

Re: [Firebird-devel] Start transaction from base transaction

2019-02-24 Thread Dimitry Sibiryakov
24.02.2019 3:23, Adriano dos Santos Fernandes wrote: maybe:         SET TRANSACTION SNAPSHOT [USING SNAPSHOT ] or         SET TRANSACTION SNAPSHOT [USING SNAPSHOT NUMBER ] What I dislike here is double SNAPSHOT words. You can make it optional. -- WBR, SD.

Re: [Firebird-devel] [FB-Tracker] Created: (CORE-6011) Enabling legacy authentication in Windows installer leads to less secur config than possible

2019-02-23 Thread Dimitry Sibiryakov
23.02.2019 17:51, Paul Reeves wrote: It is linked to the fact that rpm installs don't allow interaction at install time, so the security database is not initialised. IIRC, rpm install 2.5 used to initialize security database using random password for sysdba. Was it changed in 3.0? --

Re: [Firebird-devel] Replication: declarative control

2019-02-21 Thread Dimitry Sibiryakov
21.02.2019 10:46, Pavel Cisar wrote: It's tempting, but I see potential for problems. If we would allow multiple sets & filters at master node, there is no need to have them at replica. And if replica would have different definitions than master, then it's not possible to replace master with

Re: [Firebird-devel] Replication: declarative control

2019-02-21 Thread Dimitry Sibiryakov
21.02.2019 9:14, Dmitry Yemanov wrote: Second, IMHO declaring tables as "publishable" via CREATE|ALTER TABLE is too restrictive. I'd rather manage the replication set using some global commands, be it ALTER DATABASE or something different, allowing to include/exclude all tables at once, or

Re: [Firebird-devel] RDB$GET_TRANSACTION_CN works different in Super and Classic

2019-02-18 Thread Dimitry Sibiryakov
18.02.2019 13:01, Alex Peshkoff via Firebird-devel wrote: Just notice - if you do not use this function you will never have performance issue with it. It depends on the place where Vlad will put the TIP refresh to. -- WBR, SD. Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] RDB$GET_TRANSACTION_CN works different in Super and Classic

2019-02-18 Thread Dimitry Sibiryakov
18.02.2019 12:55, Alex Peshkoff via Firebird-devel wrote: On the other hand this should better be fixed afterwards - design where SS/CS provide different results is IMHO not good. Something like awful borland's SPB items that provide useful results only in SS. Well Borland can be excused here

Re: [Firebird-devel] RDB$GET_TRANSACTION_CN works different in Super and Classic

2019-02-18 Thread Dimitry Sibiryakov
18.02.2019 12:47, Adriano dos Santos Fernandes wrote: If the change is going to appear only in Beta 2, then ok and I file a ticket. Otherwise a ticket would not be necessary as the feature didn't appeared in any alpha/beta release yet. This change AFAIU will make Firebird even slower than it

[Firebird-devel] The best strategy for altering of several table attributes

2019-02-16 Thread Dimitry Sibiryakov
Hello, All. I'm working on controlling of replication using SQL and get stuck on "alter table" statement. It may include zero or more clauses that require modification of RDB$RELATIONS table. For example: "alter table t drop sql security, disable replication". What is the best way to

Re: [Firebird-devel] Setting time zone bind through DPB?

2019-02-16 Thread Dimitry Sibiryakov
16.02.2019 15:57, Mark Rotteveel wrote: I was wondering if it was considered to also set these options through the DPB. Especially for time zone support, I'm currently considering not supporting this for Java 7 in Jaybird, and it would save some headaches if it were possible to control this

[Firebird-devel] Replication of system tables

2019-02-15 Thread Dimitry Sibiryakov
Hello, Dmitry. I see that now system tables are replicated unconditionally: > if (!relation->isSystem() && matcher && !matcher->matchTable(relation->rel_name)) >return; How does it cooperate with separate replication of DDL queries? -- WBR, SD. Firebird-Devel mailing list, web

Re: [Firebird-devel] Building Firebird 4 on Windows

2019-02-15 Thread Dimitry Sibiryakov
15.02.2019 9:17, Paul Reeves wrote: First you need to click on the 'Desktop Development with C++' You are talking about installing of Visual Studio. My question was different: is Build Tools (https://blogs.msdn.microsoft.com/vcblog/2016/11/16/introducing-the-visual-studio-build-tools/)

[Firebird-devel] Building Firebird 4 on Windows

2019-02-14 Thread Dimitry Sibiryakov
Is "Build Tools" enough for that or whole Visual Studio 2017 must be installed? -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

[Firebird-devel] Error on bad non-required plugins

2019-02-11 Thread Dimitry Sibiryakov
Hello, All. Currently if plugin module has been found but is bad an error is thrown even if this plugin is not required. Is it a desired behavior? -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: [Firebird-devel] ICU in HEAD

2019-02-08 Thread Dimitry Sibiryakov
08.02.2019 12:29, Alex Peshkoff via Firebird-devel wrote: - adapt search knowing existing versions numbers (see http://site.icu-project.org/download) Yes, this should be efficient. I would limit tried versions to only those which are known to work with Firebird. For example, cut off

Re: [Firebird-devel] What type of UUID we use in Firebird ? i guess Version 1

2019-02-08 Thread Dimitry Sibiryakov
08.02.2019 16:44, marius adrian popa wrote: What type of UUID we use in Firebird ? I guess Version 1 Look at text presentation. UUID version is fourth digit in second group IIRC. -- WBR, SD. Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] Changing generator's initial value without restarting

2019-02-08 Thread Dimitry Sibiryakov
08.02.2019 14:01, Jiří Činčura wrote: ALTER SEQUENCE? But please explain what do you mean under 'restart'. Without changing the current value. Try CREATE OR ALTER SEQUENCE. I cannot remember if I ported this improvement from Avalerion to main tree. -- WBR, SD. Firebird-Devel mailing

Re: [Firebird-devel] ICU in HEAD

2019-02-08 Thread Dimitry Sibiryakov
08.02.2019 12:21, Alex Peshkoff via Firebird-devel wrote:   The error you are getting is different, so I would guess that search loop is aborted faster in this case. Is it good idea to provide full error message? (like I did - not to make other guess) Not in this case, but here it is:

Re: [Firebird-devel] ICU in HEAD

2019-02-08 Thread Dimitry Sibiryakov
08.02.2019 10:15, Vlad Khorsun wrote:   Also, we could limit number of ICU versions to check: - exclude really old versions (at least with old X.Y versioning scheme, i.e. 4.8 and older) - adapt search knowing existing versions numbers (see http://site.icu-project.org/download) - guess number

Re: [Firebird-devel] ICU in HEAD

2019-02-08 Thread Dimitry Sibiryakov
08.02.2019 8:31, Alex Peshkoff via Firebird-devel wrote: I can't reproduce performance problem: # time (echo 'exit;' | ./isql employee) Statement failed, SQLSTATE = XX000 Could not find acceptable ICU library -Missing entrypoint u_setDataDirectory in ICU library The error you are getting is

[Firebird-devel] ICU in HEAD

2019-02-07 Thread Dimitry Sibiryakov
Hello, All. I somehow understand why build of current HEAD is failing with message "Could not find acceptable ICU library", but I wonder why it takes so much time to get this error? More than 15 second between running of isql and this failure on my notebook. -- WBR, SD.

Re: [Firebird-devel] Replication control

2019-02-02 Thread Dimitry Sibiryakov
BTW, TPB item is better because DPB item would require to know server version before connect while TPB can be decided after the connect is established and server version has been derived from ODS or other info item. -- WBR, SD. Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] Replication control

2019-02-02 Thread Dimitry Sibiryakov
02.02.2019 12:08, Dmitry Yemanov wrote: What usage cases do you have in mind? Multimaster. There must be some way to prevent data bouncing when CDC captures changes made by apply module. -- WBR, SD. Firebird-Devel mailing list, web interface at

[Firebird-devel] Replication control

2019-02-02 Thread Dimitry Sibiryakov
Hello, Dmitry. Currently replication can be disabled only at database level. Are you going to provide a way to disable it for single connection or transaction? Trick with isc_dpb_config won't work for superserver AFAIU. -- WBR, SD. Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] fb_shutdown in embedded mode

2019-01-24 Thread Dimitry Sibiryakov
24.01.2019 15:14, Adriano dos Santos Fernandes wrote: But if we have some libraries in the application loading Firebird, and the application writer does not have total control of that, two libraries may load Firebird and when one of them calls the shutdown function, the other will not work

Re: [Firebird-devel] FB4 linux package

2019-01-12 Thread Dimitry Sibiryakov
12.01.2019 17:11, Alex Peshkoff via Firebird-devel wrote: appears -fabi-version switch is not enough. Did you full clean rebuild with it? -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: [Firebird-devel] FB4 linux package

2019-01-10 Thread Dimitry Sibiryakov
10.01.2019 15:35, Alex Peshkoff via Firebird-devel wrote: If we want to support Centos 7 (latest stable Centos release) we will have to use dinosaur gcc4 i.e. same version we use to build FB3. You can also try to use -fabi-version=8 for build. Side-note: "if" is a right word. Personally I

Re: [Firebird-devel] FB4 linux package

2019-01-10 Thread Dimitry Sibiryakov
10.01.2019 15:35, Alex Peshkoff via Firebird-devel wrote: That's the worst thing that could happen when testing. If we want to support Centos 7 (latest stable Centos release) we will have to use dinosaur gcc4 i.e. same version we use to build FB3. How about using --static-libstdc++? --

Re: [Firebird-devel] Difference in performance between current_timestamp and localtimestamp

2018-12-29 Thread Dimitry Sibiryakov
29.12.2018 11:10, Adriano dos Santos Fernandes wrote: The cached in request value is now the timestamp with tz, then localtimestamp requires a conversion. If request requested timestamp without tz, why it caches it with tz? That conversion requires to open ICU calendar to get the effective

Re: [Firebird-devel] ODS hdr_creation_date

2018-11-26 Thread Dimitry Sibiryakov
26.11.2018 16:18, Leyne, Sean wrote: What about external tools which might use this field for their own purposes??? These tools will be broken by proposed changes as isc_database_info() will start returning different data type or different value. Summarizing whole discussion, there are

Re: [Firebird-devel] ODS hdr_creation_date

2018-11-26 Thread Dimitry Sibiryakov
26.11.2018 11:54, Dimitry Sibiryakov wrote: no functionality is depended on it with such precision that would require taking time zone into account. Besides, storage change is not enough, INF items must be changed accordingly and it would be a really break of backward compatibility

Re: [Firebird-devel] Replication insides

2018-11-24 Thread Dimitry Sibiryakov
24.11.2018 11:42, Dmitry Yemanov wrote: Good plugin should never clash with user-defined metadata. Any hardcoded name for user-defined metadata objects is a subject of potential conflict. Using RDB$ prefix for non-system objects is a hack I'd rather avoid. What other options do you see?

Re: [Firebird-devel] Replication insides (was:ODS hdr_creation_date)

2018-11-24 Thread Dimitry Sibiryakov
24.11.2018 6:43, Dmitry Yemanov wrote: It could be, but new system generator is also an ODS change. IIRC, we don't have a safety gap between system and user generator IDs. It doesn't need to be a system generator. Plugin is free to create a user one (as well as any other database object) if

Re: [Firebird-devel] ODS hdr_creation_date

2018-11-23 Thread Dimitry Sibiryakov
23.11.2018 21:36, Vlad Khorsun wrote:    ...recently invented SCN   Recently ? What do you speak about ? "When any transaction is committed, database Commit Number is incremented and its value is associated with this transaction". IIRC, the journal counter does exactly the same. --

Re: [Firebird-devel] ODS hdr_creation_date

2018-11-23 Thread Dimitry Sibiryakov
23.11.2018 20:43, Dmitry Yemanov wrote: can store sequence number elsewhere (and it did until recently), but it's more error-prone to store it inside the database itself. Header page is an obvious choice. RDB$DATABASE is another option, but it's also an ODS change. Isn't a sequence even

Re: [Firebird-devel] ODS hdr_creation_date

2018-11-23 Thread Dimitry Sibiryakov
23.11.2018 20:09, Dmitry Yemanov wrote: (1) Database GUID and (2) journal sequence. Both are not absolutely required but useful. AFAIU, journal sequence is completely plugin-related thing. I understand why your plugin wants to keep it in database, but why in header? Is replication going

Re: [Firebird-devel] ODS hdr_creation_date

2018-11-23 Thread Dimitry Sibiryakov
23.11.2018 18:07, Alex Peshkoff via Firebird-devel wrote: But if others do think that accessing such databases is possible may be we should better set current minor to 1 and also set ODS_RELEASED =  1 ? This should help efficiently avoid opening alpha-created databases by stable release.

Re: [Firebird-devel] ODS hdr_creation_date

2018-11-23 Thread Dimitry Sibiryakov
23.11.2018 16:32, Alex Peshkoff via Firebird-devel wrote:   Older gstat and third-party tools won't be able to handle it correctly. What gstat version do you talk about? Particularly Avalerion one. It does not support full functionality for unknown ODS, but at least it try to dump fixed

Re: [Firebird-devel] ODS hdr_creation_date

2018-11-23 Thread Dimitry Sibiryakov
23.11.2018 15:53, Adriano dos Santos Fernandes wrote: Does anyone see any problem in extending (in time zones branch) hdr_creation_date to include the time zone? Older gstat and third-party tools won't be able to handle it correctly. Do we need timezone there at all? If yes, it is better

Re: [Firebird-devel] SIGINT/SIGTERM handling on POSIX

2018-11-07 Thread Dimitry Sibiryakov
06.11.2018 15:46, Alex Peshkoff via Firebird-devel wrote: As long as we have safe write order to database file it should not be corrupted due to unexpected interrupt. Even FW is not needed for it - nothing prevents OS to flush cache to the disk after application was interrupted. Actually,

Re: [Firebird-devel] SIGINT/SIGTERM handling on POSIX

2018-11-06 Thread Dimitry Sibiryakov
06.11.2018 15:46, Alex Peshkoff via Firebird-devel wrote: The user has a chance to avoid engine shutdown on signal caught using fb_shutdown_callback() but that will be his choice. There is a problem with older applications that know nothing about fb_shutdown_calback() but still handle

Re: [Firebird-devel] SIGINT/SIGTERM handling on POSIX

2018-11-06 Thread Dimitry Sibiryakov
06.11.2018 13:15, Alex Peshkoff via Firebird-devel wrote: It can. But if one does     kill `pidof firebird` or presses ctrl-C when working with embedded library atexit is not called. I see. But how about not calling fb_shutdown if old signal handler is not SIG_DFL? BTW, I cannot find in

Re: [Firebird-devel] SIGINT/SIGTERM handling on POSIX

2018-11-06 Thread Dimitry Sibiryakov
06.11.2018 7:34, Alex Peshkoff via Firebird-devel wrote: An idea was to have same behavior for remote and embedded connections, please read doc/README.fb_shutdown, pay attention at fb_shut_confirmation and a sample in the end. All this workaround for workarounds just because engine cannot be

[Firebird-devel] [FB-Tracker] Created: (CORE-5959) Firebird returns wrong time after changes of time zone

2018-11-05 Thread Dimitry Sibiryakov (JIRA)
: Engine Affects Versions: 3.0.4, 4.0 Alpha 1 Environment: Windows Reporter: Dimitry Sibiryakov If you open date/time control panel and change time zone, Firebird will return wrong time until restart. It is caused by MSVC runtime caching current time zone offset in global

[Firebird-devel] SIGINT/SIGTERM handling on POSIX

2018-11-03 Thread Dimitry Sibiryakov
Hello, All. Consider a program which handle SIGINT by asking user if it really need to be interrupted. On answer "No" it can continue work. But currently it cannot because background thread already called fb_shutdown() and destroyed everything. Is it a right behavior for client library?

Re: [Firebird-devel] Internal Firebird consistency after 10 minutes of OLTP test

2018-10-27 Thread Dimitry Sibiryakov
27.10.2018 14:28, Karol Bieniaszewski wrote: I do not have core dump because engine did not crashed. What next? Make it crashing by setting of BugcheckAbort in firebird.conf. -- WBR, SD. Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] OLTP run problem

2018-10-27 Thread Dimitry Sibiryakov
27.10.2018 10:49, Karol Bieniaszewski wrote: What can i do to fix this? Make sure that you checkout-ed the tree with platform-specific line ending. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: [Firebird-devel] Some OLTP numbers

2018-10-25 Thread Dimitry Sibiryakov
25.10.2018 15:05, Gabor Boros wrote: I have the 2 hours numbers and attached the refreshed picture. 2.5 is still the fastest. Is it the truth or I made a mistake somewhere? It is kinda expected. How many worker isqls you had? -- WBR, SD. Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] Case (and accent) insensitive ICU collations in multiple columns

2018-10-24 Thread Dimitry Sibiryakov
24.10.2018 12:51, Adriano dos Santos Fernandes wrote: if UNICODE (sensitive) has problems, as it has I cannot remember that in this thread anyone said that it has problems. Subject is "Case (and accent) *insensitive* ICU collations". -- WBR, SD. Firebird-Devel mailing list, web

Re: [Firebird-devel] LOCALTIMESTAMP name

2018-10-23 Thread Dimitry Sibiryakov
23.10.2018 11:36, liviuslivius wrote: why "LOCALTIMESTAMP" not "LOCAL_TIMESTAMP" as is for e.g. "CURRENT_TIMESTAMP"? SQL standard. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: [Firebird-devel] Some OLTP numbers

2018-10-22 Thread Dimitry Sibiryakov
22.10.2018 17:28, Gabor Boros wrote: How long distance is enough for the correct results? Usually it is run for 2-3 hours at least. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: [Firebird-devel] Some OLTP numbers

2018-10-22 Thread Dimitry Sibiryakov
22.10.2018 15:37, Gabor Boros wrote: Why the big difference between numbers which result from the same version? OLTP emul is based on random. It cannot be used as a reliable benchmark on short distances. -- WBR, SD. Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] Case (and accent) insensitive ICU collations in multiple columns

2018-10-19 Thread Dimitry Sibiryakov
19.10.2018 14:03, Adriano dos Santos Fernandes wrote: ICU generates sort key for a single string. For multi segment (columns) index/sort, Firebird call ICU (or any collation) for each column and join the generated fully (with all levels/strengths) sort keys. AFAIK, sorting key is just an

Re: [Firebird-devel] User-defined aggregate functions

2018-10-01 Thread Dimitry Sibiryakov
01.10.2018 16:27, Adriano dos Santos Fernandes wrote: Usage of FETCH seems good here, then I believe the production of rows would need a YIELD . Why to invent a new syntax instead of assignment + SUSPEND which everybody got used to? -- WBR, SD. Firebird-Devel mailing list, web

Re: [Firebird-devel] User-defined aggregate functions

2018-10-01 Thread Dimitry Sibiryakov
01.10.2018 15:35, Adriano dos Santos Fernandes wrote: A single (aggregate) function call should not produce (describe) more than one column in a query. Where is such limitation described except current codebase? -- WBR, SD. Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] User-defined aggregate functions

2018-10-01 Thread Dimitry Sibiryakov
01.10.2018 12:41, Adriano dos Santos Fernandes wrote: Saying that aggregate functions should return more than one data with a feature different than ROW type, is like saying our function (and any language's function) is broken. No thing is broken. ROW type is just a syntax sugar. But if you

Re: [Firebird-devel] User-defined aggregate functions

2018-10-01 Thread Dimitry Sibiryakov
01.10.2018 12:22, Simonov Denis via Firebird-devel wrote: Current SPs do not know how to aggregate data by an external cursor. To do this, you need to write queries inside the SP. How is this related to (in)ability to return several values at once? create aggregate function custom_avg (i

Re: [Firebird-devel] User-defined aggregate functions

2018-10-01 Thread Dimitry Sibiryakov
01.10.2018 12:07, Simonov Denis via Firebird-devel wrote: To return more than one value you need support for ROW types. Otherwise, the function still does not extract more than one value. Current SP can return several values without any new type. -- WBR, SD. Firebird-Devel mailing

Re: [Firebird-devel] User-defined aggregate functions

2018-10-01 Thread Dimitry Sibiryakov
01.10.2018 11:24, Pavel Cisar wrote: Aggregates could produce various single-value outputs Why to limit them to single value? Some aggregates could profit if they are able to return more values at once. For example, avg + deviation. -- WBR, SD. Firebird-Devel mailing list, web

Re: [Firebird-devel] User-defined aggregate functions

2018-09-29 Thread Dimitry Sibiryakov
29.09.2018 16:30, Dmitry Yemanov wrote: AFAIU, Adriano's point is more about technology (use stall mode for the function request), syntax may be adjusted. We may choose a different keyword, if necessary (as a syntax sugar for the same BLR verb). Ok. How simple is this technology from engine

Re: [Firebird-devel] User-defined aggregate functions

2018-09-29 Thread Dimitry Sibiryakov
29.09.2018 14:32, Adriano dos Santos Fernandes wrote: The focus is to have a feature well integrated with Firebird others features. I don't think that to bring completely new meaning ("pull a row from set") to existing well-known keyword SUSPEND (used to be "push a row into result set") is

Re: [Firebird-devel] User-defined aggregate functions

2018-09-29 Thread Dimitry Sibiryakov
29.09.2018 14:02, Adriano dos Santos Fernandes wrote: My propose is to use the same elegant concept for aggregation. Your example seems much more confusing. It makes sense thinking on interfaces, but very different from Firebird way of doing things. Yes, but being similar to others (PG or

Re: [Firebird-devel] User-defined aggregate functions

2018-09-28 Thread Dimitry Sibiryakov
28.09.2018 18:34, Adriano dos Santos Fernandes wrote: Design is open if good alternatives are presented. Initially I think: Why not simply borrow Oracle concepts as you did with packages? -- WBR, SD. Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] Improvement for EXECUTE STATEMENT

2018-08-15 Thread Dimitry Sibiryakov
15.08.2018 17:28, Alex Peshkoff via Firebird-devel wrote: For single request no boost, but when we talk about server under high load serving multiple requests performance boost will be present. What could cause it given that I/O is already parallelized by storage system? "Very big

Re: [Firebird-devel] Improvement for EXECUTE STATEMENT

2018-08-15 Thread Dimitry Sibiryakov
15.08.2018 16:43, Alex Peshkoff via Firebird-devel wrote: Taking into an account that this is suggested for FB4 (not 2.5) I do not see problems with security. Imagine server configured with DatabaseAccess = none and/or database configured with SecurityDatabase = other.db. What will happen

Re: [Firebird-devel] Improvement for EXECUTE STATEMENT

2018-08-15 Thread Dimitry Sibiryakov
15.08.2018 16:13, Alex Peshkoff via Firebird-devel wrote: In the simplest form (create database on current server) that will look like this: execute statement 'create database ''/tmp/t1'''; What about security and other settings? Will newly created database use default ones or somehow

Re: [Firebird-odbc-devel] Unable to complete network request im windows network

2018-07-24 Thread Dimitry Sibiryakov
24.07.2018 17:28, Helge Schild wrote: Is there a different firebird server for TCP/IP connections than for connections thru a local file path? The latter works fine. With Firebird 3 local file path in connection string usually end up in using embedded mode which don't need running server.

Re: [Firebird-odbc-devel] Unable to complete network request im windows network

2018-07-24 Thread Dimitry Sibiryakov
24.07.2018 14:17, Helge Schild wrote: What could be wrong? A lot of things. The most obvious one: Firebird server is not run. -- WBR, SD. -- Check out the vibrant tech community on one of the world's most

Re: [Firebird-devel] Read consistency patch

2018-07-24 Thread Dimitry Sibiryakov
24.07.2018 13:43, Mark Rotteveel wrote: The term SCN is already used by nbackup, lets not muddle the waters by overloading it for another usecase. Taking into account usage of "SCN" term in Oracle, it is better to invent a new one for nbackup than for transaction-related counter. --

Re: [Firebird-devel] Read consistency patch

2018-07-24 Thread Dimitry Sibiryakov
24.07.2018 10:13, liviuslivius wrote: It can provide simple way to retrive new records/changes in tables (new feature). E.g. whe can then do SELECT * FROM TABLEX WHERE CN>:SCN; You already can do it with RDB$RECORD_VERSION. -- WBR, SD.

Re: [Firebird-devel] Automatic Windows builds with AppVeyor

2018-07-23 Thread Dimitry Sibiryakov
23.07.2018 21:12, Adriano dos Santos Fernandes wrote: So the problem happens when preprocess.bat is with unix eol, correct? Yes. That's why .gitattributes should contain "*.bat eol=crlf" setting. Nobody cared to add it into project's file, so everyone has to set it globally on every

Re: [Firebird-devel] Automatic Windows builds with AppVeyor

2018-07-23 Thread Dimitry Sibiryakov
23.07.2018 20:56, Adriano dos Santos Fernandes wrote: Why the problem does not happen with the others epp files? Why the problem (GPRE not reading mixed eol markers?) fixed instead? Windows CMD magic. Note that these files are not intended to be preprocessed in boot phase. -- WBR, SD.

Re: [Firebird-devel] Automatic Windows builds with AppVeyor

2018-07-23 Thread Dimitry Sibiryakov
23.07.2018 20:46, Adriano dos Santos Fernandes wrote: Is these errors happening on your local Windows machines too? Yes, unless line "*.bat eol=crlf" is added to file ".gitattributes" before checkout. -- WBR, SD.

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-23 Thread Dimitry Sibiryakov
23.07.2018 20:18, Vlad Khorsun wrote:  > const SSHORT l = (SSHORT) MIN(length, INET_remote_buffer)    If length >= INET_remote_buffer   It can't happen Then MIN() here has no meaning. and INET_remote_buffer == 32768   This is not the case Yes, fortunately. -- WBR, SD.

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-23 Thread Dimitry Sibiryakov
23.07.2018 19:42, Vlad Khorsun wrote: Note, upper allowed value for INET_remote_buffer is MAX_DATA_HW (32768). That's bad. > const SSHORT l = (SSHORT) MIN(length, INET_remote_buffer) If length >= INET_remote_buffer and INET_remote_buffer == 32768, l will be -1. -- WBR, SD.

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-23 Thread Dimitry Sibiryakov
23.07.2018 15:07, Alex Peshkoff via Firebird-devel wrote: I tried to reproduce this with c++ client. I did the following - set in FB4 TcpRemoteBufferSize=8191, connected to it using FB3 client (to avoid having same size preset at both ends of wire link) 'isql -user sysdba -pas masterkey

Re: [Firebird-devel] Jaybird hang on Firebird 4 with modified TcpRemoteBufferSize

2018-07-22 Thread Dimitry Sibiryakov
22.07.2018 14:56, Mark Rotteveel wrote: If I change one of the two test classes that triggers this problem to create a single database for the entire test class, the problem changes from a too large buffer being read (which causes the hang) to an error Unsupported or unexpected operation code

Re: [Firebird-devel] Authentication plugin mismatch not clearly reported to client

2018-06-25 Thread Dimitry Sibiryakov
25.06.2018 12:29, Tony Whyman wrote: There is nothing theoretical about brute force attacks. They always work, the only issue how long they take. Look at my answer to Alex. This is topic about replacing error "shit happen" with something useful for diagnostic. -- WBR, SD.

Re: [Firebird-devel] Authentication plugin mismatch not clearly reported to client

2018-06-25 Thread Dimitry Sibiryakov
25.06.2018 11:14, Alex Peshkoff via Firebird-devel wrote: Bruteforce passwords over the wire. We are still missing any passwords regulation (like min.length, UP/low letters, etc.) i.e. people can use passwords like 'pass' and such things can be bruteforced. This attack does not depend on

Re: [Firebird-devel] Authentication plugin mismatch not clearly reported to client

2018-06-25 Thread Dimitry Sibiryakov
25.06.2018 11:29, Tony Whyman wrote: Even if it were still computationally infeasible to break Srp today, it is probably that in the next few years it will be totally broken. You missed my words "non-theoretical". -- WBR, SD.

Re: [Firebird-devel] Smart end of statement detection in ISQL

2018-06-24 Thread Dimitry Sibiryakov
24.06.2018 20:09, Adriano dos Santos Fernandes wrote: Here is a valid ISQL code with "TERM ;" and "AUTOTERM ON": Check it with packages. -- WBR, SD. -- Check out the vibrant tech community on one of the world's

Re: [Firebird-devel] Services version 1 cleanup

2018-06-19 Thread Dimitry Sibiryakov
19.06.2018 15:42, Alex Peshkoff via Firebird-devel wrote: I plan to clean up support of them except anonymous (it may be used to ping server) in HEAD. Any objections? I would vote to clean out "service_mgr" as well and either to ignore this part of connection string completely or threat it

Re: [Firebird-devel] Listing all SYSTEM context variable names

2018-06-15 Thread Dimitry Sibiryakov
15.06.2018 17:19, Mark Rotteveel wrote: Having to rely on external lists like the Firebird 2.5 language reference is a bit too brittle for my tastes, I'd like the truth according to the Firebird itself. But documentation is the only place where you can see name of variable and its meaning.

Re: [Firebird-devel] Write to firebird log file from plugin

2018-06-14 Thread Dimitry Sibiryakov
14.06.2018 17:47, Alex Peshkoff via Firebird-devel wrote: Can you explain a reason why your plugin can not use functions exported from some library? I prefer not to add another dependency layer without extreme need. Synchronization of internal thread during library unload is already

Re: [Firebird-devel] Write to firebird log file from plugin

2018-06-14 Thread Dimitry Sibiryakov
14.06.2018 17:20, Dmitry Yemanov wrote: IIRC, gds__log() is exported from fbclient. Yes, but everything that a plugin has is IMaster. I can get log dir from it, so I can write my own log alongside to firebird.log, but writing into firebird.log itself could provide more consistent picture

[Firebird-devel] Write to firebird log file from plugin

2018-06-14 Thread Dimitry Sibiryakov
Hello, All. In my plugin I start a thread that do some internal work common for all plugin's instances. If this thread encountered some errors, I would like to log them somehow to let administrator a hint what is wrong before killing whole process. Is there a way for a plugin to write a

Re: [Firebird-devel] Support for XTS mode of operation in DbCrypt plugins

2018-06-08 Thread Dimitry Sibiryakov
08.06.2018 17:47, Hristo Stefanov wrote: It has 4 cores but the openssl benchmark is single threaded. Here are the repeated benchmarks with the openssl process pinned to a single core on the Intel(R) Core(TM) i5-2500 CPU: It doesn't matter for speculative execution. Run 4 benchmarks in

Re: [Firebird-devel] Support for XTS mode of operation in DbCrypt plugins

2018-06-08 Thread Dimitry Sibiryakov
08.06.2018 17:19, Hristo Stefanov wrote: After running some benchmarks of CBC and XTS mode it turns out XTS is about 4 times faster on the following hardware: Intel(R) Core(TM) i5-2500 CPU There is no wonder at: your CPU has 4 cores and CBC cannot be parallelized. The difference should be

Re: [Firebird-devel] Support for XTS mode of operation in DbCrypt plugins

2018-06-08 Thread Dimitry Sibiryakov
08.06.2018 15:44, Hristo Stefanov wrote: With future ODS changes this may not be the case. Any ODS will have some kind of internal headers in the beginning of data just because there is no way to get rid of them. -- WBR, SD.

Re: [Firebird-devel] Support for XTS mode of operation in DbCrypt plugins

2018-06-08 Thread Dimitry Sibiryakov
08.06.2018 14:25, Hristo Stefanov wrote: Yes CBC mode does that but since it is applied using the same IV and the same key multiple times it is open to chosen-plaintext attacks as noted here: https://defuse.ca/cbcmodeiv.htm A more real world example is given here:

Re: [Firebird-devel] TRANSACTION START trigger

2018-06-08 Thread Dimitry Sibiryakov
08.06.2018 11:01, Vlad Khorsun via Firebird-devel wrote:   Another question is how to handle rollback error. I mean rollback that run at catch block. I offer to ignore rollback error (maybe log it into firebird.log, if database is not bug-checked) - we can do nothing with it anyway. I'd

Re: [Firebird-devel] Support for XTS mode of operation in DbCrypt plugins

2018-06-07 Thread Dimitry Sibiryakov
07.06.2018 22:52, Hristo Stefanov wrote: I started the discussion because of this presentation: https://www.firebirdsql.org/file/community/conference-2016/encrypting-firebird-databases.pdf with the following quote: Known issue: – Encrypted size == initial size I don't understand why this

Re: [Firebird-devel] Support for XTS mode of operation in DbCrypt plugins

2018-06-07 Thread Dimitry Sibiryakov
07.06.2018 19:47, Alex Peshkoff via Firebird-devel wrote: Access to server's file system and server's RAM are rather different things. Not quite so. If someone can write a library into plugins subdir - memory is accessible. Of course, no write access to FS makes things a little harder.

<    3   4   5   6   7   8   9   10   11   12   >