'Wrong DeRegisterOpenUnCachedLob beahvior'
Posted: 12.05.2020, 17:44
There is a problem (which was not in the revisions from just a few days ago) with transactions and blob fields in Firebird.
When the code below is run, this is an error:
But, if I open and close ZQuery1 inside transaction, there is no error.
There is no error in any case with sqlite or MariaDb (or Firebird with earlier Zeos revisions) .
(Firebird 3, Zeos r6516, Delphi 2009)
When the code below is run, this is an error:
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EAssertionFailed with message 'Wrong DeRegisterOpenUnCachedLob beahvior (D:\D\3p\zeos\src\dbc\ZDbcFirebirdInterbase.pas, line 1143)'.
Code: Select all
// create table test(id integer primary key, info blob sub_type 1);
ZQuery1.SQL.Text := 'select * from test';
ZQuery1.Open;
ZConnection1.StartTransaction;
ZConnection1.ExecuteDirect( 'delete from test' );
ZConnection1.ExecuteDirect( 'insert into test(id, info) values(1, ''x'')');
ZConnection1.Commit;
ZQuery1.Close; // => EAssertionFailed
Code: Select all
// this is ok
ZQuery1.SQL.Text := 'select * from test';
ZConnection1.StartTransaction;
ZQuery1.Open;
ZConnection1.ExecuteDirect( 'delete from test' );
ZConnection1.ExecuteDirect( 'insert into test(id, info) values(1, ''x'')');
ZQuery1.Close;
ZConnection1.Commit;
(Firebird 3, Zeos r6516, Delphi 2009)