2021-04-26 20:07:00 +02:00
|
|
|
#coding:utf-8
|
|
|
|
|
2022-01-23 20:41:55 +01:00
|
|
|
"""
|
|
|
|
ID: issue-4797
|
|
|
|
ISSUE: 4797
|
|
|
|
TITLE: Field RDB$MAP_TO_TYPE is not present in RDB$TYPES
|
|
|
|
DESCRIPTION:
|
|
|
|
JIRA: CORE-4477
|
2022-02-02 15:46:19 +01:00
|
|
|
FBTEST: bugs.core_4477
|
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
|
|
|
set list on;
|
|
|
|
select rdb$field_name,rdb$type,rdb$type_name,rdb$system_flag from rdb$types where upper(rdb$field_name) = upper('rdb$map_to_type') order by rdb$type;
|
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
|
|
|
|
2022-01-23 20:41:55 +01:00
|
|
|
expected_stdout = """
|
|
|
|
RDB$FIELD_NAME RDB$MAP_TO_TYPE
|
2021-04-26 20:07:00 +02:00
|
|
|
RDB$TYPE 0
|
2022-01-23 20:41:55 +01:00
|
|
|
RDB$TYPE_NAME USER
|
2021-04-26 20:07:00 +02:00
|
|
|
RDB$SYSTEM_FLAG 1
|
|
|
|
|
2022-01-23 20:41:55 +01:00
|
|
|
RDB$FIELD_NAME RDB$MAP_TO_TYPE
|
2021-04-26 20:07:00 +02:00
|
|
|
RDB$TYPE 1
|
2022-01-23 20:41:55 +01:00
|
|
|
RDB$TYPE_NAME ROLE
|
2021-04-26 20:07:00 +02:00
|
|
|
RDB$SYSTEM_FLAG 1
|
2021-12-22 20:23:11 +01:00
|
|
|
"""
|
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):
|
|
|
|
act.expected_stdout = expected_stdout
|
|
|
|
act.execute()
|
|
|
|
assert act.clean_stdout == act.clean_expected_stdout
|
2021-04-26 20:07:00 +02:00
|
|
|
|