Packaged temporary tables. Several failed tests since #9247c82b

12 views
Skip to first unread message

Pavel Zotov

unread,
Jun 4, 2026, 1:46:27 PM (10 days ago) Jun 4
to firebird-devel
Several problems did appear with QA since commit 9247c82b
// date: 12-may-2026 07:36:44 2026 -0300
// message: "Feature #8974 - Temporary Tables in Packages (#8983)"

Please consider following scripts:

case-1 (based on bugs/core_1152_test.py)
=======
set bail on;
set autoterm 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';
show version;
create table test(
    int1 int,
    int2 int,
    constraint chk_nn check (int1 is null or int2 is null)
);

commit; connect 'localhost:r:\temp\tmp4test.fdb' user sysdba password 'masterkey';

drop table test;

=======

Last statement will fail with:
=======
Statement failed, SQLSTATE = 23000
unsuccessful metadata update
-DROP TABLE "PUBLIC"."TEST" failed
-Cannot delete column being used in an Integrity Constraint.

=======

####################################################

case-2 (based on functional/gtcs/test_misplaced_collation_in_extracted_metadata.py)
=======
set bail on;
set keep_tran on;
set list on;

--#############
SET NAMES UTF8; -- <<< ACHTUNG >>>
--#############

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';
commit;
set transaction read committed no record_version wait;

create domain domain_with_collate_clause as char(1)
    character set iso8859_1
    default 'v'
    check(value >='a' and value <='z')
    collate es_es;
commit;

create table table_with_collated_field (
    field_01 domain_with_collate_clause
        default 'w'
        collate pt_pt
);
alter table table_with_collated_field add constraint f01_check check( field_01 >= 'c' );
commit;

set bail off;

drop table table_with_collated_field;
drop domain domain_with_collate_clause;
commit;
=======
::: NOTE ::: it is crucial to make connection with some charset to reproduce problem (utf8 / iso8859_1 / win1251 etc) . If no charset is specified then bug not appears.

Output:
=======
drop table table_with_collated_field;
Statement failed, SQLSTATE = 22000
unsuccessful metadata update
-DROP TABLE "PUBLIC"."TABLE_WITH_COLLATED_FIELD" failed
-no current record for fetch operation

drop domain domain_with_collate_clause;
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-DROP DOMAIN "PUBLIC"."DOMAIN_WITH_COLLATE_CLAUSE" failed
-Domain "PUBLIC"."DOMAIN_WITH_COLLATE_CLAUSE" is used in table "PUBLIC"."TABLE_WITH_COLLATED_FIELD" (local name "FIELD_01") and cannot be dropped

=======

In both cases no erros must occur.

PS.
This is link to snapshots:
    * 6.0.0.1942-c1ee670-x64.7z - has no aforesaid problem;
    * 6.0.0.1942-9247c82-x64.7z - first snapshot with this oddity.

Reply all
Reply to author
Forward
0 new messages