[Firebird-devel] Several connections to encrypted database in SS mode

2015-11-17 Thread Dimitry Sibiryakov
Hello, All. Theoretical question: must every connection provide a valid key, or first connection unlock the database for everyone? -- WBR, SD. -- Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] Several connections to encrypted database in SS mode

2015-11-17 Thread Dimitry Sibiryakov
17.11.2015 18:01, Leyne, Sean wrote: >> - Client application set callback for providing a key > I don't understand why client needs to know anything about whether database > is encrypted or not. This step depends on implementation of KeyHolder plugin and may be not required. -- WBR, SD.

Re: [Firebird-devel] Several connections to encrypted database in SS mode

2015-11-17 Thread Dimitry Sibiryakov
17.11.2015 17:40, Leyne, Sean wrote: > For me, the sequence of operations for accessing a database would be: > > - Client initiates connection to remote server, requesting access to database > XYZ.fdb (there is nothing new in the connection string other than what is > available now) > - engine

[Firebird-devel] New API and multiple connections

2015-11-10 Thread Dimitry Sibiryakov
Hello, All. Which code for establishing two connections is right? This one: IProvider* disp = master->getDispatcher(); IAttachment* att1 = disp->attachDatabase(status, "DB1", 0, NULL); IAttachment* att2 = disp->attachDatabase(status, "DB2", 0, NULL); Or this one: IProvider* disp1

Re: [Firebird-devel] setDbCryptCallback()

2015-11-09 Thread Dimitry Sibiryakov
09.11.2015 9:56, Alex Peshkoff wrote: >> > Is callback set with subj supposed to work with custom key holder >> > plugin only? >> > > It should work with any key holder. But there is no default key holder, that's why it doesn't work by default. -- WBR, SD.

Re: [Firebird-devel] Cannot easily install plugins

2015-10-30 Thread Dimitry Sibiryakov
30.10.2015 12:24, Alex Peshkoff wrote: > You did not pay attention to >> >There are 2 types of plugin configuration > As a minimum them must be separated one from another Frankly, I see no point in "two types of plugin configuration". -- WBR, SD.

Re: [Firebird-devel] Cannot easily install plugins

2015-10-30 Thread Dimitry Sibiryakov
30.10.2015 12:28, Alex Peshkoff wrote: > I can agree with it. Just to make it explicit - a method of locating > file with_internal_ configuration values by name of plugin with > extension changed to .conf must be dropped in that case. Is it OK? To make explicit: a) Every plugin has

Re: [Firebird-devel] Cannot easily install plugins

2015-10-30 Thread Dimitry Sibiryakov
30.10.2015 13:25, Alex Peshkoff wrote: > But Adriano is talking about a place for information that currently must > go into plugins.conf and we try to find a solution that does not require > editing plugins.conf when such info must be set on plugin install. AFAIU, Adriano said that config from

Re: [Firebird-devel] Cannot easily install plugins

2015-10-30 Thread Dimitry Sibiryakov
30.10.2015 13:35, Adriano dos Santos Fernandes wrote: > I said that external plugins are not loaded without editing Firebird > supplied configuration files. Avalerion's CDC plugin is loaded perfectly well without editing plugins.conf. -- WBR, SD.

[Firebird-devel] Database decrypting

2015-11-05 Thread Dimitry Sibiryakov
Hello, All. I've managed to encrypt a database using sample DbCrypt plugin. But after command "alter database decrypt" database is still encrypted: > Data pages: total 46, encrypted 45, non-crypted 1 > Index pages: total 56, encrypted 56, non-crypted 0 > Blob pages: total 0, encrypted 0,

[Firebird-devel] Client-side key holders

2015-11-05 Thread Dimitry Sibiryakov
Hello, All. Is configuration when DB encryption key is provided by key holder configured in firebird.conf on client side supposed to work at all? -- WBR, SD. -- Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] Encrypt some more

2015-11-07 Thread Dimitry Sibiryakov
07.11.2015 15:49, Vlad Khorsun wrote: >> Is it too late to include most of page header into encrypted part of a >> page, leaving >> >unencrypted only page type and flags? > For what ? IIRC, pag_scn and pag_pageno is required for physical backup > to be not encrypted To make

[Firebird-devel] setDbCryptCallback()

2015-11-07 Thread Dimitry Sibiryakov
Hello, All. Is callback set with subj supposed to work with custom key holder plugin only? -- WBR, SD. -- Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] Security problem with encrypted databases

