Tested Zeos 8

In this forum you may discuss all issues concerning the Lazarus IDE and Freepascal (both running on Windows or Linux).

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
fantablup
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 13.07.2021, 00:03

Tested Zeos 8

Post by fantablup »

Something i noticed.
Impossible to free the TZTransaction. Gives in transaction error or something like that. Also impossible to free a form with TZTransaction inside it.

SQL monitor dont give the DB SQL error. Only give the SQL string as an error and no error.
But, doing an exception handler instead of usting the SQL monitor gives the DB error correct.

Just some stuff that i tested out.
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Tested Zeos 8

Post by marsupilami »

Thank you for the feedback. Could you prepare a small demo application? That really would help in debugging the probelm. Even more so since TZTransaction works differently for Firebird copmpared to other databases. With firebird we truly can support multiple transactions. On other databases we create new connections, I think.
fantablup
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 13.07.2021, 00:03

Re: Tested Zeos 8

Post by fantablup »

I will create a demo app when i have time.
Multiple transactions is great. But it works good without the extra TZTransaction. Though with only one transaction.
You do one amazing work on Zeos i have to say.

It also seems like it has memory leaks in the 7.3 version. Even if i close the IZResultset, it still remains in memory. Tested to see if it goes away after some hours, but no.
Seems like getblob, or getstring or any of the other ones is not being realesed.
I saw this when testing with getting blob images and blob text.
When creating this Admin DB app, it is easier to find things like this, because i can open new SQL windows, and run another result set.
Closing the forms(Also removing all components in the form) and free it and set nil, don't release the memory from the result sets.
Even when closing all other forms, closing all connections, an freeing every form, don't release the memory.
Only closing the app is releasing it.
Just wanted to tell.
fantablup
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 13.07.2021, 00:03

Re: Tested Zeos 8

Post by fantablup »

Have started creating the test app.

The failing of freeing the TZTransaction is clear.
This happens after i do this:
Opening the form2 with a TZConnection to Firebird and a TZTransaction connected to it.
Autocommit is false on both.

Form2 := TForm2.Create(Self);
Form2.DBConnection.Connect;
Form2.ZTransaction1.StartTransaction;

( i also noticed that there is no close transaction in this component.)

After this it will fail when trying to free. Rollback does not have any effect either. And also with this.
Form2.ZTransaction1.Rollback;
Form2.Free;

The error is:
Connection is not open yet.

And it halt the execution and return to the program.

I also tried:
Form2.ZTransaction1.Rollback;
Form2.DBConnection.Disconnect;
Form2.Free;

No go.

Also tried this:
Form2.ZTransaction1.Rollback;
Form2.DBConnection.Disconnect;
Form2.ZTransaction1.Free;
Form2.Free;

But this worked.:
Form2.ZTransaction1.Free;
Form2.Free;

But then i have not closed the connection before closing the form.
Strange...


Working on the test app. And testing it for a while before i am finished and can give it to you.
Test app is actually also work :) Takes extra time to do it good.
:builder:
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 796
Joined: 18.11.2018, 17:37
Location: Hungary

Re: Tested Zeos 8

Post by aehimself »

Afaik Zeos automatically attempts to roll back all uncommitted transactions upon disconnecting / freeing the connection object. I don't think there's a need for you to do it manually.
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
fantablup
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 13.07.2021, 00:03

Re: Tested Zeos 8

Post by fantablup »

The rollback is only a test to see if the component can be freed.

The problem is that the form can not be freed with the TZTransaction inside it.
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Tested Zeos 8

Post by marsupilami »

fantablup wrote: 30.07.2021, 18:18 Working on the test app. And testing it for a while before i am finished and can give it to you.
Test app is actually also work :) Takes extra time to do it good.
:builder:
Thank you for your efforts :)
Post Reply