6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 21:43:06 +01:00
firebird-qa/tests/bugs/core_0210_test.py

51 lines
984 B
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-18 20:45:21 +01:00
"""
ID: issue-538
ISSUE: 538
TITLE: CS server crash altering SP in 2 connect
DESCRIPTION:
JIRA: CORE-210
FBTEST: bugs.core_0210
2022-01-18 20:45:21 +01:00
"""
2021-04-26 20:07:00 +02:00
import pytest
2022-01-18 20:45:21 +01:00
from firebird.qa import *
2021-12-10 19:50:31 +01:00
from firebird.driver import tpb, Isolation
2021-04-26 20:07:00 +02:00
2022-01-18 20:45:21 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-18 20:45:21 +01:00
act = python_act('db')
2021-04-26 20:07:00 +02:00
2022-01-18 20:45:21 +01:00
@pytest.mark.version('>=3')
def test_1(act: Action):
stm1 = """create or alter procedure sp_test as
2021-11-10 19:02:05 +01:00
begin
exit;
end
2022-01-18 20:45:21 +01:00
"""
stm2 = """create or alter procedure sp_test as
2021-11-10 19:02:05 +01:00
declare x int;
begin
exit;
end
2022-01-18 20:45:21 +01:00
"""
2021-12-10 19:50:31 +01:00
custom_tpb = tpb(isolation=Isolation.CONCURRENCY)
2022-01-18 20:45:21 +01:00
with act.db.connect() as con1, act.db.connect() as con2:
2021-12-10 19:50:31 +01:00
con1.begin(custom_tpb)
2021-11-10 19:02:05 +01:00
cur1 = con1.cursor()
cur2 = con2.cursor()
cur1.execute(stm1)
con1.commit()
2021-12-10 19:50:31 +01:00
con2.begin(custom_tpb)
2021-11-10 19:02:05 +01:00
cur2.execute(stm2)
con2.commit()
2021-12-10 19:50:31 +01:00
con1.begin(custom_tpb)
2021-11-10 19:02:05 +01:00
cur1.execute(stm1)
con1.commit()
2021-04-26 20:07:00 +02:00