2015-11-07 Thread Dimitry Sibiryakov
07.11.2015 15:57, Vlad Khorsun wrote: > I'd say it will be good to have ability to validate encryption key when > it is passed into the engine. I.e. not at every page read Say, a malefactor has algorithm, but not a key (which is usual situation in OSS world). In this case it is easy to

[Firebird-devel] Encrypt some more

2015-11-07 Thread Dimitry Sibiryakov
Hello, All. Is it too late to include most of page header into encrypted part of a page, leaving unencrypted only page type and flags? -- WBR, SD. -- Firebird-Devel mailing list, web interface at

[Firebird-devel] Security problem with encrypted databases

2015-11-07 Thread Dimitry Sibiryakov
Hello, All. Because currently there is no checksum on db pages (even a fake one), there is no way to check if a page was decrypted right. As the result, any application that provide a wrong key, crash the engine and whole server. Any thoughts?.. -- WBR, SD.

[Firebird-devel] PluginFactory

2015-11-04 Thread Dimitry Sibiryakov
Hello, All. Plugin factory can produce only one type of plugin? If my module provides several plugins, I have to create separate factories for each one? -- WBR, SD. -- Firebird-Devel mailing list, web

Re: [Firebird-devel] Database decrypting

2015-11-05 Thread Dimitry Sibiryakov
05.11.2015 14:27, Alex Peshkoff wrote: > Did not check that code for a long time. > How to reproduce? 1) Compile the plugin 2) Set "Auto" to "Y" in its config 3) In isql execute commands "create database "test"; alter database encrypt with "DbCrypt_example"; alter database decrypt;" That's

[Firebird-devel] Exit from isql logs INET error on Windows after unsuccessful connection attempts

2015-11-06 Thread Dimitry Sibiryakov
Hello, All. Something must be wrong with recent network changes because after executing following script I'm getting in firebird.log number of "INET/inet_error: read errno = 10054" errors equal to number of unsuccessful connection attempts. connect localhost:test user sysdba password

[Firebird-devel] Sending db encryption key from application

2015-11-06 Thread Dimitry Sibiryakov
Hello, All. Example application works for embedded database access, but not for remote. Is it as expected? -- WBR, SD. -- Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] Client-side key holders

2015-11-06 Thread Dimitry Sibiryakov
06.11.2015 9:34, Alex Peshkoff wrote: > On 11/05/2015 06:59 PM, Dimitry Sibiryakov wrote: >> Is configuration when DB encryption key is provided by key holder >> configured in >> firebird.conf on client side supposed to work at all? > > No. Are there some theor

Re: [Firebird-devel] Exit from isql logs INET error on Windows after unsuccessful connection attempts

2015-11-06 Thread Dimitry Sibiryakov
06.11.2015 14:39, Alex Peshkoff wrote: > On linux I do not reproduce this: One or more unsuccessful attempts AND then a successful one is a requirement. -- WBR, SD. -- Firebird-Devel mailing list, web interface

Re: [Firebird-devel] Dump call stack

2015-10-19 Thread Dimitry Sibiryakov
19.10.2015 16:03, Vlad Khorsun wrote: > It is bad idea, believe me. Better idea is to provide dump of process > memory: Taing into account that "MiniDumpWriteDump may not produce a valid stack trace for the calling thread", it is better to use both. -- WBR, SD.

Re: [Firebird-devel] optional SET TERM

2015-10-15 Thread Dimitry Sibiryakov
15.10.2015 15:51, marius adrian popa wrote: > In InterBase 7 is changed so procedure and trigger programming language to no > longer > require the use of SET TERM IMHO, this is unnecessary complication of isql's parser. I'd prefer to follow KISS concept. -- WBR, SD.

Re: [Firebird-devel] optional SET TERM

2015-10-15 Thread Dimitry Sibiryakov
15.10.2015 22:32, Norman Dunbar wrote: > No set term is required. These are the default terminators, and effectively, > for Oracle, > the only two required. Nevertheless, SQL*Plus has command SET SQLT[ERMINATOR]. -- WBR, SD.

Re: [Firebird-devel] optional SET TERM

2015-10-15 Thread Dimitry Sibiryakov
15.10.2015 18:14, Tony Whyman wrote: > counting BEGIN/END block nesting is not the most complex of programming > problems. Yes, but current parser operates with plain stream of bytes. Splitting it to separate lexical units is a higher level of complexity and, I'm afraid, will slow it down.

Re: [Firebird-devel] optional SET TERM

