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_4713_test.py

51 lines
1.3 KiB
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-24 20:27:02 +01:00
"""
ID: issue-5020
ISSUE: 5020
TITLE: "BLOB not found" error at rollback after insert into table with expression index
DESCRIPTION:
JIRA: CORE-4713
FBTEST: bugs.core_4713
2022-01-24 20:27:02 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-24 20:27:02 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-24 20:27:02 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-24 20:27:02 +01:00
test_script = """
2021-04-26 20:07:00 +02:00
recreate table T1 ( bx blob sub_type text );
2022-01-24 20:27:02 +01:00
2021-04-26 20:07:00 +02:00
create index t1_idx on T1 computed by (cast(substring(bx from 1 for 1000) as varchar(1000)));
commit;
2022-01-24 20:27:02 +01:00
2021-04-26 20:07:00 +02:00
set term ^;
execute block as
declare n int = 250;
begin
while (n>0) do insert into t1(bx) values( rpad( 'QWERTY', 1000, uuid_to_char(gen_uuid()) ) ) returning :n-1 into n;
end
^
set term ;^
2022-01-24 20:27:02 +01:00
2021-04-26 20:07:00 +02:00
rollback;
-- 2.5.3 (WI-V2.5.3.26780): no error.
-- 2.5.2 (WI-V2.5.2.26540):
-- Statement failed, SQLSTATE = HY000
-- BLOB not found
-- -BLOB not found
-- -BLOB not found
-- -BLOB not found
-- Statement failed, SQLSTATE = 08003
-- invalid transaction handle (expecting explicit transaction start)
2022-01-24 20:27:02 +01:00
-- 2.5.1 (WI-V2.5.1.26351):
2021-04-26 20:07:00 +02:00
-- the same as 2.5.2 + crash ("08006 / -Error reading data from the connection")
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-24 20:27:02 +01:00
act = isql_act('db', test_script)
2021-04-26 20:07:00 +02:00
2022-01-24 20:27:02 +01:00
@pytest.mark.version('>=3')
def test_1(act: Action):
2022-01-25 22:55:48 +01:00
act.execute()