diff --git a/tests/bugs/core_4212_test.py b/tests/bugs/core_4212_test.py index 112e59e8..4a479cd9 100644 --- a/tests/bugs/core_4212_test.py +++ b/tests/bugs/core_4212_test.py @@ -7,34 +7,40 @@ TITLE: Dropping FK on GTT crashes server DESCRIPTION: JIRA: CORE-4212 FBTEST: bugs.core_4212 +NOTES: + [05.10.2023] pzotov + Confirmed crash on 3.0.0.30566 Alpha1. + Removed SHOW command. It is enough for this test just to try to insert record in the 'T2' table after dropping FK. """ import pytest from firebird.qa import * -db = db_factory(from_backup='core4212.fbk') +db = db_factory(charset = 'win1251') test_script = """ --- 'database': 'Existing', --- 'database_name': 'core4212-25.fdb', - - set autoddl off; + set list on; + create global temporary table t1 (text_id varchar(8) not null primary key); + create global temporary table t2 (text_id varchar(8)); + alter table t2 add constraint t2_fk foreign key (text_id) references t1 (text_id); commit; + + connect '$(DSN)'; + alter table t2 drop constraint t2_fk; - rollback; - show table t2; + commit; + insert into t2(text_id) values('qwerty'); + select * from t2; """ -act = isql_act('db', test_script) +act = isql_act('db', test_script, substitutions = [ ('[ \t]+', ''), ] ) expected_stdout = """ - ID VARCHAR(8) Nullable - CONSTRAINT T2_FK: - Foreign key (ID) References T1 (ID) + TEXT_ID qwerty """ @pytest.mark.version('>=3') def test_1(act: Action): act.expected_stdout = expected_stdout - act.execute() + act.execute(combine_output = True) assert act.clean_stdout == act.clean_expected_stdout