2015-10-16 Thread Dimitry Sibiryakov
16.10.2015 15:01, Ivan Přenosil wrote: > There are actually two separators/terminators - one to be used in scripts > to separate commands, one to be used inside PSQL commands. > The whole problem is caused by the fact that somebody chose > the same character for both. > So the solution by Adriano

[Firebird-devel] How to build release build with pdb?

2015-10-21 Thread Dimitry Sibiryakov
Hello, All. Subj, actually, on Windows with MSVC 2010 Express. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

[Firebird-devel] Dump call stack

2015-10-18 Thread Dimitry Sibiryakov
Hello, All. Is there a method to dump call stack on Windows into firebird log in some useful form to find out how a routine got called? Igor Valchenko seems to be able to reproduce a very old problem with unexpected server shutdown during BLOB operation and I would like to see where

[Firebird-devel] Building snapshot package

2015-10-18 Thread Dimitry Sibiryakov
Hello, All. In BuildExecutableInstall.bat I see following comment: > :: External docs aren't necessary for a snapshot build, so we don't throw > :: an error if FB_EXTERNAL_DOCS is not defined. On the other hand, > :: if the docs are available then we can include them. But in reality

[Firebird-devel] -m switch

2015-10-14 Thread Dimitry Sibiryakov
Hello, All. Since operation mode is now configured in config file, does firebird.exe still require -m switch to be multi-threaded? -- WBR, SD. -- Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] ExternalFileAccess in v.2.5.4

2015-10-07 Thread Dimitry Sibiryakov
07.10.2015 14:06, Alex Peshkoff wrote: > Paul, taking into an account that it was written by non-native english > speaker it's more than possible. Can you suggest a better text? Text is irrelevant. Just remove apostrophes from examples of patch and/or write example with full syntax. --

Re: [Firebird-devel] MERGE INTO standard syntax support in firebird

2015-10-13 Thread Dimitry Sibiryakov
13.10.2015 16:09, marius adrian popa wrote: > noticed this issue on wikipedia All this and many side-effects are already in tracker waiting for fix. -- WBR, SD. -- Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] Several connections to encrypted database in SS mode

2015-11-18 Thread Dimitry Sibiryakov
18.11.2015 18:27, Leyne, Sean wrote: > this is solution should be described in the context of how the embedded > engine will support encryption. This thread was about SS/other engines. There is no such things in Firebird 3. Only one engine is used everywhere. -- WBR, SD.

Re: [Firebird-devel] Struggling with authentication

2015-11-18 Thread Dimitry Sibiryakov
18.11.2015 16:48, Mark Rotteveel wrote: > You don't seem to realise how hard it is to implement a protocol if you > only have hard to follow source code available in a language you are not > fluent in, and when some cases seem to work and others don't. I am > seriously considering to quit

Re: [Firebird-devel] Several connections to encrypted database in SS mode

2015-11-18 Thread Dimitry Sibiryakov
18.11.2015 18:55, Leyne, Sean wrote: > What is the sequence of operations for server-side key management? Crypt plugin either get the key somehow itself, or ask all configured key holder plugins for it. -- WBR, SD.

Re: [Firebird-devel] Several connections to encrypted database in SS mode

2015-11-18 Thread Dimitry Sibiryakov
18.11.2015 19:05, Alex Peshkoff wrote: > In remote case it will have to send secret key over > the wire to probably modified engine. No idea how can it be secure. Server security is not our thing. -- WBR, SD. --

Re: [Firebird-devel] Database UUID

2015-11-18 Thread Dimitry Sibiryakov
18.11.2015 19:36, Alex Peshkoff wrote: > But Iagree, from all other aspects placing databases ID in RDB$Database > table is better. MON$DATABASE if you wish. > For example it's stored encrypted. What's the point? -- WBR, SD.

Re: [Firebird-devel] Security problem with encrypted databases

2015-11-14 Thread Dimitry Sibiryakov
14.11.2015 23:16, Jim Starkey wrote: > So here's a simple scheme. The basic idea of a redundant set of > lightweight key servers running at various points in the network. When a > database wants to start up, it runs through a list of key server > addresses looking for one that is actually

Re: [Firebird-devel] Database UUID

2015-11-19 Thread Dimitry Sibiryakov
18.11.2015 22:32, Dmitry Yemanov wrote: >> >as long as UUID and Crypt Database ID are understood to be separate values > Here I completely agree. Ok, I, actually, don't care which one my plugin will get. All I need is something for key holder to make decision which key it must return.

Re: [Firebird-devel] Firebird database on virtual file system

