Computed-by or partial indices: dependencies remain after drop indices + commit. Can not drop appropriate table.

20 views
Skip to first unread message

Pavel Zotov

unread,
Jun 11, 2026, 5:12:57 PM (3 days ago) Jun 11
to firebird-devel
The problem described here seems unresolved (though FB no more crashes).

Following script FAILS on any checked type of tables (permanent / GTT seesion-level / GTT transaction-level):
================
set bail on;
set list 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  table test(f01 varbinary(16));

--recreate global temporary table test(f01 varbinary(16)) on commit preserve rows;

recreate global temporary table test(f01 varbinary(16)) on commit delete rows;

commit;

insert into test(f01) select gen_uuid() from generate_series(1, 1000) as s(i);
commit;

create index test_f01_computed on test computed by (crypt_hash(f01 using sha1));
create index test_f01_partial on test (f01) where f01 is not null;

drop index test_f01_computed;
drop index test_f01_partial;

commit;

set bail OFF; -- error raises if no dependencies!
show depend test;
commit;
set bail ON;

drop table test;
commit;

================

Output tail is:
================
...
set bail OFF; -- error raises if no dependencies!
show depend test;
PUBLIC.TEST_F01_COMPUTED:Expression index->F01, PUBLIC.TEST_F01_PARTIAL:FUNCTION->F01
        [PUBLIC.TEST:Table]
+++
commit;
set bail ON;

drop table test;
commit;
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-cannot delete
-TABLE "PUBLIC"."TEST"
-there are 2 dependencies

================
Checked on 6.0.0.2002-e0d62fa.

Alex Peshkoff

unread,
Jun 12, 2026, 10:04:37 AM (2 days ago) Jun 12
to firebir...@googlegroups.com
On 6/12/26 00:12, Pavel Zotov wrote:
The problem described here seems unresolved (though FB no more crashes).

Yes, I'm working on it. Why repeat same problem twice if it was not replied as fixed?


Pavel Zotov

unread,
Jun 12, 2026, 10:44:34 AM (2 days ago) Jun 12
to firebird-devel
>  Why repeat same problem twice if it was not replied as fixed?

I was sure that original problem differs from described here and that it was fixed by #c62f0609

Reply all
Reply to author
Forward
0 new messages