Re: [Firebird-devel] CLOOP and multiple inheritance

2015-11-11 Thread Adriano dos Santos Fernandes
On 11/11/2015 09:01, Dimitry Sibiryakov wrote: >Hello, Adriano. > >Key holder example can be made more simple and readable by using multiple > inheritance. > With normal classes I would do it this way: > > class CryptKeyHolder: public IKeyHolderPlugin, public ICryptKeyCallback > >Is

Re: [Firebird-devel] CLOOP and multiple inheritance

2015-11-11 Thread Dimitry Sibiryakov
11.11.2015 12:32, Adriano dos Santos Fernandes wrote: > I can write almost any code mixing their common part in a single class, > avoiding duplicate declarations, with our without cloop, and as the one > you say, it will not work too, but will be much more compact! Multiple inheritance of

[Firebird-devel] CLOOP and multiple inheritance

2015-11-11 Thread Dimitry Sibiryakov
Hello, Adriano. Key holder example can be made more simple and readable by using multiple inheritance. With normal classes I would do it this way: class CryptKeyHolder: public IKeyHolderPlugin, public ICryptKeyCallback Is it possible with CLOOP templates? -- WBR, SD.

Re: [Firebird-devel] CLOOP and multiple inheritance

2015-11-11 Thread Dimitry Sibiryakov
11.11.2015 12:10, Adriano dos Santos Fernandes wrote: > Why it can be made more simple and readable this way? No need to use delegation. No second object declaration, initialization and cross-references with "parent" member. The code is two times shorter. -- WBR, SD.

Re: [Firebird-devel] CLOOP and multiple inheritance

2015-11-11 Thread Adriano dos Santos Fernandes
On 11/11/2015 09:18, Dimitry Sibiryakov wrote: > 11.11.2015 12:10, Adriano dos Santos Fernandes wrote: >> Why it can be made more simple and readable this way? >No need to use delegation. No second object declaration, initialization > and > cross-references with "parent" member. The code is

Re: [Firebird-devel] Pull request fixed (explained plan xml format)

2015-11-11 Thread Dmitry Yemanov
11.11.2015 01:25, liviusliv...@poczta.onet.pl wrote: > > Is this pull request useful at all or this is useless for FB team? > I try to start to teach FB code, to work in the future on more useful and > harder topics. > But i must get start point, will be good to see feedback (and also > criticism)

Re: [Firebird-devel] Pull request fixed (explained plan xml format)

2015-11-11 Thread Adriano dos Santos Fernandes
On 11/11/2015 08:36, Dmitry Yemanov wrote: > > However, choosing XML over JSON or vice versa is IMHO a way nowhere. > Whatever one we choose, half of users will be against the chosen format > and ask us to support the second one. So we should either support both > out of the box or somehow

Re: [Firebird-devel] CLOOP and multiple inheritance

2015-11-11 Thread Dimitry Sibiryakov
11.11.2015 12:52, Adriano dos Santos Fernandes wrote: > Definitively, not always out of the box when they have common base classes. Even in this case it works predictable in standard C++. >> >So, what is your answer: is using of multiple inheritance possible with >> > CLOOP templates >>

[Firebird-devel] cmake build system

2015-11-11 Thread Treeve Jelbert
I have been happily using cmake to build fb3 on Linux. I was therefore disappointed to discover that the cmake files are not included in th fb3-rc1 tarball. Would it be possible to include them in RC2, possibly with a warning note? Regards, Treeve

Re: [Firebird-devel] Key holder and several keys

2015-11-11 Thread Alex Peshkoff
On 11/11/2015 03:51 PM, Dimitry Sibiryakov wrote: > Hello, All. > > If there is several encrypted databases on a server, each using the same > cryto-plugin > but different keys, how can a key holder find out which key it must provide > on request? > > I see no problems from key holder -

Re: [Firebird-devel] Encrypted flag is set on unencrypted page?

2015-11-11 Thread Alex Peshkoff
On 11/11/2015 05:15 PM, Dimitry Sibiryakov wrote: > Hello, All. > > Check me, please: in CryptoManager::encrypt() I see line > > > from->pag_flags |= Ods::crypted_page; > > But AFAIU, content of "from" page is not encrypted, so if this page is > used anywhere > later, an attempt to

Re: [Firebird-devel] CLOOP and multiple inheritance

2015-11-11 Thread Jim Starkey
On 11/11/2015 11:29 AM, Dimitry Sibiryakov wrote: > 11.11.2015 16:22, Jim Starkey wrote: >> Multiple inheritance with common base classes is, in fact, a mess. The >> problem is that the C++ compiler can't really know whether two like >> named methods in different classes are the same and has no

Re: [Firebird-devel] CLOOP and multiple inheritance

2015-11-11 Thread Dimitry Sibiryakov
11.11.2015 18:03, Jim Starkey wrote: > Implementing an interface doesn't require > multiple inheritance -- or any inheritance, for that matter -- just a > decently designed language. Yes. But in this case the design requires implementing of two different interfaces at once. And inheritance

[Firebird-devel] [FB-Tracker] Created: (CORE-5011) list(distinct) doesn't sort any more if chars < a are leading

