Shared metadata cache. FB crashes when table with index is recreated N times

42 views
Skip to first unread message

Pavel Zotov

unread,
Jun 2, 2026, 5:48:22 PMJun 2
to firebird-devel
Consider script:
===========
set bail 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;
-- set transaction snapshot no wait;
-- set transaction read committed read consistency wait;
-- set transaction read committed record_version wait;
-- set transaction read committed no record_version wait;

-- /*
recreate table test(x int); ---------- [ 1 ]
create index test_regular on test(x);
drop index test_regular;
commit;
-- */

recreate table test(x int); ---------- [ 2 ]
create index test_computed on test computed by(x);
drop index test_computed;
commit;

recreate table test(x int); ---------- [ 3 ]
create index test_partial on test(x) where x is not null;
drop index test_partial;
commit;

===========

Note on block where table 'test' and index ' test_regular' are created (marked as  "
[ 1 ]"
).
If this block of code is UNcommented (like it is shown in the script) then FB with shared metadata feature will crash on attempt to run statement marked as "[ 3 ]":
===========
...
recreate table test(x int); ---------- [ 3 ]
Statement failed, SQLSTATE = 08006
Error reading data from the connection.
===========
(checked on 6.0.0.1771; 6.0.0.1978; 6.0.0.1984).
Dumps + stack trace + snapshot 6.0.0.1984-dfd3153 are here.

If we Comment out this block then weird error appears at the tail of output related to dependencies:
========
...
recreate table test(x int); ---------- [ 3 ]
create index test_partial on test(x) where x is not null;
drop index test_partial;
commit;
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-cannot delete
-TABLE "PUBLIC"."TEST"
-there are 1 dependencies
========

Alex Peshkoff

unread,
Jun 15, 2026, 12:26:47 PM (8 days ago) Jun 15
to firebir...@googlegroups.com
Исправлено.


Alex Peshkoff

unread,
Jun 15, 2026, 12:28:05 PM (8 days ago) Jun 15
to firebir...@googlegroups.com
Sorry for Russian text.

Should be fixed now, please check it.


Pavel Zotov

unread,
Jun 18, 2026, 1:53:33 PM (5 days ago) Jun 18
to firebird-devel
>  Should be fixed now, please check it.

The problem no more exists.
Checked on 6.0.0.2009-fa5ffeb (15.06.2026 13:57:09+0000, "Fix for crash when table with index is recreated N times"). 
Test not needed because issue is covered by test_fa5ffeba


 
Reply all
Reply to author
Forward
0 new messages