2015-08-31 Thread Dimitry Sibiryakov
31.08.2015 18:38, Геннадий Забула wrote: > For example, I have a storage container implemented as a file (VHD or > DD image, no matter) and want to use database placed in it without > extraction to OS filesystem. Firebird database IS a file, and tables in it can be used witout their

Re: [Firebird-devel] Firebird database on virtual file system

2015-08-31 Thread Dimitry Sibiryakov
31.08.2015 19:03, Геннадий Забула wrote: > We are researching transparent encryption for a database file. It is done via encryption plugin. Loot at examples in 3.0 source tree. -- WBR, SD. -- Firebird-Devel

Re: [Firebird-devel] [FB-Tracker] Created: (CORE-4840) Transactions with isc_tpb_autocommit can hang the server

2015-09-01 Thread Dimitry Sibiryakov
01.09.2015 15:51, Mark Rotteveel wrote: > As an aside: I notice that the performance of this build seems to be > very poor compared to a normal Firebird build. The Jaybird test class > TestFBDatabaseMetaData takes 11 seconds on a normal Firebird 3 build, > but with the build above it takes 76

Re: [Firebird-devel] [FB-Tracker] Created: (CORE-4840) Transactions with isc_tpb_autocommit can hang the server

2015-09-01 Thread Dimitry Sibiryakov
01.09.2015 16:12, Mark Rotteveel wrote: > Ok. I suspected that, but I found the factor 7 difference worthy to mention. You can try a fresh release build from http://www.ibphoenix.com/ibpr_devel/ to compare speed. -- WBR, SD.

Re: [Firebird-devel] firebird.msg

2015-09-16 Thread Dimitry Sibiryakov
16.09.2015 11:56, Vlad Khorsun wrote: > Just run make_boot and newly generated firebird.msg have size 148104 > bytes. May be Paul got French one in UTF-8?.. -- WBR, SD. -- Monitor Your Dynamic Infrastructure

Re: [Firebird-devel] instsvc and ServerMode

2015-09-17 Thread Dimitry Sibiryakov
17.09.2015 17:07, Paul Reeves wrote: > That's an idea. But the installer has always offered the option to choose the > architecture and I don't see any problem with continuing to provide that > support. But what for? KISS. -- WBR, SD.

Re: [Firebird-devel] Replacing `instsvc`

2015-09-17 Thread Dimitry Sibiryakov
17.09.2015 16:23, Paul Reeves wrote: > The installer calls instsvc and instsvc includes all the code we need to > un/install services. And instsvc is only 250Kb. So I don't see a big win in > terms of reducing the size of the installation package. And personally, I use > instsvc.exe a lot on

Re: [Firebird-devel] instsvc and ServerMode

2015-09-17 Thread Dimitry Sibiryakov
17.09.2015 16:32, Dmitry Yemanov wrote: > For v3, I'd say that the installer should be the only tool touching > configuration file(s). I'd say that installer don't need to touch config file at all. Version 3 has SMP-friendly superserver, right? It covers 99,99% of usage. The rest of users

Re: [Firebird-devel] SET TRANSACTION in isql

2015-09-14 Thread Dimitry Sibiryakov
14.09.2015 21:22, Helen Borrie wrote: > Could some isql boffin confirm, or explain? isql does not start transaction itself. It just send SET TRANSACTION query to server as is. Server don't use any kind of "history of session", so it can use only these flags that are set in command itself.

Re: [Firebird-devel] revoke all on all

2015-09-29 Thread Dimitry Sibiryakov
29.09.2015 13:21, Paul Vinkenoog wrote: > So a CASCADE option would be a welcome addition for such cases. Another question: how many levels should this cascade go? -- WBR, SD. -- Firebird-Devel mailing list, web

Re: [Firebird-devel] CORE-4881

2015-09-21 Thread Dimitry Sibiryakov
21.09.2015 9:30, Helen Borrie wrote: > but presumably the xsqlda can carry them? Currently - not because XSQLVAR.sqllen is a signed short int. -- WBR, SD. -- Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] Enhancement for numbers calculations

2015-12-08 Thread Dimitry Sibiryakov
08.12.2015 1:39, Carlos H. Cantu wrote: > I guess the proposed > enhancement will be useful for 99% of the cases, when user don't care > about loosing some accuracy in the middle of the calculation, but > still cares about accuracy of stored data (what you store is exactly > what you get when you

Re: [Firebird-devel] Interlocked or

