[Firebird-devel] Several connections to encrypted database in SS mode
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 https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Several connections to encrypted database in SS mode
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. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Several connections to encrypted database in SS mode
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 tries to open database XYZ.fdb and read header page > - engine determines that header page reads "I am encrypted and need key with > name = ABCD" > - engine determines (through server/database config settings) which plug-in > to use > - engine loads/calls plug-in asking "I have database which needs key with > name = ABCD, are you able/ready to work?" > - if plug-in says "Yes", then the engine proceeds with database open, and all > non-header page operations are channeled through the plug-in > - if plug-in says "No", then engine stops the database open, and returns > error to client. Currently it is this way: - Client application set callback for providing a key - client application initiates connection to a database - engine reads header - engine reads crypt-plugin name from header - engine loads the plugin - plugin ask all configured key holders "does anybody have a key for me?" - keyholder either can give the key or call application's callback to get confirmation beforehand - if any piece of the chain raise error, connect fail - if provided key is wrong, engine crash -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] New API and multiple connections
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 = master->getDispatcher(); IAttachment* att1 = disp1->attachDatabase(status, "DB1", 0, NULL); IProvider* disp2 = master->getDispatcher(); IAttachment* att2 = disp2->attachDatabase(status, "DB2", 0, NULL); -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] setDbCryptCallback()
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. -- Presto, an open source distributed SQL query engine for big data, initially developed by Facebook, enables you to easily query your data on Hadoop in a more interactive manner. Teradata is also now providing full enterprise support for Presto. Download a free open source copy now. http://pubads.g.doubleclick.net/gampad/clk?id=250295911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Cannot easily install plugins
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. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Cannot easily install plugins
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 PluginName, ModuleName, ConfigFileName b) By default (without any additional editing of plugins.conf) ModuleName = plugins/$(PluginName).dll ConfigFileName = $(basename ModuleName).conf c) File, determined by ConfigFileName is a plain set of pairs "Option=Value". Agree? -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Cannot easily install plugins
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 default ConfigFileName is not read now and his plugin cannot get it. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Cannot easily install plugins
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 mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] Database decrypting
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, non-crypted 0 And when I'm trying to connect to it, I'm getting error message: > Statement failed, SQLSTATE = 39000 > Missing crypt plugin, but page appears encrypted though plugin is still here and I'm able to create a new database and encrypt it. What's wrong? -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] Client-side key holders
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 https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Encrypt some more
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 pag_reserved accessible to crypt plugin without tricks with negative offsets. Someone could use it for internal purposes (as salt for example). -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] setDbCryptCallback()
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 https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Security problem with encrypted databases
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 forge a key that pass validation but still crash the server. I'd suggest to reserve last four bytes on every page and put CRC32 checksum there. This way we can be protected from both wrong decryption and partial hardware writes (which has bigger probability when we have bigger pages). -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] Encrypt some more
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 https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] Security problem with encrypted databases
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 mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] PluginFactory
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 interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Database decrypting
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 all. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] Exit from isql logs INET error on Windows after unsuccessful connection attempts
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 wrong_password; connect localhost:test user sysdba password another_wrong_password; connect localhost:test user sysdba password right_password; exit; -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] Sending db encryption key from application
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 https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Client-side key holders
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 theoretical/practical objections or such possibility just wasn't considered? -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Exit from isql logs INET error on Windows after unsuccessful connection attempts
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 at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Dump call stack
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. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] optional SET TERM
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. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] optional SET TERM
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. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] optional SET TERM
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. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] optional SET TERM
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 is the simplest and the only right (imho). Problem with changing of the terminator and returning it back can be made easier if SET TERM command had had only local effect to current (and nested) input streams. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] How to build release build with pdb?
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
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 JProvider::shutdown() is called from. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] Building snapshot package
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 the error IS thrown from CHECK_ENVIRONMENT block if FB_EXTERNAL_DOCS is not defined. How to solve that? -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] -m switch
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 https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] ExternalFileAccess in v.2.5.4
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. -- WBR, SD. -- Full-scale, agent-less Infrastructure Monitoring from a single dashboard Integrate with 40+ ManageEngine ITSM Solutions for complete visibility Physical-Virtual-Cloud Infrastructure monitoring from one console Real user monitoring with APM Insights and performance trend reports Learn More http://pubads.g.doubleclick.net/gampad/clk?id=247754911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] MERGE INTO standard syntax support in firebird
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 https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Several connections to encrypted database in SS mode
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. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Struggling with authentication
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 developing Jaybird over this. Why to bother implementing network protocol if Java can use native libraries, including fbclient.dll?.. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Several connections to encrypted database in SS mode
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. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Several connections to encrypted database in SS mode
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. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Database UUID
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. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Security problem with encrypted databases
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 running. If it finds one, it > establishes a secure connection and asks for the decryption key. The > key server notes the IP address of the requester and returns the > appropriate key. Probably a good idea to toss in a database name as well. If no single key server is accessible, the database is locked up. Static "white" IP address on client side is required. Database on a laptop is inaccessible completely. I'm afraid that that's not what customers would pay for. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Database UUID
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. Including cases when different databases on one server are encrypted with the same plugin but different keys and vice versa. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Firebird database on virtual file system
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 extraction to OS filesystem. In contrast to SQLite. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Firebird database on virtual file system
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 mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] [FB-Tracker] Created: (CORE-4840) Transactions with isc_tpb_autocommit can hang the server
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 seconds. This is a debug build, not release one. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] [FB-Tracker] Created: (CORE-4840) Transactions with isc_tpb_autocommit can hang the server
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. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] firebird.msg
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 at Any Scale With Datadog! Get real-time metrics from all of your servers, apps and tools in one place. SourceForge users - Click here to start your Free Trial of Datadog now! http://pubads.g.doubleclick.net/gampad/clk?id=241902991=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] instsvc and ServerMode
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. -- Monitor Your Dynamic Infrastructure at Any Scale With Datadog! Get real-time metrics from all of your servers, apps and tools in one place. SourceForge users - Click here to start your Free Trial of Datadog now! http://pubads.g.doubleclick.net/gampad/clk?id=241902991=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Replacing `instsvc`
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 windows. And I don't really want to implement the > service api calls in the installer, when we already have them. Since you dropped support of Windows 95/98, you can use utility sc to install/uninstall services on Windows. -- WBR, SD. -- Monitor Your Dynamic Infrastructure at Any Scale With Datadog! Get real-time metrics from all of your servers, apps and tools in one place. SourceForge users - Click here to start your Free Trial of Datadog now! http://pubads.g.doubleclick.net/gampad/clk?id=241902991=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] instsvc and ServerMode
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 should be able to modify config by hand after installation. -- WBR, SD. -- Monitor Your Dynamic Infrastructure at Any Scale With Datadog! Get real-time metrics from all of your servers, apps and tools in one place. SourceForge users - Click here to start your Free Trial of Datadog now! http://pubads.g.doubleclick.net/gampad/clk?id=241902991=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] SET TRANSACTION in isql
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. Thats why "SET TRANSACTION" without further options will start default (concurrency-level) transaction. No matter what happened in the past. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] revoke all on all
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 interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] CORE-4881
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 https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Enhancement for numbers calculations
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 retrieve it). For the other 1%, user still has > full control doing his own casts as desired. But how many users perform such complex calculations in SQL server?.. -- WBR, SD. -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Interlocked or
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 7 > mov DWORD PTR _cur$[esp+8], 15 ; 000fH > pushesi > ; Line 9 - old = _InterlockedOr(, 0xF0); > mov ecx, 240; 00f0H > lea edx, DWORD PTR _cur$[esp+12] > mov eax, DWORD PTR [edx] > $LN3@main: > mov esi, eax > or esi, ecx > lock cmpxchg DWORD PTR [edx], esi > jne SHORT $LN3@main > mov DWORD PTR _old$[esp+12], eax > ; Line 10 - _InterlockedOr(, 0xF0); > mov eax, edx > lock or DWORD PTR [eax], ecx GCC assembler: > movl$15, 44(%rsp) > ; old = __atomic_fetch_or(, 0xF0, __ATOMIC_SEQ_CST); > movl44(%rsp), %eax > .L2: > movl%eax, %edx > movl%eax, %ecx > orb $-16, %dl > lock cmpxchgl %edx, 44(%rsp) > jne .L2 > movl%ecx, 40(%rsp) > ;__atomic_fetch_or(, 0xF0, __ATOMIC_SEQ_CST); > lock orl$240, 44(%rsp) -- WBR, SD. -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] Interlocked or
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 & DBB_shutdown)) > return false; > > if (dbb_flags.compareExchange(old, old | > DBB_sweep_starting)) > break; > } Is there a reason not to use _InterlockedOr() intrinsic with MSVC and __sync_or_and_fetch() with GCC for such cases? -- WBR, SD. -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Interlocked or
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, -- WBR, SD. -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Interlocked or
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() give us no guarantee because it perform two actions > which is not atomic together. It does guarantee (otherwise "atomic" in the name has no sense). Assembler code produced by __atomic_fetch_or(__ATOMIC_SEQ_CST) is exactly the same as for _InterlockedOr(). -- WBR, SD. -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Interlocked or
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 take into consideration other possible flags. At second, this code is correct because cleanSweepFlags() will clear both flags anyway. -- WBR, SD. -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Interlocked or
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 questions ? Yes: why to write 6 lines of code instead of two? if ((dbb_flags.interlockedOr(DBB_sweep_starting) & (DBB_sweep_in_progress | DBB_sweep_starting)) || (dbb_ast_flags & DBB_shutdown)) return false; -- WBR, SD. -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Interlocked or
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 > insignificant. IMHO, on contrary, it is quite common case when several threads want to perform an operation but only is allowed to. In this topic's example it is running a sweep process. When a thread want to run it, there can be two cases: a) it is the first thread wanting to b) someone else is already running it In first case, the thread atomically set the flag and proceed. In second case, the thread atomically set the flag and abort. Result in both cases is exactly the same: flag is set but only first thread works. What I'm missing? -- WBR, SD. -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Interlocked or
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 DBB_sweep_starting is already set and second attempt to do that won't hurt. > - already started In this case flag DBB_sweep_in_progress is already set and cleanSweepFlags() is going to be run afterward. > - not allowed due to database shutdown That make sense. > With your proposed simplification, code will set DBB_sweep_starting flag > in any case, > even if this thread will not continue. Thus your code is not equal to code > above and > not correct. Yes, agree. Check for shutdown should be performed before that. > Note, cleanSweepFlags() is never called after > Database::allowSweepThread(). It is called after > another method - Database::allowSweepRun() Which is called after allowSweepThread(). Total sequence is: 1) allowSweepThread() set DBB_sweep_starting 2) allowSweepRun() set DBB_sweep_in_progress and clear DBB_sweep_starting 3) cleanSweepFlags() clear both. One question: what will be wrong if allowSweepRun() don't clear DBB_sweep_starting? -- WBR, SD. -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Interlocked or
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 (;;) > { > state> Here thread 1 got value with both flags unset. > if () > In meantime thread 2 set flag B. > if () Here thread 1 set the value with flag A set and flag B reset. > Check fail, but still flag B is not set until the next round. The window for races is small but still exists. For integer flags situation is better. If we want to set flag, we just do if (interlocked compare and swap) Still there is a hope that CPU manufacturers will someday implement atomic_fetch_and_or in hardware because it is engraved in C++11 standard. -- WBR, SD. -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Firebird #.## msg file
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. -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] ThrowStatusWrapper
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. -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] ThrowStatusWrapper
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. -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] YHelper and exceptions in constructor
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. -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] YHelper and exceptions in constructor
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. -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Firebird #.## msg file
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 > know how to get the original(source?) file and what do i have to do in order > to do not > damage the file. Get Firebird source and look into src/msgs folder, files transmsg*. -- WBR, SD. -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Interlocked or
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 leave the flag set till the end of world. >> >2) allowSweepRun() set DBB_sweep_in_progress and clear DBB_sweep_starting >> >3) cleanSweepFlags() clear both. >> > >> > One question: what will be wrong if allowSweepRun() don't clear >> > DBB_sweep_starting? > It could disable auto-sweep in this process. How? The routine is called in TRA_sweep(). All exit paths from TRA_sweep() (successful and error ones) are calling clearSweepFlags(). -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Interlocked or
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. >> >> If start thread fail, clearSweepFlags() will be called, clearing both >> flags. > > You forget about not catched exceptions Thread::start() don't throw anything but Firebird::Exception. >> May be you mean failed sweeper attach? Yes, this case will leave the >> flag set till the >> end of world. > > There could be many different reasons to fail in the future code at the > not expected places. This code is in thread routine, you cannot expect it to be executed before returning from Thread::start(). > PS What is your goal asking this questions ? All reasons was already > explained, even more... > Are you want us to write not robust code just to make it more simple for your > eye ? InterlockedOr is exactly as robust as your code. Didn't you look at produced assembler? Yes, I want you to write simple code. Is it too hard? -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] YHelper and exceptions in constructor
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 two calls in row? -- WBR, SD. -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] ThrowStatusWrapper
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 Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] MasterImplementation::registerAttachment()
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 your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] ThrowStatusWrapper
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 users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] ThrowStatusWrapper
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 App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] [Firebird-checkins] SF.net SVN: firebird:[62678] firebird/trunk/src/yvalve/why.cpp
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 "localhost". > -Failed to establish a connection. > Use CONNECT or CREATE DATABASE to specify a database > SQL> > > Instead of correct: > > # ./isql -z aa > ISQL Version: LI-V3.0.0.32064-dev Firebird 3.0 Release Candidate 1 > Statement failed, SQLSTATE = 08001 > I/O error during "open" operation for file "aa" > -Error while trying to open file > -No such file or directory > Use CONNECT or CREATE DATABASE to specify a database > SQL> Do clean build. I get this: C:\...cuments\firebird3_0\output_Win32>isql -z bb ISQL Version: WI-V3.0.0.32218 Firebird 3.0 Release Candidate 2 Statement failed, SQLSTATE = 08001 I/O error during "CreateFile (open)" operation for file "bb" -Error while trying to open file -The system cannot find the file specified. Use CONNECT or CREATE DATABASE to specify a database SQL> -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] Mapping.cpp
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 > server: 003E3CF0/003E2874 trying key holder plugin AES128KeyFile with > key AES128.{5FE367C8-90A7-44EF-E5B1-9EC230E2025F} > SD-HP Sat Dec 12 19:02:17 2015 > server: 003E2870/003F5C38 trying key holder plugin AES128KeyFile with > key KeyFile.{5FE367C8-90A7-44EF-E5B1-9EC230E2025F} > SD-HP Sat Dec 12 19:02:17 2015 > server: 003E2870/003F5C38 trying key holder plugin Callback with key > KeyFile.{5FE367C8-90A7-44EF-E5B1-9EC230E2025F} > SD-HP Sat Dec 12 19:02:18 2015 > 02016F20 unloaded plugin because of shutdown > SD-HP Sat Dec 12 19:02:18 2015 > 02016F20 crypt manager loaded AES128 > SD-HP Sat Dec 12 19:02:18 2015 > server: 003E2870/003F5C38 trying key holder plugin AES128KeyFile with > key AES128.{5FE367C8-90A7-44EF-E5B1-9EC230E2025F} > SD-HP Sat Dec 12 19:02:23 2015 > 02016F20 unloaded plugin because of shutdown As you can see, database is loaded, then immediately unloaded and then loaded back. So does subj. Besides, first time it is loaded using Dispatcher and default (set in compile time) provider. I see two problems here: 1) Slow connect 2) Impossible to use more than one engine on server. How many tickets should I create for this, one or two? -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Mapping.cpp
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 https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Mapping.cpp
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. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Mapping.cpp
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 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? -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Mapping.cpp
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. >>>>> If you make the routine to work with already loaded database, these >>>>> parameters will be >>>>> already applied before it is called, no? >>>>> >>> No. >> Cannot be the routine called after they are applied? > > What routine? mapUser() -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Mapping.cpp
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. Cannot be the routine called after they are applied? -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Mapping.cpp
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 for the latter user don't need DBO rights and for the former error is thrown on an attempt to... -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] [Firebird-checkins] SF.net SVN: firebird:[62678] firebird/trunk/src/yvalve/why.cpp
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 release. Ok, I'm rolling my changes back. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] [Firebird-checkins] SF.net SVN: firebird:[62678] firebird/trunk/src/yvalve/why.cpp
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 list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] [Firebird-checkins] SF.net SVN: firebird:[62678] firebird/trunk/src/yvalve/why.cpp
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 well. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Mapping.cpp
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, cache setting are reset. So, no problem there as well. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Mapping.cpp
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 attachment CCH is initialized with minimal size enough for mapUser() to work. 2) When all necessary checks were performed, CCH_expand() is called with either default size or provided in dpb. In this case in second and subsequent attachments mapUser() either works with minimally enough cache or already expanded. No performance penalty. BTW, call to CCH_expand() is already there. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Mapping.cpp
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. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] Several key holders on server
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 + KeyHolder2 4) firebid.conf contains string KeyHolderPlugins = KeyHolder1,KeyHolder2 Result: second database in completely inaccessible. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Compiler for official Firebird 3 release on Windows
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 interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Compiler for official Firebird 3 release on Windows
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. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Mapping.cpp
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 https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Several key holders on server
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. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] isc_que_events immediate callback
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 rather > than the return of some global count value (does not depend on > whether isc_que_events has been called once or multiple times). These couners are initialized on first subscription after database load. You can't see effect of previous call in single user mode as the database is unloaded after disconnect. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Lock manager's hash calculations
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 (min/avg/max):0/ 0/ 6 Hash lengths distribution: 0 : 3591 (43%) 1 : 2992 (36%) 2 : 1194 (14%) 3 : 324 (3%) 4 : 71 (0%) 5 : 14 (0%) 6 :5 (0%) It looks like the curve falls faster. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Lock manager's hash calculations
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 https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] march switch in posix build for x86 architecture
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 https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Literals in CASE expression
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 Rotteveel wrote: > changing the math that is clearly described in the standard to something > else is plain wrong. According to a quote from standard that was discussed a couple of months ago, it is not described clearly, but left as "implementation-dependent". -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] String error with actual snapshot of 3.0
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 is size of data in bytes, it says nothing about string length in characters. If someone is sending more characters than is expected, either error can be raised or trailing whitespaces can be ignored. But still it is architectural decision that must be left to version 4. -- WBR, SD. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] External routines changing parameter types
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. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel