2021-04-26 20:07:00 +02:00
|
|
|
#coding:utf-8
|
|
|
|
|
2022-01-19 17:54:56 +01:00
|
|
|
"""
|
|
|
|
ID: issue-1417
|
|
|
|
ISSUE: 1417
|
|
|
|
TITLE: AV at rollback and \\ or garbage collection if updated table have expression index with SELECT in it
|
|
|
|
DESCRIPTION:
|
|
|
|
JIRA: CORE-1006
|
2022-02-02 15:46:19 +01:00
|
|
|
FBTEST: bugs.core_1006
|
2022-01-19 17:54:56 +01:00
|
|
|
"""
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-19 17:54:56 +01:00
|
|
|
import pytest
|
|
|
|
from firebird.qa import *
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-19 17:54:56 +01:00
|
|
|
db = db_factory(from_backup='core1006.fbk')
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-19 17:54:56 +01:00
|
|
|
test_script = """
|
2021-04-26 20:07:00 +02:00
|
|
|
set term ^;
|
|
|
|
execute block
|
|
|
|
as
|
|
|
|
declare f1 int;
|
|
|
|
declare f2 int;
|
|
|
|
begin
|
|
|
|
for
|
|
|
|
select
|
|
|
|
t1.id
|
|
|
|
as id1 -- <<< ::: NB ::: add alias, otherwise can`t compile in 3.0
|
|
|
|
,t2.id
|
|
|
|
as id2 -- <<< ::: NB ::: add alias, otherwise can`t compile in 3.0
|
|
|
|
from table1 t1, table2 t2
|
|
|
|
where t1.id = t2.id
|
|
|
|
into :f1, :f2
|
|
|
|
as cursor cur
|
|
|
|
do
|
|
|
|
update table1 set name = :f1 + :f2 where current of cur;
|
|
|
|
end
|
|
|
|
^ set term ;^
|
|
|
|
rollback;
|
2021-12-22 20:23:11 +01:00
|
|
|
"""
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-19 17:54:56 +01:00
|
|
|
act = isql_act('db', test_script)
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-19 17:54:56 +01:00
|
|
|
@pytest.mark.version('>=3')
|
|
|
|
def test_1(act: Action):
|
2022-01-25 22:55:48 +01:00
|
|
|
act.execute()
|