2015-12-08 Thread Dimitry Sibiryakov
08.12.2015 13:39, Vlad Khorsun wrote: >I don't know how to guarantee atomic execution of sequence of two > instructions on Intel HW. Don't be confused by pseudocode in function description. > You have a proof of course... Test program from your link. MSVC assembler: > ; Line

[Firebird-devel] Interlocked or

2015-12-08 Thread Dimitry Sibiryakov
Hello, All. Currently to do subj, code like this is used: > while (true) > { > AtomicCounter::counter_type old = dbb_flags; > if ((old & (DBB_sweep_in_progress | > DBB_sweep_starting)) || (dbb_ast_flags &

Re: [Firebird-devel] Interlocked or

2015-12-08 Thread Dimitry Sibiryakov
08.12.2015 11:26, Dimitry Sibiryakov wrote: > Is there a reason not to use _InterlockedOr() intrinsic with MSVC and > __sync_or_and_fetch() with GCC for such cases? Pardon, __synch_fetch_and_or(), of course, -- W

Re: [Firebird-devel] Interlocked or

2015-12-08 Thread Dimitry Sibiryakov
08.12.2015 12:29, Vlad Khorsun wrote: > Note, with MSVC, when return value of _InterlockedOr() intrinsic is used > by the caller, compiler will > generate almost the same code as above (with a loop and compare_exchange). Yes, but they do it on assembler level. > But __sync_fetch_and_or()

Re: [Firebird-devel] Interlocked or

2015-12-08 Thread Dimitry Sibiryakov
08.12.2015 15:31, Vlad Khorsun wrote: > This code is not the same as code that you blamed and it is not correct > at all. At first, I don't blame your code. It is robust and fast enough. It is just a little confusing at first glance and leave some more room for threads racing if you

Re: [Firebird-devel] Interlocked or

2015-12-08 Thread Dimitry Sibiryakov
08.12.2015 14:56, Vlad Khorsun wrote: > Do you see the principal difference with Firebird asm code i show ? Principal difference - no. Size difference - yes. > Do you see the loop with compare_exchange ? Yes. > Do you see the "lock or" operation ? Yes. > Do you still have

Re: [Firebird-devel] Interlocked or

2015-12-08 Thread Dimitry Sibiryakov
08.12.2015 17:12, Jim Starkey wrote: > But I don't get the logic that saving 10 ns. is worth introducing a > bug. Could you elaborate what bug you have on mind? > I suppose there are cases where you want to set a bit and don't > care whether it was already set are diminishingly small -- and

Re: [Firebird-devel] Interlocked or

2015-12-08 Thread Dimitry Sibiryakov
08.12.2015 17:45, Vlad Khorsun wrote: > I see no races there. Especially considering another flags. Yeah, my bad. > This code must not set DBB_sweep_starting flag if it not going to start > sweep thread. > I.e. if sweep thread: > - already starting In this case flag

Re: [Firebird-devel] Interlocked or

2015-12-08 Thread Dimitry Sibiryakov
08.12.2015 16:29, Jim Starkey wrote: > In virtual all cases involving updates of non-interlocked data structures, > the logic is -- > and must be: Unfortunately, this logic doesn't work quite well for bit flags. Consider two threads, setting flags A and B respectively. > for (;;) >

Re: [Firebird-devel] Firebird #.## msg file

2015-12-08 Thread Dimitry Sibiryakov
08.12.2015 21:00, Carlos H. Cantu wrote: > I'll let any core developer to answer you, since I don't know the reason for > the two files. Look at build scripts which one is used during build. PS: In Firebird 3 there is only one file. -- WBR, SD.

Re: [Firebird-devel] ThrowStatusWrapper

2015-12-02 Thread Dimitry Sibiryakov
02.12.2015 17:18, Alex Peshkoff wrote: > Not sure what do you mean under > Firebird::exception - Firebird::status_exception or Firebird::Exception Firebird::Exception, of course which whole codebase is used to. -- WBR, SD.

Re: [Firebird-devel] ThrowStatusWrapper

2015-12-02 Thread Dimitry Sibiryakov
02.12.2015 15:39, Alex Peshkoff wrote: > For internal use in firebird another wrapper (working with > status_exception) will be used, but it's not v.3 task. Why you need another wrapper? Wouldn't be enough to typedef Firebird::exception as FbException? -- WBR, SD.

[Firebird-devel] YHelper and exceptions in constructor

2015-12-02 Thread Dimitry Sibiryakov
Hello, All. YHelper calls this->addRef() in constructor. But if the rest of the constructor throw anything, destructor is called automatically and die on assertion fb_assert(refCounter.value() == 0). Is it a design flaw? -- WBR, SD.

Re: [Firebird-devel] YHelper and exceptions in constructor

2015-12-03 Thread Dimitry Sibiryakov
03.12.2015 11:22, Alex Peshkoff wrote: > Yes, and looks like assert() did it best to help find it. Remove the call of addRef(), find all YHelper's descendants and fix every single creation of them is the right fix for that? -- WBR, SD.

Re: [Firebird-devel] Firebird #.## msg file

2015-12-06 Thread Dimitry Sibiryakov
06.12.2015 20:15, Mário Reis wrote: > Is there some way of get a msg file of certain language? Sure. That's how German and French translations are done now. > As i do have a few hours i'll w'ill be happy to help for example translating > de original > msg file into portuguese but i need to >

Re: [Firebird-devel] Interlocked or

2015-12-09 Thread Dimitry Sibiryakov
08.12.2015 23:26, Vlad Khorsun wrote: >> 1) allowSweepThread() set DBB_sweep_starting > Then code attempts to start sweep thread. Which could fail. If start thread fail, clearSweepFlags() will be called, clearing both flags. May be you mean failed sweeper attach? Yes, this case will

Re: [Firebird-devel] Interlocked or

2015-12-09 Thread Dimitry Sibiryakov
09.12.2015 12:17, Vlad Khorsun wrote: > 09.12.2015 12:49, Dimitry Sibiryakov wrote: >> 08.12.2015 23:26, Vlad Khorsun wrote: >>>> 1) allowSweepThread() set DBB_sweep_starting >>> Then code attempts to start sweep thread. Which could fail. >> >>

Re: [Firebird-devel] YHelper and exceptions in constructor

2015-12-03 Thread Dimitry Sibiryakov
03.12.2015 12:11, Alex Peshkoff wrote: >> Remove the call of addRef(), find all YHelper's descendants and fix >> every single >> >creation of them is the right fix for that? >> > > Yes, something like this. In YTransaction::enterDtc(), copy->addRef() is already called. Must it be now

Re: [Firebird-devel] ThrowStatusWrapper

2015-12-02 Thread Dimitry Sibiryakov
02.12.2015 14:17, Alex Peshkoff wrote: > Internally we do not use ThrowStatusWrapper (except UDR plugin). I know. That's why the question: what is it for and how/where can be used? -- WBR, SD. -- Go from Idea to

[Firebird-devel] MasterImplementation::registerAttachment()

2015-12-02 Thread Dimitry Sibiryakov
Hello, All. What's the purpose of the subj? I don't see it to be called from anywhere and IDL file also has no comment about it. -- WBR, SD. -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give

[Firebird-devel] ThrowStatusWrapper

2015-12-02 Thread Dimitry Sibiryakov
Hello, All. Subj throws FbException, but everywhere in code Firebird::exception is being caught. How it is supposed to work? -- WBR, SD. -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your

Re: [Firebird-devel] ThrowStatusWrapper

2015-12-02 Thread Dimitry Sibiryakov
02.12.2015 14:37, Alex Peshkoff wrote: > Let me not describe trivial class here. Ok, I got it: for end-user applications only, cannot be used in any part of Firebird itself. -- WBR, SD. -- Go from Idea to Many

Re: [Firebird-devel] [Firebird-checkins] SF.net SVN: firebird:[62678] firebird/trunk/src/yvalve/why.cpp

2015-12-16 Thread Dimitry Sibiryakov
16.12.2015 18:42, Alex Peshkoff wrote: > One more advice - check the result before committing. After this commit > we once get: > > # ./isql -z aa > ISQL Version: LI-V3.0.0.3-dev Firebird 3.0 Release Candidate 2 > Statement failed, SQLSTATE = 08006 > Unable to complete network request to host

[Firebird-devel] Mapping.cpp

2015-12-13 Thread Dimitry Sibiryakov
Hello, All. Trying to understand why crypt key is requested several times during one connect to a database, I added some logging into cryptomanager and got following log: > SD-HP Sat Dec 12 19:02:17 2015 > 02016F20 crypt manager loaded AES128 > SD-HP Sat Dec 12 19:02:17 2015 >

Re: [Firebird-devel] Mapping.cpp

2015-12-14 Thread Dimitry Sibiryakov
14.12.2015 15:10, Alex Peshkoff wrote: > in a case when cache to be decreased reopen is unavoidable. Errr... Cache? What this routine does at all? -- WBR, SD. -- Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] Mapping.cpp