2015-11-11 Thread Volker Rehn (JIRA)
list(distinct) doesn't sort any more if chars < a are leading - Key: CORE-5011 URL: http://tracker.firebirdsql.org/browse/CORE-5011 Project: Firebird Core Issue Type: Bug

Re: [Firebird-devel] Key holder and several keys

2015-11-11 Thread Dimitry Sibiryakov
11.11.2015 16:47, Vlad Khorsun wrote: > I think key name (id) used for encryption should be stored at header page > as crypto-plugin name (id) does. Good idea. May be a text UUID shown by gstat can do the trick. It may be even the same UUID that is used for nbackup. -- WBR, SD.

Re: [Firebird-devel] Key holder and several keys

2015-11-11 Thread Alex Peshkoff
On 11/11/2015 05:22 PM, Dimitry Sibiryakov wrote: > 11.11.2015 15:15, Alex Peshkoff wrote: >> Do you want to suggest to provide to plugin info about something like >> DbName? May be anything else? > There definitely should be a way for crypto-plugin or a key holder (or, > better, both) > to

Re: [Firebird-devel] Key holder and several keys

2015-11-11 Thread Vlad Khorsun
11.11.2015 16:15, Alex Peshkoff wrote: > On 11/11/2015 04:54 PM, Dimitry Sibiryakov wrote: >> 11.11.2015 14:52, Alex Peshkoff wrote: >>> I see no problems from key holder - key name should be passed to it. >> Ok. >> How can crypto-plugin find out which key name it must provide to key >>

Re: [Firebird-devel] CLOOP and multiple inheritance

2015-11-11 Thread Dimitry Sibiryakov
11.11.2015 16:22, Jim Starkey wrote: > Multiple inheritance with common base classes is, in fact, a mess. The > problem is that the C++ compiler can't really know whether two like > named methods in different classes are the same and has no way to known > which to reference in vtable. This shows

Re: [Firebird-devel] CLOOP and multiple inheritance

2015-11-11 Thread Adriano dos Santos Fernandes
On 11/11/2015 09:57, Dimitry Sibiryakov wrote: >Right now, in current state of source tree, will work a class derived from > IKeyHolderPluginImpl and ICryptKeyCallbackImpl? Yes or no? > Sorry, but this is something you can verify yourself. I guess it will not, as even without the magics

Re: [Firebird-devel] Key holder and several keys

2015-11-11 Thread Dimitry Sibiryakov
11.11.2015 14:52, Alex Peshkoff wrote: > I see no problems from key holder - key name should be passed to it. Ok. How can crypto-plugin find out which key name it must provide to key holder? -- WBR, SD. --

[Firebird-devel] Database encryption and shadows

2015-11-11 Thread Dimitry Sibiryakov
Hello, All. For every shadow a database page is encrypted separately. Why? -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

[Firebird-devel] [FB-Tracker] Created: (CORE-5008) add missing cmake files to fb3 linux tarball

2015-11-11 Thread Treeve Jelbert (JIRA)
add missing cmake files to fb3 linux tarball Key: CORE-5008 URL: http://tracker.firebirdsql.org/browse/CORE-5008 Project: Firebird Core Issue Type: Improvement Components: Build Issues

[Firebird-devel] Invocations of instsvc.exe are commented by "::" in install_service.bat

2015-11-11 Thread p519446
I've downloaded snapshot WI-V3.0.0.32165 and unpacked it. Then: c:\> type %fb3_home%\install_service.bat @echo off if "%1"=="" ( instreg install -z ) setlocal set INSTALL_SERVICE=install -z set START_SERVICE=start if not "%1"=="" ( set INSTALL_SERVICE=%INSTALL_SERVICE% -n %1 set

Re: [Firebird-devel] Encrypted flag is set on unencrypted page?

2015-11-11 Thread Alex Peshkoff
On 11/11/2015 06:22 PM, Dimitry Sibiryakov wrote: > 11.11.2015 15:21, Alex Peshkoff wrote: >> That flag means here 'page must be encrypted when written to the disk'. > Стоп, я опять не понимаю как это не работает. > Страница читается с диска с установленным флагом. Она расшифровывается, >

Re: [Firebird-devel] CLOOP and multiple inheritance

2015-11-11 Thread Jim Starkey
On 11/11/2015 6:52 AM, Adriano dos Santos Fernandes wrote: > On 11/11/2015 09:37, Dimitry Sibiryakov wrote: >> 11.11.2015 12:32, Adriano dos Santos Fernandes wrote: >>> I can write almost any code mixing their common part in a single class, >>> avoiding duplicate declarations, with our without

Re: [Firebird-devel] Encrypted flag is set on unencrypted page?

2015-11-11 Thread Dimitry Sibiryakov
11.11.2015 15:21, Alex Peshkoff wrote: > That flag means here 'page must be encrypted when written to the disk'. Стоп, я опять не понимаю как это не работает. Страница читается с диска с установленным флагом. Она расшифровывается, но флаг остаётся установленным. Если идёт процесс

Re: [Firebird-devel] Key holder and several keys

