Re: [Firebird-devel] Valgrind in trunk
On 09/30/2013 08:07 PM, Adriano dos Santos Fernandes wrote: > Hi! > > Trunk is not building with Valgrind enabled. > > It tries to use pool_destroying (non-static) inside releaseRaw (static). > It was ~3 years ago when I tried to build with valgrind. I will take a look tomorrow if this remains not fixed. A. -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] where is the event port allocated
On 10/09/2013 01:13 PM, Nick Upson wrote: am I correct in thinking that, having run "make" I can just copy my newly build fb_inet_server into a standard installed system for testing? No, that's not enough. fb_inset_server just loads libfbembed.so, which is an actual server. -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrkFirebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] where is the event port allocated
On 10/09/2013 01:27 PM, Nick Upson wrote: aah, interesting. does that still hold as I'm running classic on unix rather than embeded On 9 October 2013 10:23, Alex <mailto:peshk...@mail.ru>> wrote: On 10/09/2013 01:13 PM, Nick Upson wrote: am I correct in thinking that, having run "make" I can just copy my newly build fb_inet_server into a standard installed system for testing? No, that's not enough. fb_inset_server just loads libfbembed.so, which is an actual server. -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel -- Nick Upson, Telensa Ltd -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel Yes, it does. it's clear that you are on unix and run classic :) -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrkFirebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] where is the event port allocated
On 10/09/2013 02:00 PM, Nick Upson wrote: I apologize for asking all these questions. a) the new libfbembed.so.2.1.5 is much bigger than the installed one, why? -rw-r--r-- 1 root root 25391270 Oct 9 10:35 ./firebird/lib/libfbembed.so.2.1.5 -rw-r--r-- 1 root root 3683140 Mar 10 2013 ./firebird/lib/libfbembed.so.2.1.5.orig That's OK - it contains full debuginfo for GDB. b) I now get the error /usr/lib/firebird/bin/isql: error while loading shared libraries: libicuuc.so.30: cannot open shared object file: No such file or directory my guess is that I'm doing something wrong when building. First question is where from did initial package come to you? If it's our build from SF - I'm a bit surprised you have such problem. But - what configure switches did you use? -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrkFirebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] FB 3: Error 335544711 (Attempt to execute an unprepared dynamic SQL statement.) when getting plan of unprepared statement
On 11/03/2013 05:51 PM, Dmitry Yemanov wrote: > 03.11.2013 16:44, Mark Rotteveel wrote: > >> I have a test in Jaybird trunk which attempts to retrieve the execution >> plan of an unprepared statement. In Firebird 2.5 the result is an empty >> string as the plan. In Firebird 3 (alpha 1), this results in an error >> with error code 335544711 (isc_unprepared_stmt) and message "Attempt to >> execute an unprepared dynamic SQL statement." >> >> Is it an intentional change that this now throws an error instead of >> just returning an empty plan, and if this is an intentional change, >> shouldn't this have a different errorcode and a better error message as >> I am not trying to execute it? > It's likely to be a side effect of the better protection against handle > misuse, so it can be considered being intentional. In fb3 ISC API is emulated on the top of object API. In object API one can't have an unprepared statement - statement is a result of prepare() executed by attachment. Therefore any attempt to access NULL interface pointer is disabled and returns an error. Not to say change was intentional but I think it's correct. On the other hand, taking into an account that old API means first of all backward compatibility, may be we should better keep legacy behavior? > I believe the error code is correct (meaning any kind of wrong operation > for the unprepared handle) but the error message deserves a better wording. > > > Dmitry > > > -- > Android is increasing in popularity, but the open development platform that > developers love is also attractive to malware creators. Download this white > paper to learn more about secure code signing practices that can help keep > Android apps secure. > http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk > Firebird-Devel mailing list, web interface at > https://lists.sourceforge.net/lists/listinfo/firebird-devel > > -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Unable to use legacy auth snapshot 3.0.0.30708?
On 11/03/2013 07:48 PM, Mark Rotteveel wrote: > On 3-11-2013 16:05, Mark Rotteveel wrote: >> I was still running against the FB 3 Alpha 1 and just upgraded to >> 3.0.0.30708 by overwriting my Firebird 3 Alpha 1 install except >> firebird.conf and security3.fdb. >> >> Now when using legacy_auth, instead of op_accept, all connection >> attempts receive an op_reject. >> >> I had to explicitly set WireCrypt = Disabled to get it to work (setting >> this to Enabled had no effect). >> >> I am not sure if this behavior is desirable or correct. Based on the >> documentation ("Enabled behavior depends another side requirements. If >> both sides set to enabled, connection is encrypted") I'd say that >> setting it to Enabled should have been sufficient. The current wire >> protocol implementation of Jaybird does not support encryption. I'd >> expect not having encryption support would in itself imply 'Disabled' >> for the client and if the server then is configured for 'Enabled' then >> no encryption should be required (as implied by the documentation). > My guess is that this change was introduced by Alex on the 16th of > October in http://sourceforge.net/p/firebird/code/58698 (specifically: > http://sourceforge.net/p/firebird/code/58698/tree//firebird/trunk/src/remote/server/server.cpp?diff=50cc621834309d0a4876d914:58697 > around line 1538): > > int clientCrypt = id.find(CNCT_client_crypt) ? id.getInt() : > WIRE_CRYPT_ENABLED; > > I'd suggest that CNCT_client_crypt missing implies DISABLED, not ENABLED > for backwards compatibility with older clients. Mark, certainly there is a bug - but not here. It's just a matter of wrongly treated Enabled state in remote server code. Will fix. -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Unable to use legacy auth snapshot 3.0.0.30708?
On 11/03/2013 07:09 PM, Mark Rotteveel wrote: > On 3-11-2013 16:05, Mark Rotteveel wrote: >> I am not sure if this behavior is desirable or correct. Based on the >> documentation ("Enabled behavior depends another side requirements. If >> both sides set to enabled, connection is encrypted") I'd say that >> setting it to Enabled should have been sufficient. The current wire >> protocol implementation of Jaybird does not support encryption. I'd >> expect not having encryption support would in itself imply 'Disabled' >> for the client and if the server then is configured for 'Enabled' then >> no encryption should be required (as implied by the documentation). > Also I'd expect that having legacy_auth enabled for AuthServer in itself > would also imply that encryption is not required. No. User must _explicitly_ set lower security level himself. Or we will be very soon asked: why with Required by default encryption and no my changes regarding it I have an unencrypted connection? -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Performance regression with 3.0.0.30708
On 11/04/2013 02:12 AM, Vlad Khorsun wrote: >> 03.11.2013 20:03, Vlad Khorsun wrote: >>> "create database" runs instantly for me. >>For me - not. >>You can get Process Monitor's log here: >> http://www.ibphoenix.com/ibpr_devel/Logfile.7z >> It seems that most of the time were spend in looking for ICU library and >> synchronous >> writing into database file several times with fast IO disabled. > I made almost the same trace of events and i see that my IO subsystem is > much faster then > yours (or yours is too slow). For example both traces contains 52 > FlushBuffersFile events (i.e. > they could be considered equal) but summary duration in your trace is 14.49 > sec while in my case > it is just 0.16 sec. > > Must say i have no SSD :) But, i guess, you are using notebook, correct ? > > > Regards, > Vlad > > PS Adriano already complains about slowness of CREATE DATABASE in fb3 (see > thread > "Reason for slow CREATE DATABASE in FB 3 (Linux)" started at 15 dec > 2011), i'll look > at it again in a next few days. > As far as I remember, at least one issue was related with changed defaults in ext* filesystem. It's in effect for any FB version, not trunk only. -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Odp: Fb3 access to security db fields UID and GID
On 11/03/2013 05:01 PM, Mark Rotteveel wrote: > On 31-10-2013 17:31, Alex Peshkoff wrote: >> On 10/31/13 20:20, liviusliv...@poczta.onet.pl wrote: >>> Hi, >>> >>> We store in thouse fields data usefull for application logic. Some dep info >>> or sime restriction. This was choose of project design at start and >>> changing it now will be risk but possible. Problem is that some projects >>> are also not created by us and discontinued and wthout source code. We only >>> add e.g extension plugin and this life from years. >>> >> UID and GID (although shown by gsec) are not supported currently by SRP >> plugin. They were never used in firebird itself, just artifact. >> Certainly it's not too hard to add them to SRP, but I'm not sure that >> supporting useless for most of people fields is a good idea. The best >> solution for you is to have personal version of SRP management plugin. >> Certainly, if not only you use this fields in app logic, looks like we >> will have to add them and support till the end of FB days. > I'd like to argue that some things shouldn't be supported forever on the > off chance that people are abusing it in some way. This specific example > might indicate a need to persist information with a user. What about > adding some sort of extensible property support which can add properties > (name-value pairs) to users (which are stored in the security database > and can be managed using the services API in some way). Thats' great suggestion. -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] FWD: Re: Compatibility FB3.0 boolean and Interbase
On 11/13/2013 11:33 AM, liviuslivius wrote: > W dniu 2013-11-13 08:10:55 użytkownik liviuslivius > napisał: >>> I know this is not what many people want to hear, but it's probably high >>> time to consider IB and FB to be two unrelated databases, and never >>> expect them to be compatible in any way. With that mindset and those >>> expectations, you will probably find your life easier. They've diverged. >>> Get over it and get on with it? :-) >>> >>> Kjell >>> >>> -- >>> -- >>> Kjell Rilbe >>> DataDIA AB >>> E-post: kjell.ri...@datadia.se >>> Telefon: 08-761 06 55 >>> Mobil: 0733-44 24 64 >>> >>> >> Hi Kjell, >> >> i know that but i suppose that in field description FB and IB are still >> compatible >> >> i talking about this declarations in sqlda_pub.h >> >> #define SQL_TEXT 452 >> #define SQL_VARYING448 >> #define SQL_SHORT 500 >> #define SQL_LONG 496 >> #define SQL_FLOAT 482 >> #define SQL_DOUBLE 480 >> #define SQL_D_FLOAT530 >> #define SQL_TIMESTAMP 510 >> #define SQL_BLOB 520 >> #define SQL_ARRAY 540 >> #define SQL_QUAD 550 >> #define SQL_TYPE_TIME 560 >> #define SQL_TYPE_DATE 570 >> #define SQL_INT64 580 >> #define SQL_BOOLEAN 32764 >> #define SQL_NULL 32766 >> >> >> i suppose that changing integer value from 32764 to the same value as is in >> Interbase will cause that FB and IB will be compatible for Boolean >> but may by i am wrong - i know only a little about internals >> >> regards, >> Karol Bieniaszewski >> >> > > Hi all, > > i test this and all work ok when i change 32764 to 590 value as is in > Interbase > please could someone of FB developers change it to this value? > Did you test it for 32/64 bit cases? Did you test it for non-intel CPUs, first of all for bigendians? Must say I treat such change as bad and dangerous as long as we do not know exact interbase rules when working with boolean. -- DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] FWD: Re: Compatibility FB3.0 boolean and Interbase
On 11/13/2013 12:10 PM, liviuslivius wrote: >>> Hi all, >>> >>> i test this and all work ok when i change 32764 to 590 value as is in >>> Interbase >>> please could someone of FB developers change it to this value? >>> >> Did you test it for 32/64 bit cases? >> Did you test it for non-intel CPUs, first of all for bigendians? >> >> Must say I treat such change as bad and dangerous as long as we do not >> know exact interbase rules when working with boolean. >> >> > Hi, > > this was fast test only on Windows and Intel CPU > but you know that using IBX for FB is for own risk but > what problem with changing this integer constant to 590 from Firebird point > of view? > Is this really problem? Are ther some bitnes test of that constant? > For me main problem is that we do not know format of interbase messages when boolean is used in them. We do not know alignment rules. We know _nothing_ about internals of boolean implementation in interbase. -- DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Compatibility FB3.0 boolean and Interbase
On 11/13/2013 12:07 PM, liviuslivius wrote: >> I probably know even less than you about the internals, but I think it's >> time to stop assuming that IB and FB will and should be kept compatible. >> In the long run it not feasible, nor desirable. These are two separate >> products and must be allowed to find their individual paths forward >> without the impediments of compatibility constraints, neither enforced >> nor community expected. >> >> If FB chooses the same value as IB for SQL_BOOLEAN it might be expected >> to imply that these types are 100% compatible, which I assume will not >> be guaranteed, so while it might work now it's also a potential time bomb. >> >> I do understand why it's beneficial in various contexts to have them >> compatible, but there are other ways to achieve database agnosticism >> that are probably a much better deal in the long run, e.g. "middleware" >> like ODBC, FireDac, etc. >> >> Regards, >> Kjell >> >> -- >> -- >> Kjell Rilbe >> DataDIA AB >> E-post: kjell.ri...@datadia.se >> Telefon: 08-761 06 55 >> Mobil: 0733-44 24 64 >> > I not assume that IB and FB are the same > I know differences and i know also that i can use odbc, dbexpress, firedac ... > But changing tech from IBX to other take time and ca not be done fast. > If we can change IB to FB also for Boolean this will be very good news and > lower cost - we can put cash spend on IB to migrate projects to new platforms > Firebird is free software. You are always free to build and distribute your own fbclient, 'compatible' with interbase - if you like dangerous solutions... -- DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] yesterday commit on fb3 broke something ?
On 11/27/2013 12:03 PM, Philippe Makowski wrote: > Le 26/11/2013 14:57, Alex Peshkoff a écrit : >> Philippe, I've changed ISC_PASSWD to ISC_PASSWORD in SYSDBA.password, >> but now not 100% sure was it good change or not. > no it is not good > the problem wasn't there at all > the problem was with another change, > but as I said yesterday, it was solved > > so please revert > will do -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] firebird fails to build if "-Werror=format-security" flag is used.
On 12/05/2013 08:31 PM, Jim Starkey wrote: > For what it's worth, gpre was my very first C program in 1984. It was > written on a 16 bit Unix running on a DEC Pro/350 (a pdp-11). It's > coming up on its 30th birthday next September, so be kind to it. It's > probably among the oldest pieces of working software on the planet. Definitely. But here was discussed only one thing - how to fix it's code better to make it match today requirements. > On 12/5/2013 3:28 AM, Alex Peshkoff wrote: > >> Not to mention we try to avoid preprocessor Probably this caused misunderstanding? But I've meant use of C preprocessor in FB's source code, not gpre. >> where possible and even from >> this POV adding new macro is bad idea. -- Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] firebird2.5.2 and ICU 52.1
On 12/13/2013 01:14 AM, Damyan Ivanov wrote: > On a related note, I wonder if there is a way to convince firebird to > work with collations created with different (and no longer available) > version of ICU. This would minimise the efforts when upgrading ICU. With no longer available version of ICU - no. How can one work with missing software? > > Right now, one is required to backup all databases before upgrading, > then restore them after upgrading. With big databases, this is very > time consuming. We had a plan to add something like RECREATE INTL INDICES command, but it's not ready yet. > I imagine that a way (even a hack) that allows working with existing > databases after upgrading ICU would make it possible to replace the > backup+restore procedure with rebuilding of indices on columns with > Unicode collations. Is this realistic at all? > Well, I've written my answer right before reading your eMail to the end :-) -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] firebird2.5.2 and ICU 52.1
On 12/13/2013 02:42 PM, Dimitry Sibiryakov wrote: > 13.12.2013 6:01, Alex wrote: >> With no longer available version of ICU - no. How can one work with >> missing software? > Backup works with data only, not indices. Is data in columns affected by > ICU version as > well? It was explained here many times. Exact ICU version is needed to produce correct index keys - and this makes any index-related operation impossible when such ICU version is missing. gbak can work with missing ICU library cause it does not perform index ops on user's indices. Therefore one can upgrade ICU version and after it perform backup-restore cycle without ICU of old version. May be I did not understand initial question correctly... Sorry in that case. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] firebird2.5.2 and ICU 52.1
On 12/13/2013 04:30 PM, Damyan Ivanov wrote: > -=| Alex, 13.12.2013 09:01:12 +0400 |=- >> On 12/13/2013 01:14 AM, Damyan Ivanov wrote: >> >>> On a related note, I wonder if there is a way to convince firebird to >>> work with collations created with different (and no longer available) >>> version of ICU. This would minimise the efforts when upgrading ICU. >> With no longer available version of ICU - no. How can one work with >> missing software? > I called it a hack on purpose :) > > Current patch is at > http://anonscm.debian.org/gitweb/?p=pkg-firebird/2.5.git;a=blob;f=debian/patches/ignore-collation-version.patch > > It ignores any collation version mismatches, replacing "COLLATION > UNICODE_CI for CHARACTER SET UTF8 is not installed" error with > a warning in the log ("Ignoring collation version mismatch. Wanted > 58.0.6.48 but will try to work with 58.0.6.50"). > > This gives me the freedom to decouple ICU upgrade from database > backup+restore, at the expense of possible incorrect searches if the > collation of the used characters has changed. > > I realize this is not suitable for inclusion upstream, as it is too > intrusive, replacing "give version X" with "give first available > version". Perhaps it should fall back to the first available version > only after examining all available ICU versions and/or if allowed via > a configuration option. May be better at once add conf option to enable use of rand() to return data and forget DB file at all? At least it can work VERY fast :-( Damyan, there are two probably most worst possible bugs in database software: - silently returned invalid results, - damaged database (cause can easily cause #1 in this list). Be sure - segfault or hang in server is very small problem compared with this. Your patch with great success causes first one - data may be _silently_ (people useally do not read logs) lost when not found in index. Performing backup without ICU version upgrade is already possible, and letting people do some more things is making very bad thing for them. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] isc_spb_sts_table tag
On 12/21/2013 07:06 AM, Claudio Valderrama C. wrote: >> -Original Message- >> From: Alex Peshkoff [mailto:peshk...@mail.ru] >> Sent: Jueves, 19 de Diciembre de 2013 4:32 >>> Again this doesn't work either: >>> >>> fbsvcmgr service_mgr user sysdba password masterkey >> action_get_fb_log >>> but it ought to. >> Really. action_get_ib_log works. Will fix. > And is this item only for the admin or any user? > admin-only log may contain security critical info -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Error FB3 Alpha 2 WIN32
On 12/29/2013 12:45 PM, Norbert wrote: > Dmitry Yemanov a couché sur son écran : >> 29.12.2013 11:46, Norbert wrote: >> >>> yes everything by default and then I changed to try if it changed >>> something but nothing nothing! >>> Where did you get binaries? >>> http://web.firebirdsql.org/download/snapshot_builds/win/3.0/ >> Did you try with ISQL from this package or with other software? >> >> >> Dmitry > gbak ok > dot net/iis6 mode embded ok > > isql, ems and other not ok > Please provide more details - first of all database name passed to attach database. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] [FB3.0.0.30805]: incorrect(?) blr_type for [SEC$USERS].[SEC$ACTIVE]
On 12/29/2013 01:53 PM, Dmitry Kovalenko wrote: > Hi > > Why domain for [SEC$USERS].[SEC$ACTIVE] uses field_type with id: 71 ? > > But not 23 (blr_bool)? > Cause we already have blr_boolean, and when adding code to ini.epp I've typed blr_boolean instead blr_bool. Most surpise that everything around it worked as expected. Will fix next year (I'm not at main box with commitable repositories). Or if someone needs it sooner please: Index: ini.epp === --- ini.epp (revision 58980) +++ ini.epp (working copy) @@ -1331,7 +1331,7 @@ break; case dtype_boolean: - X.RDB$FIELD_TYPE = (int) blr_boolean; + X.RDB$FIELD_TYPE = (int) blr_bool; break; default: A. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] [FB3.0.0.30805]: incorrect(?) blr_type for [SEC$USERS].[SEC$ACTIVE]
On 12/31/2013 03:00 PM, Mark Rotteveel wrote: > On 31-12-2013 09:15, Alex wrote: >> On 12/29/2013 01:53 PM, Dmitry Kovalenko wrote: >>> Hi >>> >>> Why domain for [SEC$USERS].[SEC$ACTIVE] uses field_type with id: 71 ? >>> >>> But not 23 (blr_bool)? >>> >> Cause we already have blr_boolean, and when adding code to ini.epp I've >> typed blr_boolean instead blr_bool. Most surpise that everything around >> it worked as expected. Will fix next year (I'm not at main box with >> commitable repositories). > Out of curiosity: what is the difference between blr_boolean and blr_bool? blr_boolean is a node in execution tree, containing boolean expression blr_bool is datatype Though both are called BLR, they do not share same codes space. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Some aspects of the optimizer hints
On 01/04/2014 12:08 AM, Ann Harrison wrote: > Obviously, > at least to me, if you've got to sort the data, you have to read all > of it. > Furthermore, despite the everyone's instinct, it's a good deal faster in > the general case to read a table in an optimal order and sort the data > in memory that to read the data in index order - random order relative > to storage. > Ann, from server POV you are definitely right. But when talking about ways to get first record from server as fast as possible we care about not server-only performance, but about performance of overall client-server system. Let me illustrate with a sample. We have very simple table: create table MOVIES (NAME varchar(255) primary key, COMMENTS varchar(8192), ISO_IMAGE blob); And want to run such a query: select * from MOVIES where COMMENTS like '%yacht%' order by NAME; Two plans are possible: PLAN SORT (MOVIES NATURAL) PLAN (MOVIES ORDER RDB$PRIMARY1) Cause we need to scan all the table first plan appears to be better - it requires less disk operations even taking into an account sort after scanning all the table. But overall throughput depends upon what are we going to do with ISO_IMAGE at client side. Imagine we want to burn DVDs with all images (and have the set of DVDs sorted after burning). In that case we should better start burning images as soon as possible, and it's likely that second plan, being non-optimal for server, will fit better this requirement and make it possible to complete the whole operation a bit faster. Even with a lot of extra reads from disk server will sooner of all find second record faster that DVD writer finishes with the first image. Certainly this does not mean that for all queries, containing blobs, natural scan should not be used :-) Even with this example we can find a lot of scenarios at the client side when first plan will work better. And here we get probably main result - it's absolutely impossible to predict at server side how returned data will be used by client. Therefore I agree with Dmitry - such a hint to optimizer is required part of SELECT statement if we want to have optimal performance for all the system, not for server only. (Telling true I do not understand why _THIS_ kind of hint is not part of SQL standard - may be people who deal with standard look at the world from server-only POV?) -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Confusing message when security3 is not found
On 01/03/2014 01:47 PM, Claudio Valderrama C. wrote: > Hello, I know security3.fdb is not in place because I'm using the Debug dir: > > F:\fb3dev\fbbuild\firebird30\temp\Win32\Debug\firebird>isql -user sysdba > -pass masterkey > Use CONNECT or CREATE DATABASE to specify a database > SQL> create database 'user.fdb'; > SQL> create user secondary pass 'sec'; > Statement failed, SQLSTATE = 42000 > Dynamic SQL Error > -SQL error code = -104 > -Token unknown - line 1, column 23 > -pass > > I thought we would allow PASS as a shortcut for PASSWORD. Can you provide a sample where shortcuts are present in SQL? It's trivial to add PASS shortcut, but for me it looks like something out of SQL style. > Anyway: > > SQL> create user secondary password 'sec'; > Statement failed, SQLSTATE = 08001 > unsuccessful metadata update > -CREATE USER SECONDARY failed > -I/O error during "CreateFile (open)" operation for file > "F:\fb3dev\fbbuild\firebird30\temp\Win32\Debug\firebird\/security3.fdb" > -Error while trying to open file > -The system cannot find the file specified. > SQL> > > The final part of the path is confusing for the user: > firebird\/security3.fdb > > I don't know if firebird is really looking for > temp/Win32/Debug/firebird//security3.fdb > or only the message contains an extra directory separator. Certainly it's a minor bug. I've tested at linux-only and 2 same separators (//) are merged correctly, but I've forgotten about windows with it's \. A. PS. On linux having >1 separator in the path does not prevent opening the file - Debug/firebird//security3.fdb is correct filename from kernel POV. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Confusing message when security3 is not found
On 01/06/2014 12:49 AM, Ann Harrison wrote: On Sun, Jan 5, 2014 at 3:39 AM, Alex <mailto:peshk...@mail.ru>> wrote: O > > I thought we would allow PASS as a shortcut for PASSWORD. Can you provide a sample where shortcuts are present in SQL? It's trivial to add PASS shortcut, but for me it looks like something out of SQL style. BIN (Binary), DEC (Decimal), CHAR (Character), VARCHAR (Varying Character) NCHAR (National Character) and several others... all relatively old - the newer members of the standards committee must have mastered touch typing. Yes - and probably thats due to I've forgottem about full forms of this keywords. Therefore I see the only one problem with adding shortcut: should it be PAS or PASS? I suppose the original question was raised due to ogten use of -pass as a key in command line. But as for me I typically type -pas. Certainly we can easily support both forms. I just want others mind - is it worth adding some shortcut, and if yes - what? -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrkFirebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Confusing message when security3 is not found
On 01/06/2014 04:51 PM, Adriano dos Santos Fernandes wrote: > On 06/01/2014 10:46, Alex wrote: >> Yes - and probably thats due to I've forgottem about full forms of >> this keywords. >> Therefore I see the only one problem with adding shortcut: should it >> be PAS or PASS? >> I suppose the original question was raised due to ogten use of -pass >> as a key in command line. But as for me I typically type -pas. >> Certainly we can easily support both forms. I just want others mind - >> is it worth adding some shortcut, and if yes - what? >> > I don't think PAS/PASS should be added. > > Thinking this way, we would need any sort of MIDDLENAME, MIDDLE_NAME, > MIDDLE NAME, etc, to satisfy every taste. > Agreed with one small exception - if native english speakers suggest reasonable shortcut it's worth using it. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Some aspects of the optimizer hints
On 01/06/2014 12:41 AM, Ann Harrison wrote: Alex, > Furthermore, despite the everyone's instinct, it's a good deal faster in > the general case to read a table in an optimal order and sort the data > in memory that to read the data in index order - random order relative > to storage. > Ann, from server POV you are definitely right. But when talking about ways to get first record from server as fast as possible we care about not server-only performance, but about performance of overall client-server system. When the server is bogged down running queries inefficiently, the overall system performance does suffer. However, if all you want is the first few records, reading hundreds of thousands and sorting them is wasteful - and hard on the client. That's why Firebird's optimizer handles a restriction on the number of rows to be returned as an optimizer hint to navigate through the index, rather than doing a natural read and sorting the results. It's very bad idea to rely on the current optimizer behavior. I can easily imagine that in a case of constant for number of returned rows future optimizer will take it into an account and if (for example) it's greater than total number of records in MOVIES it can use optimal from server POV plan - SORT instead ORDER. It's like using "tbl.fld + 0 = constant" to avoid use of index, and this is not what may be called stable and portable way of providing hints to optimizer. We have very simple table: create table MOVIES (NAME varchar(255) primary key, COMMENTS varchar(8192), ISO_IMAGE blob); (A good example of the problems with natural primary keys.) Yes certainly - I just did not plan to provide ideal style. Certainly here we can have explicit index instead PK. And want to run such a query: select * from MOVIES where COMMENTS like '%yacht%' order by NAME; Two plans are possible: PLAN SORT (MOVIES NATURAL) PLAN (MOVIES ORDER RDB$PRIMARY1) Right. And if you want to give the optimizer a hint that it should choose the second plan, change the query like this: select first 100 * from MOVIES where COMMENTS like '%yacht% order by NAME; If you think your client may want more than a million rows, increase that number. As far as I know, Firebird's optimizer doesn't do anything clever like trying to guess what part of the table the "first " represents - ask it for the first 1 or the first ten million, it will still choose the navigational path. So ask it for ten times as many records as you expect to find. Probably a bad idea to exceed the size of an int64. Returning to my sample we can provide a number of available empty writable DVDs in DVD changer :) But this does not change the fact that using SQL operators, originally designed for some other purpose, is not a best way to provide optimizer hints. Cause we need to scan all the table first plan appears to be better - it requires less disk operations even taking into an account sort after scanning all the table. But overall throughput depends upon what are we going to do with ISO_IMAGE at client side. Imagine we want to burn DVDs with all images (and have the set of DVDs sorted after burning). Overall throughput also depends on what else is going on with the system - if you've got lots of read queries that are hitting the disk hard, making your burn program wait a few seconds for its first results could improve the performance of the system overall. Certainly. This is what I call a detail which can't be predicted by any optimizer taking into an account server-only aspects. But that's moot. You have the ability to ask for navigational access through the index, if that's what you think you need. If I understand you correctly this is FIRST clause? But this is what I want to avoid... Certainly this does not mean that for all queries, containing blobs, natural scan should not be used :-) And again, for the naive, the blobs aren't accessed until the records are read, qualified by the comment containing 'yacht' - in this case, the non- standard CONTAINING would be better because it is not case sensitive. Certainly - but this is not important fact for a problem we discuss. Ideally here should be used comparison which takes into an account sound produced by word "yacht". Therefore I agree with Dmitry - such a hint to optimizer is required part of SELECT statement if we want to have optimal performance for all the system, not for server only. And I guess I agree also, but think that the hint is already part of Firebird - as either FIRST or LIMIT or ROWS or whatever other silly syntax exists for restricting the number of records returned. Remember, the hint is
Re: [Firebird-devel] Some aspects of the optimizer hints
On 01/06/2014 08:38 PM, Ann Harrison wrote: Dmitry, > Right. And if you want to give the optimizer a hint that it should choose > the second plan, change the query like this: > > select first 100 * from MOVIES where COMMENTS like '%yacht% order > by NAME; > > If you think your client may want more than a million rows, increase > that number. I mentioned this approach in my initial message and it does not look good to me. I treat it as a workaround / hack, not a solution. The FIRST keyword was added to Firebird's SQL in version 1.0 or 1.1 - in 2000 0r 2001, but the use of FIRST in InterBase goes back much further. It was part of GDML - and it's purpose was to signal that the query should be optimized to walk the index (navigate, in the internals) rather than create a bitmap and access records in storage order. There's no reason to limit the number of record a query returns - when you've seen enough, just close itt. The semantic significance of FIRST and its relatives is "I want the first records quickly." So, historically, no, it's neither a workaround nor a hack. Parsing SQL comments ... that sounds like a hack to me. Adding yet another non-standard keyword when one already exists and does what you want doesn't appeal all that much either. So you suggest to use FIRST without number of records? I see almost no problems with this approach - the only small question is weather btyacc can handle such grammar well. Also, there may be (in fact, there are) customers who need the FIRST ROWS strategy being the default one. And rewriting a majority of their queries to include the dummy FIRST clause is not something they can consider seriously. So would you consider a connection option? A transaction option? Or even config file option. Not related with SQL IMHO. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrkFirebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Some aspects of the optimizer hints
On 01/07/2014 01:35 PM, Dmitry Yemanov wrote: > 07.01.2014 12:46, Dmitry Yemanov wrote: >> It *is* related as soon as you need to alter from the default FIRST ROWS >> to custom FIRST ROWS in some particular query. > Read: "custom ALL ROWS", sorry. > > True. I.e. historical form of giving 'FIRST' - only hint is not enough. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Firebird Interbase Database engine hacks or rtfm
On 01/07/2014 01:11 PM, marius adrian popa wrote: > Notes on database security assesment > http://www.slideshare.net/qqlan/firebird-interbase-database-engine-hacks-or-rtfm > I see 2 kinds of samples - mixed DDL/DML statements and use of UDF. It's well known and documented (can't provide a link but as far as I remember it's documented) fact that DDL/DML mix is not what makes firebird behave well. Anyway: $ ./isql employee -u sysdba ## it's fb3 and use of embedded access SQL> set autoddl off; SQL> ALTER DATABASE ADD DIFFERENCE FILE 'filename'; SQL> ALTER DATABASE BEGIN BACKUP; SQL> INSERT INTO country values ('aa', 'bb'); SQL> commit; SQL> select * from country; COUNTRY CURRENCY === == USA Dollar England Pound Canada CdnDlr Switzerland SFranc Japan Yen Italy Euro France Euro Germany Euro Australia ADollar Hong Kong HKDollar Netherlands Euro Belgium Euro Austria Euro FijiFDollar Russia Ruble Romania RLeu aa bb SQL> I see no lockout. And without "set autoddl off" also (certainly) no lockout. What about second sample (calling arbitrary UDF) - yes, it works. But it requires non-default, not-recommended configuration (which is explicitly documented directly in firebird.conf). To change configuration one must be root. And it requires firebird server to run as root, which is also non-default, not-recommended and also requires root access to change default safe way to run. I suppose having root access one can find simpler ways to kill OS at the target box or add new user :) The sample is beautiful and impressive, but non realistic. I.e. on my mind the presentation is about nothing. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Firebird Interbase Database engine hacks or rtfm
On 01/08/2014 07:22 PM, Sergey Mereutsa wrote: > Hello Alex, > > ... skipped ... > > A> I.e. on my mind the presentation is about nothing. > > The presentation is about "If you have armed gun - you can shut your > leg" :) > > I think, the main message idea from Marius is about default security - > i.e. by default FB after installation should not allow > _unprivileged_ user to make shot in his/her legs :) > But all samples provided _do_ require privileged user (sysdba or root) - may be except CREATE DATABASE ':'; Currently everyone can create new DB and become it's DBO. That's what will be changed in fb3 before beta1. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Firebird Interbase Database engine hacks or rtfm
On 01/08/2014 07:34 PM, Mark Rotteveel wrote: > On Wed, 08 Jan 2014 19:13:02 +0400, Alex wrote: >> On 01/07/2014 01:11 PM, marius adrian popa wrote: >>> Notes on database security assesment >>> > http://www.slideshare.net/qqlan/firebird-interbase-database-engine-hacks-or-rtfm >> I see 2 kinds of samples - mixed DDL/DML statements and use of UDF. >> >> It's well known and documented (can't provide a link but as far as I >> remember it's documented) fact that DDL/DML mix is not what makes >> firebird behave well. Anyway: >> >> $ ./isql employee -u sysdba ## it's fb3 and use of embedded access >> SQL> set autoddl off; >> SQL> ALTER DATABASE ADD DIFFERENCE FILE 'filename'; >> SQL> ALTER DATABASE BEGIN BACKUP; >> SQL> INSERT INTO country values ('aa', 'bb'); >> SQL> commit; > ... >> aa bb >> >> SQL> >> >> I see no lockout. And without "set autoddl off" also (certainly) no >> lockout. > I think he means you can create a file anywhere on the file system (ie in > a webserver directory) with a relatively high level of control of what gets > into it. > May be I did not understand what means 'your file is locked'. But anyway - this works only if a webserver directory has write access for user firebird of firebird server runs as root. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] UDF: Is it possible to return NULL instead of empty BLOB?
On 01/10/2014 11:51 AM, Wodzu wrote: > Hi guys, > > I've read all the information about developing UDFs which I could find. I > know that in earlier versions of Firebird it was not possible to pass NULL > parameters. However I am using Firebird 2.5 and I want to return a NULL value > instead of an empty BLOB. I do not want to pass NULLs. Is this possible? > Try to pass parameters and return values by descriptor. Some samples are in fbudf.cpp, your special attention to string2blob. -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Firebird db integration big-endian LibreOffice unable to open little-endian embedded firebird db
On 01/14/2014 12:52 AM, Andrzej Hunt wrote: > Hi All, > > I've been doing some of the work on using the backup format for LO: > > Unfortunately we have no choice but to use the backup format as we > have to have to be endian-agnostic. However speed shouldn't be too > huge an issue as I suspect most users (when using a database embedded > in a .odb) won't have huge databases -- for huge databases using an external > database (either .fdb file or full server) would probably be reccomended > in any > case. > > For login details: we already use isc_dpb_trusted_auth, but only when > connecting > to a db: for the services manager Why do you need services manager when working in embedded mode? To be precise - please describe exactly what do you want from services, and I hope to be able to help you doing it. A. PS. Though Ann's suggestion seem to be much better, I'm afraid at least in nearest release you will have to use gbak. Is it possible to store both DB and gbak in order to avoid restore when endianess is the same? IMHO it's at least 99.99% of usage. PPS. For small databases gbak file is many times smaller than appropriate fdb (a lot of almost empty pages for system relations are not stored), therefore probably an option speed/size can be useful. -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] SYSDBA (Chicken/egg)
On 02/28/2014 12:06 AM, Mark Rotteveel wrote: > On 27-2-2014 19:49, Helen Borrie wrote: >> At 12:59 a.m. 28/02/2014, Mark Rotteveel wrote: >>> On Thu, 27 Feb 2014 21:32:20 +1300, Helen Borrie >>> wrote: With Fb 3 alpha 2 on Windows, is there any way to get SYSDBA into the security database, other than installing everything on Linux first, initializing it there and file-copying the security db to the Windows >>> box? >>> >>> As far as I am aware the installer creates the SYSDBA account. Did you by >>> any chance require legacy auth, but didn't enable it in the installer, or >>> do you use a zip-kit? >> I didn't enable it in the installer (I don't recall seeing that option) but >> I did disable Wirecrypt in firebird.conf. Anyway, Alex's initialization >> solution worked, just like in Linux, so all is well. See also my response >> to Alex's message. > If you didn't enable legacy auth in the installer, then it only creates > the 'new auth' sysdba account. Legacy SYSDBA is present in security database when it's installed. With masterke password - according to legacy rules :) -- Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis & security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] curTime() throws division by zero
On 02/27/2014 09:32 PM, Dimitry Sibiryakov wrote: Hello, All. Am I alone who is getting division by zero from masterImplementation.cpp:curTime() during building from today's sources? I have no problems, but after review that code seems to be dangerous from zerodivide POV. Please try this patch - if it helps please commit it, I have a lot of other changes in MasterImplementation.cpp in my copy of the tree. Index: MasterImplementation.cpp === --- MasterImplementation.cpp (revision 59204) +++ MasterImplementation.cpp (working copy) @@ -527,7 +527,7 @@ TimerDelay curTime() { - return fb_utils::query_performance_counter() / (fb_utils::query_performance_frequency() / 100); + return 100 * fb_utils::query_performance_counter() / fb_utils::query_performance_frequency(); } TimerEntry* getTimer(ITimer* timer) -- Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis & security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrkFirebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] SYSDBA (Chicken/egg)
On 02/28/2014 11:38 AM, Helen Borrie wrote: > At 08:15 p.m. 28/02/2014, Alex wrote: >> [Mark Rotteveel] >>> If you didn't enable legacy auth in the installer, then it only creates >>> the 'new auth' sysdba account. >> Legacy SYSDBA is present in security database when it's installed. With >> masterke password - according to legacy rules :) > So...then...the sec$users query does not show legacy users at all? (No sign > of user SYSDBA in the query result prior to CREATE USER). This will be fixed in beta1. > Helen > p.s. I'm trying to write an epic poem about attaching to databases under Fb3. > ;-) Don't hurry - we also need mapping of users between different security databases and from OS to current_user/current_role. ;) I'm working on it now. -- Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis & security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] curTime() throws division by zero
On 02/28/2014 03:21 PM, Dimitry Sibiryakov wrote: > 28.02.2014 8:39, Alex wrote: >> Please try this patch - if it helps please commit it > It works at first glance, but I'm afraid of possible integer overflow. > Wouldn't be > better to use floating-point operations and then cast to integer before > return?.. > May be better use INT64? It should be big enough here. -- Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis & security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] curTime() throws division by zero
On 02/28/2014 03:36 PM, Dimitry Sibiryakov wrote: > 28.02.2014 12:33, Alex wrote: >> May be better use INT64? >> It should be big enough here. > Performance counters already use SINT64. Perhaps, it is not for nothing. > In that case I'm not afraid of overflow here. Even after * 100. -- Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis & security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Build failed
On 02/28/2014 04:20 PM, Dimitry Sibiryakov wrote: > I'm trying to build Win32 release build on Windows 8 64 bits using MSVC > 2010 Express 32 > bits. > > 12>ClCompile: > 12> UdrEngine.cpp > 12>..\..\..\src\plugins\udr_engine\UdrEngine.cpp(418): error C2375: > 'Firebird::Udr::fbUdrRegFunction' : redefinition; different linkage > 12> c:\users\sd\my > documents\firebird\src\include\firebird\./UdrEngine.h(68) : > see declaration of 'Firebird::Udr::fbUdrRegFunction' > 12>..\..\..\src\plugins\udr_engine\UdrEngine.cpp(429): error C2375: > 'Firebird::Udr::fbUdrRegProcedure' : redefinition; different linkage > 12> c:\users\sd\my > documents\firebird\src\include\firebird\./UdrEngine.h(69) : > see declaration of 'Firebird::Udr::fbUdrRegProcedure' > 12>..\..\..\src\plugins\udr_engine\UdrEngine.cpp(440): error C2375: > 'Firebird::Udr::fbUdrRegTrigger' : redefinition; different linkage > 12> c:\users\sd\my > documents\firebird\src\include\firebird\./UdrEngine.h(70) : > see declaration of 'Firebird::Udr::fbUdrRegTrigger' > 12> > 12>Build FAILED. > > What does it mean? > That means that different OSes have "slightly" different requirements for external entry points. Doing port for Mac we have broken windows. Try to change all 3 in UdrEngine.h from extern "C" void fbUdrReg.. to extern "C" void ISC_EXPORT fbUdrReg -- Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis & security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] curTime() throws division by zero
On 02/28/2014 04:33 PM, Dimitry Sibiryakov wrote: > 28.02.2014 13:30, Alex wrote: >> In that case I'm not afraid of overflow here. Even after * 100. > Ok, let Dmitry or Vlad commit your patch then - I have no rights. > No problems - will do it on Monday. -- Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis & security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Build failed
On 02/28/2014 04:59 PM, Dimitry Sibiryakov wrote: > 28.02.2014 13:41, Alex wrote: >> Try to change all 3 in UdrEngine.h from >> extern "C" void fbUdrReg.. >> to >> extern "C" void ISC_EXPORT fbUdrReg > New API still continue old hell with stdcall?.. That's not part of interface. Telling true I never used to have a close look at why do UDR library requires registering each entry point unlike UDF. -- Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis & security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] New API and constants
On 03/05/2014 05:46 AM, Adriano dos Santos Fernandes wrote: > Hi! > > Only at Plugin.h, we have two case conventions for constants. > > PluginType constants uses a convention I don't remember to see before, > example: FirstNonLibPlugin. That definitely requires cleanup. > DirType uses ALL_CAPS style. > > Also one starts in 1 and another starts in 0. > > And if we go to Provider.h IStatement, specific constants are declared > inside the container class, not as a namespace. I surely prefer this > when possible, leaving namespace for generic constants. > > OK, I see no problems using this way. -- Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] New API and virtual functions
On 03/05/2014 05:55 AM, Adriano dos Santos Fernandes wrote: > Accordingly to how new API works, where one can get a version and the > virtual table is filled with possible non-existent methods, classes like > TraceParamsImpl could not insert new virtual functions. > Yes, and it was clear since the most beginning. -- Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] isc_random
On 03/05/2014 12:30 AM, Claudio Valderrama C. wrote: > People, what's the opinion on exceptions that use isc_ramdom to send > hardcoded messages? > Should we use isc_random for most of the future messages or should we > register more text in the messages db and lower the number of hardcoded > messages? > Being realistic, apparently nobody has bothered to create a source file with > error text translated to other language. We should create new error descriptions in messages DB. (When I use isc_random in FB3, I do it temporarily - when code is going to get stabilized, I will make a pass converting them to specific error codes.) -- Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] IMessageMetadata::getLength() - const?
On 03/09/2014 03:43 PM, Dimitry Sibiryakov wrote: > Hello, All. > > What's the purpose for IMessageMetadata::getLength() method to be > declared as const? > Such declaration makes impossible to calculate length on demand and cache the > result for > future calls. Implementations have to either calculate it on every call, or > do that in > other places which makes implementation unstable or inefficient. > For me it looks like historical artifact from some old implementation. -- Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] MySQL versus Firebird
On 03/10/2014 11:00 AM, marius adrian popa wrote: > I decided to compare the current versions of MySQL 5.6 and Firebird > SQL 2.5. I only looked at features that end users can see, without > benchmarking. http://ocelot.ca/blog/blog/2014/03/09/354/ Is it only me? The server at ocelot.ca is taking too long to respond. The site could be temporarily unavailable or too busy. Try again in a few moments. -- Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] MySQL versus Firebird
On 03/11/2014 12:22 PM, Dmitry Yemanov wrote: > 11.03.2014 09:59, marius adrian popa wrote: > >> I needed comments from developers also > You'd better ask questions then. I don't care to comment what unknown > people write about Firebird over the internet. +1 -- Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] UDF's in Firebird 3.0
On 03/14/2014 01:22 AM, Weverton Gomes wrote: Win 7 Pro 32 bits I can't help with windows UDFs - but pretty sure that if you place DLL to accessible place and send the link here our windows guys will take a look at the problem. I have just started testing FB 3.0 Alpha 2 (32 bits) and I'm getting in trouble using the same UDF's I already use in FB 2.5. I'm getting the known message: "Invalid token. invalid request BLR at offset 35. function ? is not defined. module name or entrypoint could not be found." Does anyone know if anything about this has been changed in FB 3.0?? - UDF should work. What OS do you use? -- Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTechFirebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Y-classes trickery
On 03/18/2014 01:26 PM, Dimitry Sibiryakov wrote: > Back to the question: > > 17.03.2014 12:30, Alex Peshkoff wrote: >>> Besides, storing reference to object already increment its >>>> usage counter, so nobody can free the object during wrapper's life time. >> But using something like commit for transaction can nullify next pointer. > next is a reference counting pointer, it cannot be nullified as long as > Y-object is > alive. So, what is the point to use YEntry.next() in Y-object methods? > Let me talk about attachment - it's using same approach but sample is more realistic. IAttachment* userHandle points to class YAttachment, containing (among others) reference counter and reference pointer to IAttachment next. Let's take into an account that on successful detach next is nullified, and if other references are present (i.e. YAttachment is not destroyed due to reference counter > 0) any attempt to use it should raise 'invalid handle' error. Let N (where N > 1) threads to work with this attachment (i.e. reference counter is N). Thread T1 wants to execute statement - it calls YAttachment::execute, which checks for non-null next pointer and (at this time T1 is swapped out, T2 calls detach, next is nullified ...) invokes next function: next->execute(...). And gets segfault. Absolutely without mutex this is not solvable, but we want to keep it locked for as small time as possible. Therefore under locked mutex we copy next to local variable, addRef() to it, unlock mutex (you see it's locked for a very small timeslice) and later work with this variable. In the sample above we will invoke next->execute() and get 'invalid handle' message from next provider. IMHO it's better than segfault. -- Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Y-classes trickery
On 03/18/2014 04:11 PM, Dimitry Sibiryakov wrote: > 18.03.2014 12:47, Alex wrote: >> IAttachment* userHandle points to class YAttachment, containing (among >> others) reference counter and reference pointer to IAttachment next. >> Let's take into an account that on successful detach next is nullified, >> and if other references are present (i.e. YAttachment is not destroyed >> due to reference counter > 0) any attempt to use it should raise >> 'invalid handle' error. >> >> Let N (where N > 1) threads to work with this attachment (i.e. reference >> counter is N). Thread T1 wants to execute statement - it calls >> YAttachment::execute, which checks for non-null next pointer and (at >> this time T1 is swapped out, T2 calls detach, next is nullified ...) > At first, is new API reenterable? I.e. can, say, YAttachment.execute() be > called from > second thread while the same call from first thread is not finished? Old API > wasn't > reenterable that's why it required mutex to be hold during whole call time. > The same is > about network protocol: you cannot send new request before have got response > for previous. yvalve is reenterable, all the rest depends upon providers we must start with something >> invokes next function: next->execute(...). And gets segfault. Absolutely >> without mutex this is not solvable, but we want to keep it locked for as >> small time as possible. Therefore under locked mutex we copy next to >> local variable, addRef() to it, unlock mutex (you see it's locked for a >> very small timeslice) and later work with this variable. In the sample >> above we will invoke next->execute() and get 'invalid handle' message >> from next provider. IMHO it's better than segfault. > But it is build on fact that next is nullified on detach. If remove this > nullification > and always get 'invalid handle' from the next provider, there will be no need > for mutex > and extra wrappers at all. What is wrong to let next IAttachment to live a > bit longer? > The main reason is an ability to delete provider's object better sooner than later. - yvalve object is tiny and consumes very low resources - provider's object may be relatively big - and as a last '+' we can unload provider after nullifying next pointer -- Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Gpre and DYN
On 03/18/2014 08:52 PM, Paul Beach wrote: >> On 18/03/2014 13:09, Claudio Valderrama C. wrote: >>> People, GPRE's cmd.cpp and sql.cpp generate a lot of DYN commands. >>> FB3 doesn't understand DYN. What should we do, disable >> those places in GPRE >>> with an error message? >>> >>> >> Why the engine error message about unsupported DYN is not sufficient? > < the DDL doesn't work when you compile the preprocessed file with the rest of > your program and run it.>> > > Agreed. Steve is not the only user out there still relying/using on gpre. Main idea was to be able to generate programs for older versions. -- Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Y-classes trickery
On 03/18/2014 06:58 PM, Jim Starkey wrote: > Do you really use a mutex to when walking a structure Why not a > read/write lock? With a mutex, readers block readers, which is a total > waste of cycles, thread stalls, thread switches, etc. > That mutex is also needed to increment thread enter count for attachment. Certainly, I can use rwlock and atomic counter, therefore getting non-blocking combination, but that means one more atomic operation. Taking into an account that for each yvalve enter mutex is locked for a very small time slice and it's not global, it's per-attachment, I estimate possibility of conflict on it as very little. Suppose saving extra atomic operation per each yvalve enter is better. -- Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Y-classes trickery
On 03/18/2014 08:15 PM, Dimitry Sibiryakov wrote: > 18.03.2014 13:30, Alex wrote: >> The main reason is an ability to delete provider's object better sooner >> than later. >> - yvalve object is tiny and consumes very low resources >> - provider's object may be relatively big > But they both are on client side. As you said, client's memory > consumption is client's > problem. Resources used by provider are not only memory. It's opened files, locks, network connections, may be something else. >> - and as a last '+' we can unload provider after nullifying next pointer > It is rather '-'. Consider application that attach to a db, do something > and then > detach and start again in the loop. It is not wise to unload-load provider on > each loop. > Plugins are unloaded after timeout, i.e. this is not a problem. -- Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Y-classes trickery
And Dmitry thank you for enforcing review of that code. Looks like I've found races during that review. -- Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Gpre and DYN
On 03/19/2014 10:40 AM, Claudio Valderrama C. wrote: >> -Original Message- >> From: Alex [mailto:peshk...@mail.ru] >> Sent: Miércoles, 19 de Marzo de 2014 1:16 >> Adriano: >>>> Why the engine error message about unsupported DYN is not >> sufficient? >> >> Steve: >>> <> and discovering that >>> the DDL doesn't work when you compile the preprocessed file >> with the rest of >>> your program and run it.>> >>> >> Paul: >>> Agreed. Steve is not the only user out there still >> relying/using on gpre. >> >> Main idea was to be able to generate programs for older versions. > Then gpre should check the server version and if it's FB3 or newer, reject > DDL that produces DYN. Fortunately, the check can be done indirectly through > the ODS, since FB3 only uses ODS12. May be we better spend that time generating SQL DDL instead DYN? This is useful at least to make sure that we do have all required capabilities at SQL level and did not produce regressions dropping DYN support. > While we are at it, I wonder if isql v3 can connect to older servers. At > least I tried with isql v3 and server v2.5 running and this TCP path > > isql > localhost:F:\fb2dev\fbbuild\firebird25\temp\Win32\Debug\firebird\bin\src.fdb > -user sysdba -pass masterkey > > but had no success. If isql v3 is only for FB3, then checks like this in > isql > if (isqlGlob.major_ods < ODS_VERSION11) > return; > > are obsolete and can be deleted. I tried the same TCP path using isql v2.5 > to server v2.5 and got no problems, so I assume it's not my machine. Claudio, absolutely no ideas why you have a problem here. $ ./isql -user sysdba -pas masterkey localhost:employee Database: localhost:employee, User: sysdba SQL> show version; ISQL Version: LI-T3.0.0.30967 Firebird 3.0 Alpha 2 Server version: Firebird/Linux/AMD/Intel/x64 (access method), version "LI-V2.5.3.26735 Firebird 2.5" Firebird/Linux/AMD/Intel/x64 (remote server), version "LI-V2.5.3.26735 Firebird 2.5/tcp (ggbb)/P12" Firebird/Linux/AMD/Intel/x64 (remote interface), version "LI-T3.0.0.30977 Firebird 3.0 Alpha 2/tcp (ggbb)/P12" on disk structure version 11.2 SQL> select * from country; COUNTRY CURRENCY === == USA Dollar England Pound Canada CdnDlr Switzerland SFranc Japan Yen Italy Lira France FFranc Germany D-Mark Australia ADollar Hong Kong HKDollar Netherlands Guilder Belgium BFranc Austria Schilling Fiji FDollar SQL> -- Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] User mapping changes
On 04/08/2014 11:41 PM, Leyne, Sean wrote: > >> Alex et al, >> >> May I ask to rethink namings, please? Things like RDB$MAP or >> /jrd/Mapping.cpp sound very confusing. What is mapped to what? Maybe >> Mapping.cpp is about memory mapped files? >> >> I'd suggest at least RDB$USER_MAP and UserMapping.cpp instead. Maybe >> someone else will have a better suggestion. I see no problems with it. But lets wait a few days - may be someone suggests something better. > What is the object supposed to represent? (to make sure everyone is one the > same page) It's a tool to map various names received from auth plugin (first of all logon name, certainly) to user and role in database. > What properties/fields will be exposed? There is some doc: doc/sql.extensions/README.mapping.html Please see it first, I'l be glad to answer any questions next. -- Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] classes\InternalMessageBuffer.h
On 04/09/2014 10:14 AM, Claudio Valderrama C. wrote: > Folks, sorry for nitpicking, but I don't like this alias in > classes\InternalMessageBuffer.h: > > typedef Array Buffer; // May be it will become a class in the future, > but now it is just a plain array > > because "Buffer" is a name too general. It's not in a cpp, it's in a header > included in other places. > Will move it into yvalve. -- Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] isql v3 with older servers
On 04/15/2014 09:49 PM, Dmitry Yemanov wrote: > 15.04.2014 21:30, Dimitry Sibiryakov wrote: > >>> If show.epp/extract.epp is cleaned up to support v3.0 / ODS12 only, then >>> requesting objects existing in v2.0 / ODS11 may fail. This is the whole >>> point of this discussion. >> Do anybody have examples of what will fail and how?.. > Supporting v3 / ODS12 *only* (cleaned up unrelated code) may mean > treating rdb$relation_type / rdb$context_type / rdb$legacy_flag / etc as > mandatory, this is not going to work with older versions (either error > or NULL will be returned thus breaking the metadata handling algorithms). > > If we track NULLs there and fall back into some other algorithms to get > the info, this means we *do* support older versions via code duplication > (or complication). I.e. we will have to have some code like this: if (isqlGlob.major_ods >= ODS_VERSION12) { ... } On my mind that complication is not too hard to have. Certainly we should support old servers. -- Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] New Feature ? Merge records referenced by FK
On 04/26/2014 08:16 PM, Leyne, Sean wrote: > >> I regularly find myself having to merge two (or more) records referenced by >> numerous foreign keys... resulting in having to update many tables to >> perform this merge. I would find it really useful if there was (and maybe >> there already is and I just didn't found it) a way to do this in one update >> (performing the cascade). >> >> If I am not the only one who would consider this useful, I will gladly add a >> ticket for this... I just didn't want to "pollute" the tracker with >> something I >> would be the only one finding it useful. >> >> Example : Table Patient with a sequence ID often has duplicate (after two >> clinics merge or simply data entry error) but has numerous dependant tables >> referencing this ID. > I don't think that this is a feature that should be considered. > > There are existing ways to resolve this: > > 1- Rethink your schema, you could treat the "Patient" table as an "Clinic > Patient/Alias" table and define a separate "Master Patient" to which each > "Clinic Patient/Alias" entry would refer to. In this way you only have 1 > level of entries to update. > > 2- create SPs which perform the required updates, based on coded rules for > each column/FK. Yes, this requires that you create/maintain the SPs but you > are in control of the operation/scope. > > 3- create an SP which uses system tables to navigate the schema to follow the > FK relationships, and performs the necessary updates. The SP would need the > name of the master table to start from, the name of the column to be updated, > the original key value and the new key value. Sean, certainly it's possible to replace almost any of higher than plain select/insert/update/delete SQL operators with some SP (including MERGE itself). Certainly as a replacement of missing operators it's a solution. But somewhy people like to have things like group by, window functions, merge, etc. built-in. A case described here seems to realistic and widely used in development. I.e. I would like to say yes, it's good suggestion. -- "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Planning the post v3 development
On 04/28/2014 06:29 PM, Carlos H. Cantu wrote: > 5) An embedded Firebird version for Android (even if only "basic" > server features could be available): > http://tracker.firebirdsql.org/browse/CORE-3885 Why do you treat it as post-v3? I plan to activate work with Android port after beta1. -- "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Planning the post v3 development
On 04/28/2014 09:59 PM, Dmitry Yemanov wrote: >> A scheduler for firebird would totally eliminate my own use of custom >> applications tied to database events/time events. > Architecturally, Firebird database is not active without user > connections. This slightly changes with the LINGER support, but not so > much. So the question is who should be waiting for the timer events when > nobody is connected. And if it should be the server's (not the engine's) > feature, then what to do with the embedded setup? We may use OS native scheduler as timer with firebird implementing SQL interface to control it. This will work for any kind of setup, including embedded. The disadvantages are that timers get out of transaction control and we will need 2 absolutely different implementations - posix and windows. -- "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Planning the post v3 development
On 04/29/2014 12:03 PM, Vlad Khorsun wrote: >>> I know people will feel outraged with my opinion, but anyway: make DDL >>> operations atomic and immediate. > This is the "Oracle way". > >> Atomic and immediate means autocommitted or always executed in a >> separate (e.g. system) transaction? > I have strong opinion that system transaction must be read-only. > One exception - when we need to reflect in system tables changes in underlying file system. I mean first of all additional files (like shadows). Here automatic rollback of user transaction may play bad things, i.e. loose sync between system table and file system. -- "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Planning the post v3 development
On 04/29/2014 12:49 PM, Dimitry Sibiryakov wrote: >> And reimplement the metadata cache to become two-level - global and >> transaction-wise, with objects in the latter overriding objects in the >> former. > May be stop separate metadata cache at all and use ordinary data cache > for reading > system tables directly every time. And have prepare time increased many times... Not an option due to performance reasons. -- "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Detencting end in restore using isc_info_svc_stdin
On 13.01.2015 15:30, Jiří Činčura wrote: > Hi *, > > When I'm doing restore using service_mgr and isc_info_svc_stdin. I'm facing > some issue, but I don't know what's wrong. > > My backup file is 13824 bytes. When I query Firebird server it asks for 8k > data (aka file will be sent in two chunks). > > My first query contains only isc_info_svc_stdin (not isc_info_svc_line, I > don't want to get progress messages back) and I get 8k as a response. > Then I prepare the data and query again, this time with isc_info_svc_line and > the data in SPB. > The server responds with another 8k request. So send 5632 bytes I have left. > Now the server responds with length 0. > > Now because I've sent whole file and there are no messages (no > isc_info_svc_line in query, see above) and length is 0, I just disconnect > (op_service_detach, op_disconnect). But this leaves the restore incomplete. > Of course when I delay the disconnect few ms, it's fine. > > What else should I wait for? Looking at fbsvcmgr I see in printInfo just if > (stdinRq > 0) check. Basically the same. > Jiri, when working with services items isc_info_svc_line, isc_info_svc_to_eof and isc_info_svc_get_users (choosing appropriate item is service type dependent) also work as kind of progress / completion indicator. To be sure that service thread finished it's operation you must get empty reply to request for data from service, not accompanied with isc_info_truncated / isc_info_svc_timeout / isc_info_data_not_ready. And yes, certainly getting non-zero reply to isc_info_svc_stdin also means that service is active, but that's not single condition. For example, server may read all gbak data from client and proceed with indexes creation for a rather long time not asking for more data. -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Using of interfaces after last changes
On 23.01.2015 18:52, Dimitry Sibiryakov wrote: > Program that compiled well before recent changes now produce errors: > >> firebird\src\include\firebird\IdlFbInterfaces.h(564): error C2039: >> 'checkException' : is not a member of 'Firebird::IStatus' >>firebird\src\include\firebird\IdlFbInterfaces.h(198) : see >> declaration of 'Firebird::IStatus' >>..\..\..\src\plugins\fbrepl\fbrepl.cpp(87) : see reference to >> function template instantiation 'Firebird::IConfigEntry >> *Firebird::IConfig::find(StatusType *,const char *)' >> being compiled >>with >>[ >>StatusType=Firebird::IStatus >>] >> firebird\src\include\firebird\IdlFbInterfaces.h(564): error C3861: >> 'checkException': identifier not found > How the interfaces are supposed to be used now? > The best way (from c++) is to use IStatus wrapper that throws exceptions. Interface.h contains class CheckStatusWrapper that throws FbException. Looking at it one can trivially write his own class if he needs other type to be thrown. #include #include using namespace Firebird; static IMaster* master = fb_get_master_interface(); int main() { CheckStatusWrapper st(master->getStatus()); // declare pointers to required interfaces IProvider* prov = NULL; IAttachment* att = NULL; try { prov = master->getDispatcher(); att = prov->attachDatabase(&st, "WHERE_GDB:test2.gdb", 0, NULL); // and so on... att->detach(&st); } catch (const FbException& error) { isc_print_status(error.getStatus()->getErrors()); return 1; } return 0; } Pay attention that you need not add check status manually after each call - CheckStatusWrapper does it for you. -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Using of interfaces after last changes
On 23.01.2015 19:30, Adriano dos Santos Fernandes wrote: > On 23/01/2015 14:22, Alex wrote: >> The best way (from c++) is to use IStatus wrapper that throws >> exceptions. Interface.h contains class CheckStatusWrapper that throws >> FbException. > ... >> Pay attention that you need not add check status manually after each call - >> CheckStatusWrapper does it for you. >> >> > Just some corrections. > > CheckStatusWrapper leaves the need to check errors for the caller. > > ThrowStatusWrapper throws FbException. Ahh - I need to fix fbtcs :) -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Using of interfaces after last changes
On 23.01.2015 19:43, Adriano dos Santos Fernandes wrote: > On 23/01/2015 14:26, Dimitry Sibiryakov wrote: >> 23.01.2015 17:23, Adriano dos Santos Fernandes wrote: >>> The wrappers exists so you can use an master->getStatus() instance. >> I don't need to get status from master because I receive IStatus >> interface from inside >> of the engine as a function's parameter. I don't care what type is it >> because I just use >> it to return error conditions back to engine. >> > So you do like Alex demonstrated, replacing master->getStatus() by your > IStatus instance variable. > > But note, if you're writing plugins (i.e., interface implementations), > you should tie your implementation to your IStatus specialization. Pay attention to the second parameter in *Impl template class PluginModule : public IPluginModuleImpl It makes a parameter of functions you need to implement not plain IStatus* but CheckStatusWrapper*. Like this: void DbCrypt::setKey(CheckStatusWrapper* status, unsigned int length, IKeyHolderPlugin** sources) { if (key != 0) return; IConfig* def = config->getDefaultConfig(status); if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS) return; ... (it's from examples/dbcrypt/DbCrypt.cpp) > Firebird currently does it with CheckStatusWrapper because the checks > precludes the new implementation. > > Also look in fbstuff. It implements an IEvent: > https://github.com/asfernandes/fbstuff/blob/master/src/test/v3api/EventsTest.cpp -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Using of interfaces after last changes
On 23.01.2015 19:49, Dimitry Sibiryakov wrote: > #include "firebird/Interface.h" > > void foo(IStatus* status) > { > ISC_STATUS err[] = {isc_arg_gds, isc_random, isc_arg_string, > (ISC_STATUS)(intptr_t) "Shit > happened"}; > status->setErrors2(FB_NELEM(err), err); > } #include using namespace Firebird; void foo(IStatus* status) { ISC_STATUS err[] = {isc_arg_gds, isc_random, isc_arg_string, (ISC_STATUS)(intptr_t) "Shit happened"}; status->setErrors2(sizeof(err) / sizeof(err[0]), err); } -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Using of interfaces after last changes
On 23.01.2015 20:08, Dimitry Sibiryakov wrote: > 23.01.2015 17:50, Alex wrote: >> Pay attention to the second parameter in *Impl template >> class PluginModule : public IPluginModuleImpl> CheckStatusWrapper> >> >> It makes a parameter of functions you need to implement not plain >> IStatus* but CheckStatusWrapper*. > What will happen if instance of ThrowStatusWrapper will be passed to > plugin library > compiled with incompatible exception model and then passed back to engine as > is? I.e. > something like that: > > void foo(CheckStatusWrapper* status, IAttachment* att, ITransaction* tra) > { > IBlob* blob(att->openBlob( status, tra, v, 0, NULL)); > if (status->getStatus() & status->FB_HAS_ERRORS) > { > return; > } > } > No problems - that will work. Between modules is anyway passed plain IStatus, wrapper is created from it right after control flows enters the module. -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Using of interfaces after last changes
On 23.01.2015 20:20, Dimitry Sibiryakov wrote: > 23.01.2015 18:16, Alex wrote: >>> void foo(CheckStatusWrapper* status, IAttachment* att, ITransaction* tra) >>>> { >>>>IBlob* blob(att->openBlob( status, tra, v, 0, NULL)); >>>>if (status->getStatus() & status->FB_HAS_ERRORS) >>>>{ >>>>return; >>>>} >>>> } >>>> >> No problems - that will work. Between modules is anyway passed plain >> IStatus, wrapper is created from it right after control flows enters the >> module. > Why code above needs to create a wrapper at all? > Code above need not create a wrapper - it gets ready StatusWrapper pointer as parameter. -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet 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:47, Dimitry Sibiryakov пишет: > Hello, All. > > Theoretical question: must every connection provide a valid key, or first > connection > unlock the database for everyone? > можно сделать и так и сяк - определяется holder-ом (я сегодня почти не на раюоте завтра постараюсь подробней написать) -- 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:18, Leyne, Sean пишет: >> Theoretical question: must every connection provide a valid key, or first >> connection unlock the database for everyone? > Why should the **connection** provide the key? > > The engine should be able to find/validate the key on its own, when the > database file is _opened_. This would mean that for SS and SC the key would > be validated only once, for Classic on each connection (since each instance > opens the database) > > The connection is simply asking to access the database... > This depends upon crypt key holder plugin. Even in SS it may be written in a way forcing each connection to provide valid key (this ensures no connections from std tools to database with restricted information). Even in CS it may be written in a way when first connection with valid key opens access for all others (using shared memory). -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Reference counting and dumb pointers
17.11.2015 18:11, Dimitry Sibiryakov пишет: > Hello, All. > > A typical piece of code: > >> // do not assign cryptPlugin directly before key init complete >> IDbCryptPlugin* p = cryptControl.plugin(); >> keyHolderPlugins.init(p); >> cryptPlugin = p; >> cryptPlugin->addRef(); > AFAIU, if call of keyHolderPlugins.init() throw anything, memory will > leak because p is > a dumb pointer. > Call of cryptPlugin->addRef() will bring the counter to two and the > plugin will never > be released. > > What have I missed? > Lifetime of interface, returned by plugin(), is determined by cryptControl variable. In destructor of cryptControl will call releasePlugin() for it. -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] How to use CLOOP to generate Firebird headers
Look into makefile :) 17.11.2015 18:51, Dimitry Sibiryakov пишет: > Hello, Adriano. > > Subj. "Invalid command line parameters" on run is not much helpful. > -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Does anyone know of docs for a manual upgrade process of security2 to security3?
You may answer them if you want. Script will be part of RC2 migrate.tgz Description: application/compressed-tar -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] PluginFactory::createPlugin - identify the database
11.01.2016 17:49, Adriano dos Santos Fernandes пишет: > Hi! > > In this function, seems one could not known what database needs the > plugin. That's bad. > > In current engine implementation, multiple attachments has multiple > metadata caches and plugins instances. > > But Java External Engine plugin loads classes stored in the database, > and they should be loaded in a classloader per database, not per > attachment, which would be heavy. > > The most direct way to do that would be to return a single > IExternalEngine for these attachments sharing the same database (in the > same process). > > How to do that? What do you think about adding to PluginConfig method, returning database information pointer? (Do not say here 'DbName' - what else info is needed to be discussed) -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] PluginFactory::createPlugin - identify the database
11.01.2016 19:00, Adriano dos Santos Fernandes пишет: > On 11/01/2016 13:31, alex wrote: >> 11.01.2016 17:49, Adriano dos Santos Fernandes пишет: >>> Hi! >>> >>> In this function, seems one could not known what database needs the >>> plugin. That's bad. >>> >>> In current engine implementation, multiple attachments has multiple >>> metadata caches and plugins instances. >>> >>> But Java External Engine plugin loads classes stored in the database, >>> and they should be loaded in a classloader per database, not per >>> attachment, which would be heavy. >>> >>> The most direct way to do that would be to return a single >>> IExternalEngine for these attachments sharing the same database (in the >>> same process). >>> >>> How to do that? >> What do you think about adding to PluginConfig method, returning >> database information pointer? >> (Do not say here 'DbName' - what else info is needed to be discussed) >> >> > Yes, getDatabaseName in IPluginConfig may work. Even better to use database ID from lock manager - it's guaranteed to be free of any file naming issues when deciding is it same db or not. -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] PluginFactory::createPlugin - identify the database
11.01.2016 20:32, Adriano dos Santos Fernandes пишет: > On 11/01/2016 15:13, alex wrote: >> 11.01.2016 19:00, Adriano dos Santos Fernandes пишет: >>> On 11/01/2016 13:31, alex wrote: >>>> 11.01.2016 17:49, Adriano dos Santos Fernandes пишет: >>>>> Hi! >>>>> >>>>> In this function, seems one could not known what database needs the >>>>> plugin. That's bad. >>>>> >>>>> In current engine implementation, multiple attachments has multiple >>>>> metadata caches and plugins instances. >>>>> >>>>> But Java External Engine plugin loads classes stored in the database, >>>>> and they should be loaded in a classloader per database, not per >>>>> attachment, which would be heavy. >>>>> >>>>> The most direct way to do that would be to return a single >>>>> IExternalEngine for these attachments sharing the same database (in the >>>>> same process). >>>>> >>>>> How to do that? >>>> What do you think about adding to PluginConfig method, returning >>>> database information pointer? >>>> (Do not say here 'DbName' - what else info is needed to be discussed) >>>> >>>> >>> Yes, getDatabaseName in IPluginConfig may work. >> Even better to use database ID from lock manager - it's guaranteed to be >> free of any file naming issues when deciding is it same db or not. >> > But then there must be a way to create attachments from that ID. > > Also, an ID should better not reused if a database is closed and another > is opened. > > I think the file (db) name is more usable and without such artificiality. > > Or maybe an interface. The more we can unify the external engine > interfaces (say IExternalContext) with the others, the better. Yes, something like this - interface should work here best of all other choices. -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Srp username charset
the username in Srp auth is expected to be in UTF8, right? When it's passed to authentication plugin - yes. In DBP it may be in system or utf8 depending upon presence of utf8 flag tag in DPB. Whne utf8 marker is missing firebird converts all strings in DPB (and DB name too) from system to UTF8 charset. After it utf8 is used to talk to plugins. -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] How to create an alternative security database during restore?
05.03.2016 18:18, Björn Reimer пишет: > Hello, > > >> Afaik, gbak will not initialize anything :) >Yes, that's the problem with the new security concept :-) > > >> Did you try to restore using an embedded connection? > No, not embedded, but via IP. > > But I think it makes no difference as the error is the same when > there is no initialized security table in the configured security > database. > I can suggest you 2 immediate solutions: - restore DB before changing databases.conf (i.e. using default security db) - restore using embedded mode (does not need password and therefore security db at all) Taking into an account that databases.conf should be modified locally and initialization of security database structures in new database anyway requires embedded access it does not look like serious limitation. Am I missing something? -- Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Where can i find the include files for the new c++ api?
07.03.2016 13:34, Rudolf Grauberger пишет: Affects all versions of 3.0 (Beta, RC). Should i create a bug tracker item? It that a part of the component API / Client Library? LInux kits _do_ include file include/firebird/Interface.h. If it's missing in windows kits that's a bug in windows installer which should be fixed. Please create platform-specific ticket for windows. On 7 March 2016 00:56:47 +01:00, firebird-devel@lists.sourceforge.net wrote: There seems to be something wrong in both Windows and Linux kits... Adriano Em 06/03/2016 13:21, Rudolf Grauberger escreveu: Hello Guys, i want to play with the new c++-object-oriented api and I show the examples in examples/dbcrypt and examples/interfaces of the second release candidate and see that this examples includes and "firebird.h". Presence of #include "firebird.h" // Needed for atomic support #include "../common/classes/fb_atomic.h" in dbcrypt-related plugins is a bug in a sample. I've added a ticket for it: http://tracker.firebirdsql.org/browse/CORE-5134 -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://makebettercode.com/inteldaal-evalFirebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] FB/Java plugin security
06.03.2016 19:06, Adriano dos Santos Fernandes пишет: > Hi! > > Original FB/Java plugin had a security database where SYSDBA could > define JAAS permissions per users. > > Since Java can read files and do bad things, it's SYSDBA (server admin) > to define these permissions. And since was SYSDBA task to create users, > that was ok. > > No we can have embedded users in databases and database owners (not > SYSDBA) can create users. > > That created a problem in how FB/Java should manage permissions. > > Should the FB/Java security database not mention only user names but > databases too, and how? Certainly FB/Java security should distinguish users from different security databases. But except different databases we may also have different plugins, and user 'trusted' from security database 'secure', authorized using srp is something different from user 'trusted' from same sec-db, but authorized using legacy auth. In addition there are server-wide plugins (like windows SSPI). I.e. not only database name but also plugin name should be taken into an account. All that information about user is present in att_user->usr_auth_block and can be used by FB/Java security to validate user's rights. -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://makebettercode.com/inteldaal-eval Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Generation of types.y
07.03.2016 16:26, Dimitry Sibiryakov пишет: > Hello, All. > > Can someone explain what file types.y generated by parse.bat is for? > I see that it is deleted right after parser generation and can't find how > it is used > anywhere. > YACC requires all %types declaration to be put together in specific place in a file. To make parse.y better human-readable (and writeable) we put them before the node which has that type and before calling btyacc collect them in types.y file and include it into y.y file (one more temporal file in this game). The fact that file is deleted does not matter and is OS specific - in posix build types.y and y.y permanently stay in gen directory. -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://makebettercode.com/inteldaal-eval Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Where can i find the include files for the new c++ api?
07.03.2016 16:48, Adriano dos Santos Fernandes пишет: > Em 07/03/2016 08:03, alex escreveu: >> >> 07.03.2016 13:34, Rudolf Grauberger пишет: >>> Affects all versions of 3.0 (Beta, RC). >>> >>> Should i create a bug tracker item? It that a part of the component >>> API / Client Library? >>> >> LInux kits _do_ include file include/firebird/Interface.h. >> If it's missing in windows kits that's a bug in windows installer which >> should be fixed. >> Please create platform-specific ticket for windows. >> > Sorry, I extracted buildroot to another place and saw something broken > in usr/include, instead of look at opt. > > Not sure if this symlink will point to right place if installed to > another directory (not sure if that is possible, it's age that I don't > install from the archives). > > > Adriano > > PS: I don't think include/firebird is the right place for Firebird.pas I agree but have no better idea where to place it. -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://makebettercode.com/inteldaal-eval Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] How to create an alternative security database during restore?
> In my scenario I don't have shell access to server, onyl remote > access via ssh. > I've a 2.5 gbak file and a 3.0 server running. > > I was trying to restore the database without sysdba account and with > only editing database.conf once. This is currently not possible. > > I'll investigate the situation a little bit further in the next > days... And what magic helps you to edit databases.conf without shell access to server? Something like NFS? Must say that any ability to initialize security database remotely looks at the first glance like security risk. I will try to find some way to solve that problem but do not promise to have a solution. -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://makebettercode.com/inteldaal-eval Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] [firebird] increment build number (773c7bf)
25.03.2016 22:48, Adriano dos Santos Fernandes пишет: > Em 25/03/2016 16:24, Dmitry Yemanov escreveu: >> This gives us a buildno counted in days, not in commits (as now). >> > In practive it's not different. > > Doesn't the script is running per day like was in svn? > > Right, that means the snapshot build has a "perfect" buildno, but the > people who download zip does not. > > With the solution above, we can make snapshot builds to checkout tree or > 00:00 hour of the given date, so it can have a perfect buildno that we > can convert to date as well. One question - if there are no commits for some days (typical for stable branches) will buildno anyway be incremented every day? If yes IMHO this is not good. -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Firebird 3 - Single CPU core fully utilized with Trace session
> I could simply use the entire snapshot build and sync the moving parts like > security database, conf files, UDFs etc. or perhaps I could simply replace a > single (executable) file (firebird.exe?) taken from the snapshot ZIP file? > Not firebird.exe but engine12.dll. -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Performance of fbclient.dll of recent snapshots
27.04.2016 01:11, Leyne, Sean пишет: > >> To let rumors that Firebird is unbearable slow to spread is a bad thing >> too. > 1- 1 sec is not "unbearable"! > > 2- Slowness only occurs when using "localhost" with v3 client *and* v2.5 > server -- a very unusual situation (why would you have new client installed > on same host as old server?) > > 3- The performance problem is with Win API/DNS resolving the IPv4 address of > "localhost" -- "127.0.0.1" is an IPv4 IP so DNS resolution is completely > bypassed, which is why is doesn't suffer any connection delay. > > 4- The performance "problem" can be resolved by disabling IPv6 on the host > system. (I have asked Stefan to confirm same) >- v2.5 is known not to support IPv6. >- We have had to disable IPv6, on Microsoft's instructions, to address > DNS issues with IPv4 on hosts in our Win2012R2 clusters. > > > So, IMO, the only rumour will be "_don't mix v3 and v2.x client/server on > same host_" > > Sean, can you confirm that there is no delay when using 3.0 fbclient with remote 2.5 server? -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] FB/Java embedded connections - proposed solution for Firebird and Jaybird
20.05.2016 15:47, Adriano dos Santos Fernandes wrote: > On 20/05/2016 09:06, Alex Peshkoff wrote: >>>>> So if engine does not verify it, we should create a service specific for >>>>> that: verify user names and passwords. Looks bad solution than initial >>>>> one presented in this thread. >>>> Engine _can_ verify login/password but this is not default for it. >>>> Can FB/Java add to DPB, passed by user in attachDatabase, specific tag >>>> (i.e. isc_dpb_validation_needed)? That will be enough. >>>> >>>> >>> Do you talk about possible changes? >>> >>> I do not see isc_dpb_validation_needed in the code. >>> >> Yes. >> > Can the use of TYPE_AUTH_SERVER / TYPE_AUTH_CLIENT plugins have the same > result as isc_dpb_validation_needed? > Adriano, sorry - I do not understand your question. How can use of plugins have same result as parameter in DPB? -- Mobile security can be enabling, not merely restricting. Employees who bring their own devices (BYOD) to work are irked by the imposition of MDM restrictions. Mobile Device Manager Plus allows you to control only the apps on BYO-devices by containerizing them, leaving personal data untouched! https://ad.doubleclick.net/ddm/clk/304595813;131938128;j Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Integrated, easy to use and faster API
On 03/30/11 18:19, Adriano dos Santos Fernandes wrote: > On 30-03-2011 04:43, Alex Peshkoff wrote: >> Adriano, I must say that I like all this suggestion. >> I suppose that the methods, required to extract data, will follow? >> > Alex, do you mean things like getInt, getString? > > I think this is not needed in the API. > > Look, with message buffers one can extract data. With > IParametersMetaData one can construct message buffers of dynamic data. > > Sure we should do things to make this easier way possible, but than it > looks like a task for a wrapper and not the API. Adriano, I agree that methods like getInt() should better go into wrappers. What I was thinking about - may be we can have helper method, creating (probably SQLDA-like) structure, with pointers to message buffer (not user like it was before). Or may be you have better idea how to help users parse messages from dynamic statement? -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Integrated, easy to use and faster API
On 03/30/11 18:16, Adriano dos Santos Fernandes wrote: > On 30-03-2011 04:52, Kjell Rilbe wrote: >> Den 2011-03-30 09:14 skrev Dimitry Sibiryakov såhär: >>> 30.03.2011 3:21, Adriano dos Santos Fernandes wrote: So then, we add IParameterMetaData with these methods: virtual unsigned FB_CARG getCount(Status* status) const = 0; virtual const char* FB_CARG getName(Status* status, unsigned index) const = 0; >>> Not expandable. I would suggest one method for all: >>> getAttr(Status* status, unsigned AttrIndex, unsigned ParamIndex, void* >>> ResultBuffer); >>> >>> And a set of constants: >>> FB_ATTR_PARAM_COUNT >>> FB_ATTR_PARAM_NAME >>> FB_ATTR_PARAM_PACKAGE etc. >> Maybe I'm missing something, but why is it more expandable with >> defines/consts for what the method should do than with separate methods? >> In both cases you would need to recompile the API client, in one case >> with a new method, in the other case with a new constant. Why is the >> const approach better? It seems very old fashioned to me. >> > I agree with all these words. And this approach is type unsafe. Also agreed. We should better not deal with void* pointers as long as we can avoid it. They help to hide errors when calling such a function too efficient :-) Specially bad this case becomes on RISC machines with strict alignment requirements. -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] New yvalve implementation
On 03/30/11 18:28, Adriano dos Santos Fernandes wrote: > On 30-03-2011 08:51, Alex Peshkoff wrote: >> Let's leave it for another thread. >> >>> - ITransaction::disconnect - must be added >>> - Few other things (TODO) >>> >>> Cleanup handlers was added to the API, as they are part of public ISC API. >> I'm not sure with them. May be better leave that support only for ISC >> API emulator? >> > I'm not sure, really. > > disconnect looks like a valid operation and I think we must support. Yes, disconnect is valid operation. It does not make much sense for user - this is a method to help him to leave transaction in limbo state :) Unfortunately this is the only thing that multithread server can do when connection to client is lost in unsuccessfull moment. Therefore - yes, we have to have ITransaction::disconnect(). > About cleanup handles, looks like some day they was needed, so... > The only handler left in our codes is in user_dsql.cpp, it's isc_database_cleanup(). As far as I can see from that code handler is needed when adding thin wrapper, which adds additional services, but lets upper layers work with original handles instead of creating own handles. Therefore such layer has no direct control over (for example) detach from database and needs a handler to cleanup own database related resources. Can't say that I like that approach. >>> As I said, proxies on the engine would be possible, and don't require >>> any sort of addRef/release in our API. But I don't saw yet any concrete >>> design plan on how this will work. >> How can it arrive if we have to waste time with your suggestion not to >> use reference counters in API? >> Proxies make no sense without reference counters, they will not work as >> needed. >> > Like you said, someone may kill an attachment from another connection. > > If we can't inform yvalve about this, and with current way to call > cleanup handler after the object is constructed looks not safe. > > So IMHO, when an attachment dies it must mark it parent proxy as > invalid, and this proxy would die only together with the yvalve object. > Exactly. And only when all it's proxy-children (proxy for transaction is a child of proxy for attachment) are dead. -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Reference counters in API - was Re: Providers, yvalve, external engines and object lifecycle
On 03/31/11 02:07, Adriano dos Santos Fernandes wrote: > On 30-03-2011 18:35, Vlad Khorsun wrote: >>> stdcall is incompatible with our approach to upgradeInterface. >> Why ? I see no reason for it. >> > We add methods to vtable, which expect single "status" parameter, but > user may call this methods with many parameters. Only cdecl would handle > this. To be precise - added functions may have no parameters at all, nothing prevents them to throw exception instead of filling status vector. This is a choice of one who is calling upgradeInterface(). And certainly yes - only cdecl calling convention may be used here. -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Reference counters in API - was Re: Providers, yvalve, external engines and object lifecycle
On 03/31/11 00:18, Adriano dos Santos Fernandes wrote: > On 30-03-2011 17:09, Vlad Khorsun wrote: Therefore it will be very desirable to add queryInterface to the our base interface, even empty or raising notImplemented error. IUnknown *is* industry standard, despite of our wish to accept it. Simple Delphi wrappers could be written to deal with reference counters but i prefer to add queryInterface to the our interfaces. >>> No, it's not desirable to add bogus method to our interface. >> Make it not bogus >> > Then go months ago and re-discuss the versioning approach. I do not see why presence of queryInterface() is incompatible with our version upgrade mechanism. Therefore if really need so much to have binary compatibility with IUnknown - we can add it. -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Reference counters in API - was Re: Providers, yvalve, external engines and object lifecycle
On 03/30/11 18:39, Adriano dos Santos Fernandes wrote: >> Do you see the difference ? >> > If user pass an invalid pointer parameter, it *will* crash in our code: > > provider->attachDatabase((Status*) 0x1, (char*) 0x1, ...); > > We can't prevent wrong program from crashing in our code. The same is about: > > freedObject->something(); Adriano, without reference counts we really can't prevent crash with freedObject. And one of main reasons for reference counters to exist - prevent such crashes. -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Reference counters in API
On 03/30/11 18:44, Adriano dos Santos Fernandes wrote: > On 30-03-2011 07:23, Alex Peshkoff wrote: >> On 03/29/11 18:58, Adriano dos Santos Fernandes wrote: >>> On 29-03-2011 10:45, Alex Peshkoff wrote: >>>> We have too many problems in single thread. I try to divide it to >>>> smaller parts. >>>> The first one - here we at least all seem to talk about same thing:-) - >>>> is to use reference counters or not. >>>> >>>> On 03/28/11 22:45, Adriano dos Santos Fernandes wrote: >>>>> User should *not* request a detachment and then request actions on the >>>>> objects. This *is* user application problem, no mater it being single or >>>>> multi thread. >>>> In that case our new API is regression compared with old ISC API with >>>> handles. Pre FB3 an attempt to request actions on the objects after >>>> detachment cause correct reply from client library - invalid handle. >>>> Without reference count support we will get segfault in FB3. I treat >>>> this as serious regression. >>>> >>> You're trying to make two different worlds to look similar. >>> >>> Take another look at it. >>> >>> Thread 1 detachs and makes it handle invalid. >>> >>> Thread 2 allocs 0x handles. >>> >>> Thread 3 is scheduled to run and use the old invalid, but now valid handle. >>> >>> Very pessimistic and "impossible" to happen, but shows that application >>> doing this with handles are still incorrect. >> As you understand yourself, this is not realistic example. >> Cases when thread 3 is trying to work with old invalid handle and gets >> appropriate error message is reality. >>> You also didn't replied yet to me what will happen when you detach a >>> parent without free children: leaks or will regret your refcounters? >> Sorry, may be I've missed that question. >> The answer is simple - objects will exist until refcounters > 0, but >> will be marked in a way, making them return 'object is invalid' error >> for any request. >> > And not everyone is using C++ and RAII. This will create a lot of leaks. You've forgotten that such people are not forced to use addRef/release at all. > People would like to detach a parent and not care about statements > created but unfreed for this attachment. > If they do not call addRef for statements, they will be destroyed when attachment goes away > And for who is using C++ and RAII, they don't need addRef/release in our > objects to use that. Absolutely wrong. > Well, if you want to say that someone is correct just because chose the > COM way, then we would need to say we're incorrect because we don't use > queryInterface... In many aspects use of queryInterface might be ideal. Two main reasons why we can't use it: - it will cause additional delays in time-critical places like fetching next record, - it will pollute each place in the code where we work with plugins. On the other hand I see no problems with adding that method to our interfaces, specially if it's needed to make Delphi people life easier. It does not conflict with our versioning support. -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Reference counters in API
On 03/31/11 15:28, Vlad Khorsun wrote: >> On the other hand I see no problems with adding that method to our >> interfaces, specially if it's needed to make Delphi people life easier. >> It does not conflict with our versioning support. > Unfortunately it is not enough. To be binary compatible with IUnknown > (not with Delphi itself but with well known stantard interface) we should use > stdcall also. So, we can be compatible and abandon upgradeInterface, or > not compatible and don't add confusion introducing queryInterface. Vlad, if really needed we can make 3 first functions in our interface to use stdcall. This breaks nothing. -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Reference counters in API
On 03/31/11 15:00, Kjell Rilbe wrote: > Generally speaking, I feel it's completely wrong to add something to > an api only because some clients/users would expect it, unless it > actually does something useful in the api. it will only lead to extra > complexity and problems down the line. > > So, if the only reason to add queryInterface is to make Delphi users' > life easier I'd say no, even if I've been a huge Delphi fan ever since > version 1. BTW, what's a problem with writing using Delphi code RAII type for our interface without built-in into compiler support? -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Reference counters in API
On 03/31/11 16:21, Vlad Khorsun wrote: >> On 03/31/11 15:28, Vlad Khorsun wrote: On the other hand I see no problems with adding that method to our interfaces, specially if it's needed to make Delphi people life easier. It does not conflict with our versioning support. >>> Unfortunately it is not enough. To be binary compatible with IUnknown >>> (not with Delphi itself but with well known stantard interface) we should >>> use >>> stdcall also. So, we can be compatible and abandon upgradeInterface, or >>> not compatible and don't add confusion introducing queryInterface. >> Vlad, if really needed we can make 3 first functions in our interface to >> use stdcall. This breaks nothing. > And all other functions still will be cdecl ? Don't looks as beauty to me > :( Vlad, I can agree that this is a bit strange, but if we forget about emotions - absolutely nothing bad. Functions from base Firebird::Interface never require upgrade - they are always present. > Regards, > Vlad > > PS I'm not insisting on binary compatibility with IUnknown. I just want to > make it > clear - are we compatible or not. Currently - certainly not. -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Reference counters in API
On 03/31/11 17:45, Adriano dos Santos Fernandes wrote: > On 31-03-2011 10:30, Alex Peshkoff wrote: >> On 03/31/11 16:21, Vlad Khorsun wrote: >>>> On 03/31/11 15:28, Vlad Khorsun wrote: >>>>>> On the other hand I see no problems with adding that method to our >>>>>> interfaces, specially if it's needed to make Delphi people life easier. >>>>>> It does not conflict with our versioning support. >>>>> Unfortunately it is not enough. To be binary compatible with IUnknown >>>>> (not with Delphi itself but with well known stantard interface) we should >>>>> use >>>>> stdcall also. So, we can be compatible and abandon upgradeInterface, or >>>>> not compatible and don't add confusion introducing queryInterface. >>>> Vlad, if really needed we can make 3 first functions in our interface to >>>> use stdcall. This breaks nothing. >>> And all other functions still will be cdecl ? Don't looks as beauty to >>> me :( >> Vlad, I can agree that this is a bit strange, but if we forget about >> emotions - absolutely nothing bad. >> Functions from base Firebird::Interface never require upgrade - they are >> always present. > QueryInterface uses GUIDs, and an interface with a GUID should not change. > > This is not conceptually compatible with our versioning scheme. Nobody said that GUID should remain the same when version changes. It's even possible to return pointer to current class on request for old GUID. -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel