Local temporary table with index. Crash when DDL + DML are in the same Tx and 'COMMIT' presents between 'DROP INDEX' and 'DROP TABLE'.

21 views
Skip to first unread message

Pavel Zotov

unread,
Jun 6, 2026, 5:15:52 AM (9 days ago) Jun 6
to firebird-devel

Consider script:
===========
set bail on;
set list on;
set keep_tran on;
set echo on;
shell if exist r:\temp\tmp4test.fdb del r:\temp\tmp4test.fdb;
create database 'localhost:r:\temp\tmp4test.fdb' user 'sysdba' password 'masterkey';
set autoddl off;
commit;

recreate
LOCAL TEMPORARY
table test(f01 int)
on commit DELETE rows
--on commit PRESERVE rows
;
commit;
insert into test(f01) select i from generate_series(1, 1000) as s(i);

create index test_idx on test(f01);
drop index test_idx;

commit; ----------------------- [ ! ]

drop table test;
commit;

===========

FB will crash when this script is launched with UNcommented commit marked as "[ ! ]".
No errors occur if we Comment out this commit.
No errors occur if LTT has no index.
No errors occur if we comment out 'DROP INDEX' that is before commit (i.e. do 'commit ' just after 'create index' and before 'drop table').

Checked on 6.0.0.1996-263e09d; 6.0.0.1995-e588f9e.
Dump, stack trace, firebird.conf and snapshot 6.0.0.1996-263e09d are here.

Adriano dos Santos Fernandes

unread,
Jun 6, 2026, 3:54:55 PM (8 days ago) Jun 6
to firebir...@googlegroups.com
On Sat, Jun 6, 2026 at 6:15 AM Pavel Zotov <p51...@gmail.com> wrote:

create index test_idx on test(f01);
drop index test_idx;

commit; ----------------------- [ ! ]

drop table test;
commit;

===========

Fixed.


Adriano
 

Pavel Zotov

unread,
Jun 7, 2026, 12:44:35 AM (8 days ago) Jun 7
to firebird-devel
Fixed.

 
Reply all
Reply to author
Forward
0 new messages