6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 13:33:07 +01:00
firebird-qa/tests/bugs/core_3557_test.py

41 lines
968 B
Python
Raw Permalink Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-22 21:59:15 +01:00
"""
ID: issue-3913
ISSUE: 3913
TITLE: AV in engine when preparing query against dropping table
DESCRIPTION:
JIRA: CORE-3557
FBTEST: bugs.core_3557
2022-01-22 21:59:15 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-22 21:59:15 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-22 21:59:15 +01:00
test_script = """
create table test (id int primary key);
commit;
-- RECONNECT IS MANDATORY HERE IN ORDER TO GET CRASH:
-- ##################################################
connect '$(DSN)' user 'SYSDBA' password 'masterkey';
2021-04-26 20:07:00 +02:00
-- Confirmed for 2.5.0 only: server crashes on running the following EB. 26.02.2015
-- All subsequent releases should produce no stdout & stderr.
set term ^;
execute block as
begin
execute statement 'drop table test';
2021-04-26 20:07:00 +02:00
in autonomous transaction do
execute statement ('insert into test values (1)');
2022-01-22 21:59:15 +01:00
end ^
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-22 21:59:15 +01:00
act = isql_act('db', test_script)
2021-04-26 20:07:00 +02:00
2022-01-22 21:59:15 +01:00
@pytest.mark.version('>=3')
def test_1(act: Action):
2022-01-25 22:55:48 +01:00
act.execute()