Wrong logging statements order, missing unprepare

The BETA tester's forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
DPStano
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 16.05.2016, 09:21

Wrong logging statements order, missing unprepare

Postby DPStano » 10.05.2017, 08:54

Transaction Commit is logged before Execute Statement and Unprepare Statement is not logged at all and there should be transaction handle/id for each statements ... its really weird when i have 10 connections and can't identify which transaction run which query

marsupilami
Gold Boarder
Gold Boarder
Posts: 591
Joined: 17.01.2011, 14:17

Re: Wrong logging statements order, missing unprepare

Postby marsupilami » 11.05.2017, 20:32

Hello DPStano,

what should I say? Zeos doesn't need transaction handles since there is only one active transaction per connection. Logging is done in the DBC drivers. Have a look in your driver if you want to modify the logging behaviour. Watch out for calls like DriverManager.LogMessage or just LogMessage. If you need help doing this, let me know.

With best regards,

Jan

DPStano
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 16.05.2016, 09:21

Re: Wrong logging statements order, missing unprepare

Postby DPStano » 16.05.2017, 07:17

i forgot DB is firebird with 10+ active connections so i have 10 active transactions with 100 query/min, error queries are logged but is't a bit problematic to find out transactions when some db deadlock/error happen or even filter queries by connection when multiple similar queries are logged at same time

DPStano
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 16.05.2016, 09:21

Re: Wrong logging statements order, missing unprepare

Postby DPStano » 16.05.2017, 07:24

when it comes unprepare statement

prepare statement is loged as
https://github.com/svn2github/ZeosLib/b ... .pas#L2243

but when you look at unprepare its not loged at all
https://github.com/svn2github/ZeosLib/b ... .pas#L2248

DPStano
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 16.05.2016, 09:21

Re: Wrong logging statements order, missing unprepare

Postby DPStano » 16.05.2017, 07:28

commit logged before execute prepared statement

commit is logged at
https://github.com/svn2github/ZeosLib/b ... t.pas#L367

but execute prepared is logged two lines after
https://github.com/svn2github/ZeosLib/b ... t.pas#L369
https://github.com/svn2github/ZeosLib/b ... .pas#L2222

marsupilami
Gold Boarder
Gold Boarder
Posts: 591
Joined: 17.01.2011, 14:17

Re: Wrong logging statements order, missing unprepare

Postby marsupilami » 17.05.2017, 19:06

Hello DPStano,

hmm - I understand your problem. Honestly I really would like to get rid of that part of the code and make use of the Firebird Autocommit again. One could move the call "inherited ExecutePrepared;" to a position before the commit. But that would make your transaction not commit in case there happens something bad with the logging...

What do you think?

With best regards,

Jan


Return to “ZeosLib 7.2 Betatest Forum”

Who is online

Users browsing this forum: No registered users and 1 guest