2015-12-14 Thread Dimitry Sibiryakov
14.12.2015 14:04, Alex Peshkoff wrote: >> 1) Slow connect > Connect second time - you will not see this effect for SS & SC, for CS > it's known problem. Is it in tracker? Is it going to be fixed? -- WBR, SD. --

Re: [Firebird-devel] Mapping.cpp

2015-12-14 Thread Dimitry Sibiryakov
14.12.2015 15:25, Alex Peshkoff wrote: > On 12/14/2015 05:15 PM, Dimitry Sibiryakov wrote: >> 14.12.2015 15:10, Alex Peshkoff wrote: >>> in a case when cache to be decreased reopen is unavoidable. >> Errr... Cache? What this routine does at all? > > Routine? not

Re: [Firebird-devel] Mapping.cpp

2015-12-14 Thread Dimitry Sibiryakov
14.12.2015 15:48, Alex Peshkoff wrote: > On 12/14/2015 05:42 PM, Dimitry Sibiryakov wrote: >> 14.12.2015 15:39, Alex Peshkoff wrote: >>>>> Routine? not routine, but parameter in DPB makes it possible to decrease >>>>>>> cache size. >>>>&g

Re: [Firebird-devel] Mapping.cpp

2015-12-14 Thread Dimitry Sibiryakov
14.12.2015 15:39, Alex Peshkoff wrote: >>> Routine? not routine, but parameter in DPB makes it possible to decrease >>> >>cache size. >> > If you make the routine to work with already loaded database, these >> > parameters will be >> >already applied before it is called, no? >> > > No.