2015-11-11 Thread Dimitry Sibiryakov
11.11.2015 16:24, Alex Peshkoff wrote: > What about database name - I think it can be useful not for > crypt-related plugins only. Therefore I plan to add it to PluginConfig > interface, both alias and filename. What else worth adding there? I think that access to current IAttachment* can be

Re: [Firebird-devel] CLOOP and multiple inheritance

2015-11-11 Thread Dimitry Sibiryakov
11.11.2015 13:44, Adriano dos Santos Fernandes wrote: > I guess it will not, as even without the magics behind in the code, it > would not gonna work directly. You guess? You don't know how your code work?.. -- WBR, SD.

Re: [Firebird-devel] CLOOP and multiple inheritance

2015-11-11 Thread Adriano dos Santos Fernandes
On 11/11/2015 10:49, Dimitry Sibiryakov wrote: > 11.11.2015 13:44, Adriano dos Santos Fernandes wrote: >> I guess it will not, as even without the magics behind in the code, it >> would not gonna work directly. >You guess? You don't know how your code work?.. > Well, I initially would not

Re: [Firebird-devel] Key holder and several keys

2015-11-11 Thread Dimitry Sibiryakov
11.11.2015 15:15, Alex Peshkoff wrote: > Do you want to suggest to provide to plugin info about something like > DbName? May be anything else? There definitely should be a way for crypto-plugin or a key holder (or, better, both) to get some information about database they are loaded for, but

[Firebird-devel] [FB-Tracker] Created: (CORE-5007) UDF returning 0 for a varchar pointer aborts engine

2015-11-11 Thread Ray Holme (JIRA)
UDF returning 0 for a varchar pointer aborts engine --- Key: CORE-5007 URL: http://tracker.firebirdsql.org/browse/CORE-5007 Project: Firebird Core Issue Type: Bug Components: UDF

Re: [Firebird-devel] CLOOP and multiple inheritance

2015-11-11 Thread Dimitry Sibiryakov
11.11.2015 13:55, Adriano dos Santos Fernandes wrote: > Well, I initially would not gonna to reply to your messages, as I saw > you were just lazy, just replied because you directed it to me, but you > were just lazy and wanna I do your job. Documenting of your design is my job? Wow... --

Re: [Firebird-devel] CLOOP and multiple inheritance

2015-11-11 Thread Adriano dos Santos Fernandes
On 11/11/2015 09:37, Dimitry Sibiryakov wrote: > 11.11.2015 12:32, Adriano dos Santos Fernandes wrote: >> I can write almost any code mixing their common part in a single class, >> avoiding duplicate declarations, with our without cloop, and as the one >> you say, it will not work too, but will be

[Firebird-devel] Key holder and several keys

2015-11-11 Thread Dimitry Sibiryakov
Hello, All. If there is several encrypted databases on a server, each using the same cryto-plugin but different keys, how can a key holder find out which key it must provide on request? -- WBR, SD. --

Re: [Firebird-devel] cmake build system

2015-11-11 Thread Alex Peshkoff
On 11/11/2015 04:17 PM, Treeve Jelbert wrote: > I have been happily using cmake to build fb3 on Linux. > I was therefore disappointed to discover that the cmake files are not > included in th fb3-rc1 tarball. > > Would it be possible to include them in RC2, possibly with a warning > note? Please

[Firebird-devel] Encrypted flag is set on unencrypted page?

2015-11-11 Thread Dimitry Sibiryakov
Hello, All. Check me, please: in CryptoManager::encrypt() I see line > from->pag_flags |= Ods::crypted_page; But AFAIU, content of "from" page is not encrypted, so if this page is used anywhere later, an attempt to decrypt unencrypted data will result in garbage. Am I wrong? --

Re: [Firebird-devel] Key holder and several keys

2015-11-11 Thread Alex Peshkoff
On 11/11/2015 04:54 PM, Dimitry Sibiryakov wrote: > 11.11.2015 14:52, Alex Peshkoff wrote: >> I see no problems from key holder - key name should be passed to it. > Ok. > How can crypto-plugin find out which key name it must provide to key > holder? > Using plugin's configuration this

Re: [Firebird-devel] Pull request fixed (explained plan xml format)

2015-11-11 Thread liviuslivius
> Generally, providing some structural information in the machine-readable > form is a good idea. Parsing plain text is terrible, especially when > this text changes from version to version. > > When I was implementing the explained plan output, the original idea was > to have it represented

Re: [Firebird-devel] Pull request fixed (explained plan xml format)

2015-11-11 Thread liviuslivius
>>Try to write code similar to the one you're changing. good point :) regards, Karol Bieniaszewski W dniu 2015-11-11 02:40:05 użytkownik Adriano dos Santos Fernandes napisał: > About the code style... > > You surely should not reinvent another style. It's very easy to

Re: [Firebird-devel] Pull request fixed (explained plan xml format)

2015-11-11 Thread liviuslivius
Hi, great thanks - this is detailed information regards, Karol Bieniaszewski W dniu 2015-11-11 06:25:08 użytkownik Dmitry Yemanov napisał: > 11.11.2015 04:40, Adriano dos Santos Fernandes wrote: > > > About the code style... > > > > You surely should not reinvent another