Search found 50 matches

by stoffman
30.06.2021, 12:49
Forum: ZeosLib 7.3/8.0 Forum
Topic: ZAbstractConnection Disconnect performance issue with TZDbcPooledConnection
Replies: 3
Views: 166

ZAbstractConnection Disconnect performance issue with TZDbcPooledConnection

Hi, There is a performance issue and potential bug related to TZDbcPooledConnection when disconnecting a connection. I would like to propose a small change that will help a lot. First some background: ZAbstractConnection.Disconnect has the following code: try FConnection.Close; FConnection.SetOnConn...
by stoffman
03.05.2021, 21:59
Forum: ZeosLib 7.3/8.0 Forum
Topic: Connection Pooling Bug
Replies: 13
Views: 637

Re: Connection Pooling Bug

Using transaction is suboptimal for sure but as a default implementation it is acceptable for the following reasons: 1. IMHO having a suboptimal solution is OK, providing an uncomplete implementation is less so. TConnectionPool is not optimal in any way.. but it exists and it helped me a lot and I'l...
by stoffman
03.05.2021, 06:56
Forum: ZeosLib 7.3/8.0 Forum
Topic: Connection Pooling Bug
Replies: 13
Views: 637

Re: Connection Pooling Bug

I think that we can all agree that if PingServer was implemented for all the drives it would have been the best solution, as such I propose that the *default implementation* of PingServer *will not be* raising EZUnsupportedException, but start/rollback transaction or 'select null... ' or whatever. T...
by stoffman
01.05.2021, 13:14
Forum: ZeosLib 7.3/8.0 Forum
Topic: Connection Pooling Bug
Replies: 13
Views: 637

Re: Connection Pooling Bug

My point, if I wasn't clear, is that the TConnectionPool.Acquire should call PingServer. It should not address the AutoCommit status of the connection directly.
by stoffman
30.04.2021, 20:29
Forum: ZeosLib 7.3/8.0 Forum
Topic: Connection Pooling Bug
Replies: 13
Views: 637

Re: Connection Pooling Bug

My understanding is that PingServer is a *concept* the actual implementation details do not really matter. If a driver supports Ping using the driver. Great. Use it. Otherwise it should try to 'select null... ' with the its specific syntax or start/rollback transaction inside the PingServer method. ...
by stoffman
28.04.2021, 14:36
Forum: ZeosLib 7.3/8.0 Forum
Topic: Connection Pooling Bug
Replies: 13
Views: 637

Connection Pooling Bug

Hi, I found, what I believe to be a bug in TConnectionPool.Acquire. try // Test for dead connections FConnections[I].Rollback; // PingServer did not work (tested with FB) FSlotsInUse[I] := True; Break; except // An exception can be raised when the dead connection is dropped try FConnections[I] := ni...
by stoffman
19.02.2021, 22:18
Forum: ZeosLib 7.3/8.0 Forum
Topic: Resetting the OnLostConnetion exception
Replies: 4
Views: 229

Re: Resetting the OnLostConnetion exception

@aehimself

Serious question, what is the point of having an event handler if you *must* also catch the exception? everything I can do in the event handler I can do in exception handler but not vice versa.
by stoffman
19.02.2021, 16:23
Forum: ZeosLib 7.3/8.0 Forum
Topic: Resetting the OnLostConnetion exception
Replies: 4
Views: 229

Resetting the OnLostConnetion exception

As a consumer of ZAbstractConnection I cannot prevent the exception of OnLostConnection from being raise, although I have a event handler to handle it. This forces me to handle the state of losing connection twice, first in the event handler and again in the function that led to this code path (hand...
by stoffman
18.02.2021, 13:30
Forum: ZeosLib 7.3/8.0 Forum
Topic: JSONB field bug
Replies: 3
Views: 183

Re: JSONB field bug

Done.

Ping me if you need more details.
by stoffman
18.02.2021, 12:34
Forum: ZeosLib 7.3/8.0 Forum
Topic: JSONB field bug
Replies: 3
Views: 183

JSONB field bug

Hi,

I'm working with Postgresql 9.6 and when reading data from JSONB field a new character is being added to the beginning of the field ... This is new to 8.0 as 7.2.6 works as expected .

extra char.png
by stoffman
17.02.2021, 22:12
Forum: ZeosLib 7.3/8.0 Forum
Topic: Installing 7.3
Replies: 2
Views: 280

Re: Installing 7.3

Thank you for the detailed answer.

For future generation I would like to add that you should also have a look at the protocol in TZConnection as the names are different. It didn't produce any visible error but the query just didn't complete...
by stoffman
14.02.2021, 08:43
Forum: ZeosLib 7.3/8.0 Forum
Topic: Installing 7.3
Replies: 2
Views: 280

Installing 7.3

Hi ,

I'm not sure what to install, I looked at the https://github.com/marsupilami79/zeoslib repository, and there are the _master_ and the _8.0patches_ branches. which one to use?

Another question, can I install 7.3/8.0 side by side with 7.2?

I'm using Lazarus/Win64 2.0.10

Thanks
by stoffman
17.01.2021, 11:55
Forum: ZeosLib 7.2 Forum
Topic: Connection issue (maybe a bug?)
Replies: 4
Views: 312

Re: Connection issue (maybe a bug?)

Hi Jan First I would like to thank you for the answer. So I wish to suggest a little change that will make Zeos a little more robust if I may: currently I've to parse the error message of the exception to know what exactly happen so if you can make a specific a ConnectionLostException that would be ...
by stoffman
17.01.2021, 10:52
Forum: ZeosLib 7.2 Forum
Topic: Connection issue (maybe a bug?)
Replies: 4
Views: 312

Connection issue (maybe a bug?)

Hi, I encounter what I think is a bug. 1. I'm connecting to a database and performing a query. Works fine. 2. I can keep using this TZReadOnlyQuery and issuing new queries without a problem 3. After some period of time, if I don't use it, I issue a query and get an exception "SQL Error: no conn...