Re: [Firebird-devel] Mapping.cpp

2015-12-15 Thread Dimitry Sibiryakov
15.12.2015 12:54, Alex Peshkoff wrote: > No. To change (or not) cache settings we need to know whether current > user has DBO rights or not. And this becomes known only after the call > to mapUser. Do you mean cache settings written into database or memory cache settings? I was sure that

Re: [Firebird-devel] [Firebird-checkins] SF.net SVN: firebird:[62678] firebird/trunk/src/yvalve/why.cpp

2015-12-17 Thread Dimitry Sibiryakov
17.12.2015 13:27, Paul Beach wrote: >>> > >It would be nice to offer an ecryption plugin that works to all Firebird >>> > >users, not >>> > >just via our own internal replication fork. >> > >> >Certainly, but let's avoid breaking code when doing it. > Agreed - especially at an RC stage of

Re: [Firebird-devel] [Firebird-checkins] SF.net SVN: firebird:[62678] firebird/trunk/src/yvalve/why.cpp

2015-12-18 Thread Dimitry Sibiryakov
18.12.2015 0:09, Vlad Khorsun wrote: > I fixed a very old bug which you used to run very questionable > configuration. Ok, ok, but now get back gsec to work, please. -- WBR, SD. -- Firebird-Devel mailing

Re: [Firebird-devel] [Firebird-checkins] SF.net SVN: firebird:[62678] firebird/trunk/src/yvalve/why.cpp

2015-12-17 Thread Dimitry Sibiryakov
17.12.2015 17:56, Dimitry Sibiryakov wrote: > Ability to use "Providers = Remote,Loopback,Engine12" which you have just > broken was > useful BTW, gsec stopped to work in embedded mode as we

Re: [Firebird-devel] Mapping.cpp

2015-12-15 Thread Dimitry Sibiryakov
15.12.2015 13:47, Alex Peshkoff wrote: > So you want to say that in case of CS there is no need in checking for > DBO and therefore calling mapUser too early? Seems to be so. And in the case of SS, if error "not enough rights" is thrown, then the connection failed, database is unloaded,

Re: [Firebird-devel] Mapping.cpp

2015-12-15 Thread Dimitry Sibiryakov
15.12.2015 14:35, Alex Peshkoff wrote: > When database is opened by SS and > is ready for processing mapping request it can be used by another > attachment - and it will be used with wrong cache settings, which may > badly affect performance. What do you think about this: 1) For first

Re: [Firebird-devel] Mapping.cpp

2015-12-15 Thread Dimitry Sibiryakov
15.12.2015 13:54, Dimitry Sibiryakov wrote: > if error "not enough rights" is thrown, then the connection > failed, database is unloaded, cache setting are reset. All this is in the case if dynamic cache size grow is impossible, of course.

[Firebird-devel] Several key holders on server

