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

38 lines
770 B
Python
Raw Permalink Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-23 20:41:55 +01:00
"""
ID: issue-4812
ISSUE: 4812
TITLE: Index not found for RECREATE TRIGGER
DESCRIPTION:
JIRA: CORE-4493
FBTEST: bugs.core_4493
2022-01-23 20:41:55 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-23 20:41:55 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-23 20:41:55 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-23 20:41:55 +01:00
test_script = """
2021-04-26 20:07:00 +02:00
recreate table mvt(id int primary key, ac int, amount numeric(12,2));
recreate table account(id int primary key, balance numeric(12,2));
commit;
2022-01-23 20:41:55 +01:00
2021-04-26 20:07:00 +02:00
set term ^;
recreate trigger tai_mvt active after insert or update position 1 on mvt as
begin
update account a set a.balance = a.balance + new.amount
where a.id = new.ac;
end
^
set term ;^
commit;
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-23 20:41:55 +01:00
act = isql_act('db', test_script)
2021-04-26 20:07:00 +02:00
@pytest.mark.version('>=3.0')
2022-01-23 20:41:55 +01:00
def test_1(act: Action):
2022-01-25 22:55:48 +01:00
act.execute()