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_5536_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-25 22:55:48 +01:00
"""
ID: issue-5804
ISSUE: 5804
TITLE: Connections compressed and encrypted in MON$ATTACHMENTS table
DESCRIPTION:
JIRA: CORE-5536
FBTEST: bugs.core_5536
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 planonly;
set sqlda_display on;
select mon$wire_compressed, mon$wire_encrypted
from mon$attachments
where mon$attachment_id = current_connection
;
-- Fields that were used before:
-- MON$CONNECTION_COMPRESSED in (false, true)
-- and MON$CONNECTION_ENCRYPTED in (false, true)
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
INPUT message field count: 0
PLAN (MON$ATTACHMENTS NATURAL)
OUTPUT message field count: 2
01: sqltype: 32764 BOOLEAN Nullable scale: 0 subtype: 0 len: 1
: name: MON$WIRE_COMPRESSED alias: MON$WIRE_COMPRESSED
: table: MON$ATTACHMENTS owner: SYSDBA
02: sqltype: 32764 BOOLEAN Nullable scale: 0 subtype: 0 len: 1
: name: MON$WIRE_ENCRYPTED alias: MON$WIRE_ENCRYPTED
: table: MON$ATTACHMENTS owner: SYSDBA
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
2021-04-26 20:07:00 +02:00