2015-12-15 Thread Dimitry Sibiryakov
15.12.2015 13:47, Alex Peshkoff wrote: > I will review the code when finish with crypt manager. During your finishing, consider following case: 1) Server has two encrypted database 2) First DB is encrypted using CryptPlugin1 + KeyHolder1 3) Second DB is encrypted using CryptPlugin2 +

Re: [Firebird-devel] Compiler for official Firebird 3 release on Windows

2015-12-10 Thread Dimitry Sibiryakov
10.12.2015 17:54, Dmitry Yemanov wrote: > And I have > absolutely no wish adjusting the snapshot compile box accordingly. IIRC, this box uses MSVC 2010 SP1, right? -- WBR, SD. -- Firebird-Devel mailing list, web

Re: [Firebird-devel] Compiler for official Firebird 3 release on Windows

2015-12-10 Thread Dimitry Sibiryakov
10.12.2015 17:58, preeves wrote: > Is there anything in the Service Pack that is relevant to the > compiler or the debugger? Yes, several bug fixes: https://support.microsoft.com/en-us/kb/983509#kb-link-91 -- WBR, SD.

Re: [Firebird-devel] Mapping.cpp

2015-12-15 Thread Dimitry Sibiryakov
15.12.2015 14:57, Alex Peshkoff wrote: > Single additional attachment once per server operation is not worth > wasting time on it. You are wrong here. -- WBR, SD. -- Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] Several key holders on server

2015-12-15 Thread Dimitry Sibiryakov
15.12.2015 15:49, Alex Peshkoff wrote: > If DbCryptPlugin::setKey is written badly - will not be called. DbCryptPlugin2 won't have a chance to call it if KeyHolder1 returned 1. Ok, I realized that KeyHolderPlugin is to be set in databases.conf only. -- WBR, SD.

Re: [Firebird-devel] isc_que_events immediate callback

2016-01-04 Thread Dimitry Sibiryakov
04.01.2016 14:34, Geoff Worboys wrote: > I thought that maybe it might be important to grab the current > counter values with that first call to isc_que_events, but that > doesn't make any sense, as it appears that the returned counter > is always an increment of the passed in existing counter

Re: [Firebird-devel] Lock manager's hash calculations

2015-12-29 Thread Dimitry Sibiryakov
29.12.2015 11:43, Alex Peshkoff wrote: That I do not expect to get something better than this bell curve: I was unable to create a good load on database with my weak notebook, but oltp-emul with 5 windows gave me these numbers for lock manager using CRC32: Hash slots: 8191, Hash lengths

Re: [Firebird-devel] Lock manager's hash calculations

2015-12-29 Thread Dimitry Sibiryakov
29.12.2015 18:08, Dmitry Yemanov wrote: > Really? Yep. Look into Hash.h. It is much different (and much slower). -- WBR, SD. -- Firebird-Devel mailing list, web interface at

[Firebird-devel] march switch in posix build for x86 architecture

2015-12-29 Thread Dimitry Sibiryakov
Hello, All. Isn't it a good time to drop support of 20 years old processors and raise -march value from i386 to i686? -- WBR, SD. -- Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] Literals in CASE expression

2016-01-06 Thread Dimitry Sibiryakov
06.01.2016 1:03, Arno Brinkman wrote: > Well. this : > > SELECT 1 / 3 FROM RDB$DATABASE > SELECT 1.0 / 3 FROM RDB$DATABASE > > should return 0.333, agree ? Actually, I agree. I believe that division should produce double precision result. 06.01.2016 8:28, Mark

Re: [Firebird-devel] String error with actual snapshot of 3.0

2016-01-07 Thread Dimitry Sibiryakov
07.01.2016 15:56, Adriano dos Santos Fernandes wrote: >> Remember that a CAST(? as CHAR(10) CHARACTER SET OCTETS) is described in > I mean CAST(? as CHAR(10) CHARACTER SET UTF8)... You (and currently engine too) mix up data size in bytes and count of characters in a string. xsqlvar.sqllen

Re: [Firebird-devel] External routines changing parameter types

2015-12-31 Thread Dimitry Sibiryakov
31.12.2015 12:33, Adriano dos Santos Fernandes wrote: > As I said, if 10.2 is supposedly converted to INTEGER then to VARCHAR > and results in '10.2', INTEGER is being ignored. IMHO, this is a bug. Routine should get '10' in this case or an error to be raised. -- WBR, SD.

<    5   6   7   8   9   10   11   12   13   14   >