mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-02-02 02:40:42 +01:00
Added/Updated tests\bugs\gh_7651_test.py: Confirmed bug on 4.0.3.2955. Checked on 4.0.3.2956 -- all fine.
This commit is contained in:
parent
5054542f21
commit
c9a2075b04
44
tests/bugs/gh_7651_test.py
Normal file
44
tests/bugs/gh_7651_test.py
Normal file
@ -0,0 +1,44 @@
|
||||
#coding:utf-8
|
||||
|
||||
"""
|
||||
ID: issue-7651
|
||||
ISSUE: https://github.com/FirebirdSQL/firebird/issues/7651
|
||||
TITLE: Unable to find savepoint in insert with nested query and returning clause in FB4
|
||||
DESCRIPTION:
|
||||
NOTES:
|
||||
[27.06.2023] pzotov
|
||||
Confirmed bug on 4.0.3.2955. Checked on 4.0.3.2956 -- all fine.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from firebird.qa import *
|
||||
|
||||
db = db_factory()
|
||||
|
||||
test_script = """
|
||||
set list on;
|
||||
set bail on;
|
||||
recreate table test (
|
||||
id int primary key using index test_id
|
||||
,val int not null
|
||||
);
|
||||
|
||||
savepoint s;
|
||||
insert into test(id, val) values (1, (select count(*) From test Where id = 1)) returning id, val;
|
||||
release savepoint s; -- this caused "SQLSTATE = 3B000 / Unable to find savepoint with name S in transaction context"
|
||||
select 'Completed' as msg from rdb$database;
|
||||
"""
|
||||
|
||||
act = isql_act('db', test_script)
|
||||
|
||||
expected_stdout = """
|
||||
ID 1
|
||||
VAL 0
|
||||
MSG Completed
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=3.0')
|
||||
def test_1(act: Action):
|
||||
act.expected_stdout = expected_stdout
|
||||
act.execute()
|
||||
assert act.clean_stdout == act.clean_expected_stdout
|
Loading…
Reference in New Issue
Block a user