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

55 lines
1.5 KiB
Python
Raw Permalink Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-25 22:55:48 +01:00
"""
ID: issue-5878
ISSUE: 5878
TITLE: Gradual slowdown compilation (create, recreate or drop) of views
DESCRIPTION:
JIRA: CORE-5612
FBTEST: bugs.core_5612
2022-01-25 22:55:48 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
test_script = """
2021-04-26 20:07:00 +02:00
set list on;
set count on;
select ri.rdb$index_id idx_id,rs.rdb$field_position pos, rs.rdb$field_name key
from rdb$indices ri
left join rdb$index_segments rs on ri.rdb$index_name = rs.rdb$index_name
where ri.rdb$relation_name = upper('rdb$dependencies')
order by 1,2;
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
act = isql_act('db', test_script)
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
expected_stdout = """
2021-04-26 20:07:00 +02:00
IDX_ID 1
POS 0
KEY RDB$DEPENDENT_NAME
IDX_ID 1
POS 1
KEY RDB$DEPENDENT_TYPE
IDX_ID 2
POS 0
KEY RDB$DEPENDED_ON_NAME
IDX_ID 2
POS 1
KEY RDB$DEPENDED_ON_TYPE
IDX_ID 2
POS 2
KEY RDB$FIELD_NAME
Records affected: 5
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
@pytest.mark.version('>=4.0')
2022-01-25 22:55:48 +01:00
def test_1(act: Action):
act.expected_stdout = expected_stdout
act.execute()
assert act.clean_stdout == act.clean_expected_stdout