Bugcheckabort with message "wrong record length (183), file: vio.cpp line:
1311" when use cursor with "order by ID+0" and "for update with lock"
--------------------------------------------------------------------------------------------------------------------------------------------------
Key: CORE-4561
URL: http://tracker.firebirdsql.org/browse/CORE-4561
Project: Firebird Core
Issue Type: Bug
Components: Engine
Affects Versions: 3.0 Alpha 2
Reporter: Pavel Zotov
Attachments: gdb-firebird.140927_215115.1.zip
DDL:
====
$ /opt/fb30trnk/bin/isql -q
SQL> create database 'tmpbug.fdb'; commit;
SQL> [root@oel64 21:49:49 fb30]$ /opt/fb30trnk/bin/isql -q
SQL> create database '/var/db/fb30/tmpbug.fdb'; commit;
SQL> connect 'localhost/3330:/var/db/fb30/tmpbug.fdb';
Database: 'localhost/3330:/var/db/fb30/tmpbug.fdb'
SQL> show version;
ISQL Version: LI-T3.0.0.31309 Firebird 3.0 Alpha 2
Server version:
Firebird/Linux/AMD/Intel/x64 (access method), version "LI-T3.0.0.31309 Firebird
3.0 Alpha 2"
Firebird/Linux/AMD/Intel/x64 (remote server), version "LI-T3.0.0.31309 Firebird
3.0 Alpha 2/tcp (oel64)/P13"
Firebird/Linux/AMD/Intel/x64 (remote interface), version "LI-T3.0.0.31309
Firebird 3.0 Alpha 2/tcp (oel64)/P13"
on disk structure version 12.0
SQL> recreate table tm(id int);
SQL> commit;
SQL> insert into tm(id) values(1);
SQL> insert into tm(id) values(2); -- at least TWO records need to be added
SQL> commit;
The following EB lead to bug check abort and message "wrong record length
(183), file: vio.cpp line: 1311" in firebird.log:
select current_timestamp as dts,'before execute block. . .' as msg from
rdb$database;
set term ^;
execute block as
begin
for
select id
from tm
order by id+0 -- "+0" is mandatory for getting BCA
for update with lock -- and this also is mandatory
as cursor c
do begin
delete from tm where current of c;
end
end^
set term ;^
select current_timestamp as dts,'after execute block' as msg from rdb$database;
commit;
ISQL console:
---
Statement failed, SQLSTATE = 08006
Error reading data from the connection.
---
firebird.log:
oel64 Sat Sep 27 21:48:24 2014
/opt/fb30trnk/bin/fbguard: guardian starting /opt/fb30trnk/bin/firebird
oel64 Sat Sep 27 21:51:15 2014
Database: /var/db/fb30/tmpbug.fdb
internal Firebird consistency check (wrong record length (183), file:
vio.cpp line: 1311)
oel64 Sat Sep 27 21:51:15 2014
/opt/fb30trnk/bin/fbguard: /opt/fb30trnk/bin/firebird terminated
abnormally (-1)
oel64 Sat Sep 27 21:51:15 2014
/opt/fb30trnk/bin/fbguard: guardian starting /opt/fb30trnk/bin/firebird
oel64 Sat Sep 27 21:51:24 2014
REMOTE INTERFACE/gds__detach: Unsuccesful detach from database.
Uncommitted work may have been lost.
Error writing data to the connection.
Two stack traces (for SC ans SS) please see in attach.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel