Page 1 of 1

'Wrong DeRegisterOpenUnCachedLob beahvior'

Posted: 12.05.2020, 17:44
by abonic
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:
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
But, if I open and close ZQuery1 inside transaction, there is no error.

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;
There is no error in any case with sqlite or MariaDb (or Firebird with earlier Zeos revisions) .

(Firebird 3, Zeos r6516, Delphi 2009)

Re: 'Wrong DeRegisterOpenUnCachedLob beahvior'

Posted: 14.05.2020, 15:24
by marsupilami
I created ticket #427 for this. A test case will be added to the test suites for this.

Re: 'Wrong DeRegisterOpenUnCachedLob beahvior'

Posted: 15.05.2020, 08:55
by marsupilami
Hello abonic,

this problem should be solved in Rev. 6528. Could you please chek it?

Best regards,

Jan

Re: 'Wrong DeRegisterOpenUnCachedLob beahvior'

Posted: 15.05.2020, 09:13
by abonic
I don't know about rev. 6528 but in latest rev. 6530 the problem seems to be solved.