[Firebird-devel] Oldest transaction don't move
Hello, i have a strange thing with a superver 2.5.2 on windows. when i do a request on a table and after ask for db stat the Oldest transaction counter don't up i'm sure that the transcation is no longer here because 1) select count(1) from mon$transactions => 0. 2) and i don't have any attachement to the db after each request. so for exemple my dbstat begin like that : Oldest transaction 1 Oldest active 2 Oldest snapshot 2 Next transaction3 and if i do 10 select the result is : Oldest transaction 1 Oldest active 12 Oldest snapshot 12 Next transaction13 but if i do the same test with a parralel attachment on this db with ibexpert for exemple the result test say that after 10 request : Oldest transaction 11 Oldest active 12 Oldest snapshot 12 Next transaction13 my request id done via node-firebird : to do the request it connect to the db, execute the statement, and close the connection and it uses the remote protocol. have you an idea on what happen ? -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Firebird 3 API demo usage with Pascal
>>Karol, I also created an UDR demo for a selectable stored procedure. >>https://github.com/asfernandes/fbstuff/commit/161e1bb98f6321cff87afe24ca1050a23b8a2e10 >>You should build it and copy the pascaludr.dll file to >>/plugins/udr >>Then declare in the database: >>And use: >>select * from gen_rows_pascal(2, 5); >>Result: >>2 >>3 >>4 >>5 >>Adriano Hi Adriano, few problems didive library file into two files (initialization is not allowed in library file itself - only in unit) change PChar to PAnsiChar and change 2 declarations of functions and implementation function open(status: Status; context: ExternalContext; inMsg: Pointer; outMsg: Pointer): ExternalResultSet; override; and function newItem(status: Status; context: ExternalContext; metadata: RoutineMetadata): ExternalProcedure; override; and what i should do to tell Firebird to use this dll? when i try to declare it create procedure gen_rows_pascal ( start_n integer not null, end_n integer not null ) returns ( result integer not null ) external name 'pascaludr!gen_rows' engine udr; i got error SQL Message : -901 Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements Engine Code: 335544382 Engine Message : Module not found first why 'pascaludr!gen_rows'? i do not see any word pascal in units below are changed files regards, Karol Bieniaszewski library Udr; uses FbApi, UdrMain in 'UdrMain.pas'; begin end. unit UdrMain; interface uses FBApi; type GenRowsInMessage = record start: Integer; startNull: WordBool; end_: Integer; endNull: WordBool; end; GenRowsInMessagePtr = ^GenRowsInMessage; GenRowsOutMessage = record result: Integer; resultNull: WordBool; end; GenRowsOutMessagePtr = ^GenRowsOutMessage; GenRowsResultSet = class(ExternalResultSetImpl) procedure dispose(); override; function fetch(status: Status): Boolean; override; public inMessage: GenRowsInMessagePtr; outMessage: GenRowsOutMessagePtr; end; GenRowsProcedure = class(ExternalProcedureImpl) procedure dispose(); override; procedure getCharSet(status: Status; context: ExternalContext; name: PAnsiChar; nameSize: Cardinal); override; function open(status: Status; context: ExternalContext; inMsg: Pointer; outMsg: Pointer): ExternalResultSet; override; end; GenRowsFactory = class(UdrProcedureFactoryImpl) procedure dispose(); override; procedure setup(status: Status; context: ExternalContext; metadata: RoutineMetadata; inBuilder: MetadataBuilder; outBuilder: MetadataBuilder); override; function newItem(status: Status; context: ExternalContext; metadata: RoutineMetadata): ExternalProcedure; override; end; implementation var myUnloadFlag: Boolean; theirUnloadFlag: BooleanPtr; { create procedure gen_rows_pascal ( start_n integer not null, end_n integer not null ) returns ( result integer not null ) external name 'pascaludr!gen_rows' engine udr; } procedure GenRowsResultSet.dispose(); begin destroy; end; function GenRowsResultSet.fetch(status: Status): Boolean; begin if (outMessage.result >= inMessage.end_) then Result := false else begin outMessage.result := outMessage.result + 1; Result := true; end; end; procedure GenRowsProcedure.dispose(); begin destroy; end; procedure GenRowsProcedure.getCharSet(status: Status; context: ExternalContext; name: PAnsiChar; nameSize: Cardinal); begin end; function GenRowsProcedure.open(status: Status; context: ExternalContext; inMsg: Pointer; outMsg: Pointer): ExternalResultSet; begin Result := GenRowsResultSet.create(); GenRowsResultSet(Result).inMessage := inMsg; GenRowsResultSet(Result).outMessage := outMsg; GenRowsResultSet(Result).outMessage.resultNull := false; GenRowsResultSet(Result).outMessage.result := GenRowsResultSet(Result).inMessage.start - 1; end; procedure GenRowsFactory.dispose(); begin destroy; end; procedure GenRowsFactory.setup(status: Status; context: ExternalContext; metadata: RoutineMetadata; inBuilder: MetadataBuilder; outBuilder: MetadataBuilder); begin end; function GenRowsFactory.newItem(status: Status; context: ExternalContext; metadata: RoutineMetadata): ExternalProcedure; begin Result := GenRowsProcedure.create; end; function firebird_udr_plugin(status: Status; theirUnloadFlagLocal: BooleanPtr; udrPlugin: UdrPlugin): BooleanPtr; cdecl; begin udrPlugin.registerProcedure(status, 'gen_rows', GenRowsFactory.create()); theirUnloadFlag := theirUnloadFlagLocal; Result := @myUnloadFlag; end; exports firebird_udr_plugin; initialization myUnloadFlag := false; finalization if (not myUnloadFlag) then theirUnloadFlag^ := true; end. --
Re: [Firebird-devel] Time to update our headers.
Indeed. The GPL is pathological. Sun developed a fantastic file system called ZFS and released under a Sun open source license that requires, like the Firebird licenses, that modifications be available under the same license. But Linux integration would require some mods, the mods would have to be GPL, and GPL doesn't allow any GPL code to be released under a different license. Therefore, no ZFS in Linux. On Friday, March 13, 2015, Michal Kubecek wrote: > On Fri, Mar 13, 2015 at 03:09:04PM -0400, Jim Starkey wrote: > > I can't see any reason to muck around with licenses at all. MPL 2.0 > claim to > > fame is that it's compatible with GPL, but at the moment approximately > 100% of > > Firebird is already incompatible with GPL -- and very little of it can be > > changed -- what is the point? > > Please be careful about the word "compatible" when talking about GPL. > Unfortunately it's one of the words (together with "free") that FSF > is abusing by completely twisting their usual meaning. In FSF-speak, > "GPL-compatible" means, roughly speaking, "code we can copy into a GPL > licensed project". I guess I don't have to explain such relation is far > from symmetric. > > Michal Kubecek > > > > -- > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > Firebird-Devel mailing list, web interface at > https://lists.sourceforge.net/lists/listinfo/firebird-devel > -- Jim Starkey -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Time to update our headers.
On 13-3-2015 20:09, Jim Starkey wrote: > MPL should never be used for Firebird code. It gives specific rights to > Netscape. I have skimmed the MPL 1.0, 1.1 and 2.0 but as far as I can tell it never assigns specific rights to Netscape or Mozilla. Could you point out where it does this? > I can't see any reason to muck around with licenses at all. Agreed. Mark -- Mark Rotteveel -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Oldest transaction don't move
On 14-3-2015 08:40, arnaud le roy wrote: > Hello, > > i have a strange thing with a superver 2.5.2 on windows. > > when i do a request on a table and after ask for db stat the Oldest > transaction counter don't up i'm sure that the transcation is no longer > here because > 1) select count(1) from mon$transactions => 0. > 2) and i don't have any attachement to the db after each request. > > so for exemple my dbstat begin like that : > > Oldest transaction1 > Oldest active 2 > Oldest snapshot 2 > Next transaction 3 > > and if i do 10 select the result is : > > Oldest transaction1 > Oldest active 12 > Oldest snapshot 12 > Next transaction 13 > > but if i do the same test with a parralel attachment on this db with > ibexpert for exemple the result test say that after 10 request : > > Oldest transaction11 > Oldest active 12 > Oldest snapshot 12 > Next transaction 13 > > my request id done via node-firebird : > to do the request it connect to the db, execute the statement, and close > the connection and it uses the remote protocol. > > have you an idea on what happen ? This question is off topic on the firebird-devel mailinglist. Please post it to firebird-support. Mark -- Mark Rotteveel -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Explained plan limited size also in MON$STATEMENTS?
14.03.2015 02:03, liviusliv...@poczta.onet.pl wrote: > > I read that to get unlimited text of explained plan i should look into > TMP$STATEMENTS > > but i got limited text in MON$EXPLAINED_PLAN in MON$STATEMENTS for some big > query > it end after 14 808 bytes as > "Select Expression > -" > nothing more Confirmed. Could you please log this into the tracker? Dmitry -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] Retrieving plan using new mon$explained_plan field (FB3 beta )
Hi, I’m trying to retrieve the explain plan of the last prepared query, using the mon$explained_plan field, introduced in FB3 beta. I used: SELECT mon$explained_plan FROM mon$statements WHERE mon$transaction_id = CURRENT_TRANSACTION This seems to give me however the plan of the first prepared statement of the transaction. I want the plan of the last prepared query (of course also excluding the statement that is querying for the plan) BTW: - the mon$explained_plan field is not yet added to README.monitoring_tables.txt. - the mon$explained_plan field seems to start with a carriage return, what is the purpose of that? Kind regards, Robert -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Retrieving plan using new mon$explained_plan field (FB3 beta )
14.03.2015 15:38, Robbert-Jan wrote: > > I’m trying to retrieve the explain plan of the last prepared query, > using the mon$explained_plan field, introduced in FB3 beta. > I used: > SELECT mon$explained_plan FROM mon$statements WHERE mon$transaction_id = > CURRENT_TRANSACTION Wrong. You should use WHERE mon$attachment_id = CURRENT_CONNECTION instead. The mon$transaction_id gets assigned when the query starts to execute, i.e. it containts NULL for a just prepared query. > - the mon$explained_plan field is not yet added to > README.monitoring_tables.txt. Will be added, thanks. > - the mon$explained_plan field seems to start with a carriage return, > what is the purpose of that? Historical artifact, as the legacy plan was always returned prefixed with a carriage return. Perhaps we can avoid this for the new output, I will check. Dmitry -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] [FB-Tracker] Created: (CORE-4708) content of MON$EXPLAINED_PLAN in MON$STATEMENTS is limited to 14 808 bytes
content of MON$EXPLAINED_PLAN in MON$STATEMENTS is limited to 14 808 bytes -- Key: CORE-4708 URL: http://tracker.firebirdsql.org/browse/CORE-4708 Project: Firebird Core Issue Type: Bug Reporter: Karol Bieniaszewski I read that to get unlimited text of explained plan i should look into TMP$STATEMENTS but i got limited text in MON$EXPLAINED_PLAN in MON$STATEMENTS for some big query it end after 14 808 bytes as "Select Expression -" nothing more -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Explained plan limited size also inMON$STATEMENTS?
-Oryginalna wiadomość- From: Dmitry Yemanov Sent: Saturday, March 14, 2015 1:38 PM To: For discussion among Firebird Developers Subject: Re: [Firebird-devel] Explained plan limited size also inMON$STATEMENTS? 14.03.2015 02:03, liviusliv...@poczta.onet.pl wrote: > > I read that to get unlimited text of explained plan i should look into > TMP$STATEMENTS > > but i got limited text in MON$EXPLAINED_PLAN in MON$STATEMENTS for some > big > query > it end after 14 808 bytes as > "Select Expression > -" > nothing more >>Confirmed. Could you please log this into the tracker? >>Dmitry Logged as Core-4708 http://tracker.firebirdsql.org/browse/CORE-4708 regards, Karol Bieniaszewski -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Time to update our headers.
> On Mar 14, 2015, at 8:00 AM, Mark Rotteveel wrote: > > I have skimmed the MPL 1.0, 1.1 and 2.0 but as far as I can tell it > never assigns specific rights to Netscape or Mozilla. Could you point > out where it does this? In 1.0, the problems come in section 6. I haven't checked 1.1. V2.0 specifically names the Mozilla foundation as steward of the license. > >> I can't see any reason to muck around with licenses at all. > > Agreed. Likewise. -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Firebird 3 API demo usage with Pascal
On 14-03-2015 06:56, liviusliv...@poczta.onet.pl wrote: > > few problems > didive library file into two files (initialization is not allowed in library > file itself - only in unit) > change PChar to PAnsiChar > and change 2 declarations of functions and implementation > function open(status: Status; context: ExternalContext; inMsg: Pointer; > outMsg: Pointer): ExternalResultSet; override; > and > function newItem(status: Status; context: ExternalContext; metadata: > RoutineMetadata): ExternalProcedure; override; > Done. What Delphi version are you using? > and what i should do to tell Firebird to use this dll? > when i try to declare it > Copy the generated DLL to /plugins/udr/pascaludr.dll Or adapt the declaration to the DLL name you generated. Adriano -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Firebird 3 API demo usage with Pascal
>>What Delphi version are you using? I use Delphi XE7 Ent but if you need i can test it on any (i have licenses down to Delphi 5) > and what i should do to tell Firebird to use this dll? > when i try to declare it > >>Copy the generated DLL to /plugins/udr/pascal udr.dll >>Or adapt the declaration to the DLL name you generated. >>Adriano It work :) The clue was in udr subfolder - i put it in plugins(there was no udr subfolder). This is much better extension to Firebird then previously tested. This so big FB improvement. It increase quality and make very very big "next step". Can you provide more examples (more db types especially date and time, strings, blob) And is possible to work(implement) with some cursor params :)) You know - "once you start you can't stop" ;-) PS. can you also provide sample with PDB (specify user and password to previous test)? regards, Karol Bieniaszewski -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel