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

8 views
Skip to first unread message

Pavel Zotov

unread,
Jun 2, 2026, 5:48:22 PM (18 hours ago) Jun 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
========

Reply all
Reply to author
Forward
0 new messages