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

43 lines
1.3 KiB
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-21 18:49:26 +01:00
"""
ID: issue-3017
ISSUE: 3017
TITLE: Introducer (_charset) problems with monitoring and persistent modules
DESCRIPTION:
Usage of introducer (_charset ) is problematic due to usage of different character sets
in a single command. The problems are different from version to version, and may be
transliteration error, malformed string or just unexpected things.
JIRA: CORE-2607
FBTEST: bugs.core_2607
2022-01-21 18:49:26 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-21 18:49:26 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-21 18:49:26 +01:00
db = db_factory(charset='UTF8')
2021-11-16 19:44:53 +01:00
2022-01-21 18:49:26 +01:00
act = python_act('db')
2021-04-26 20:07:00 +02:00
2022-01-21 18:49:26 +01:00
expected_stdout = """
2021-04-26 20:07:00 +02:00
select mon$sql_text from mon$statements s where s.mon$sql_text containing '_dos850'
select _dos850 X'313233C3A1C3A9343536' from rdb$database
2021-11-16 19:44:53 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-21 18:49:26 +01:00
@pytest.mark.version('>=3')
def test_1(act: Action, capsys):
act.expected_stdout = expected_stdout
with act.db.connect() as con1:
2021-12-19 22:25:36 +01:00
c1 = con1.cursor()
2022-01-21 18:49:26 +01:00
with act.db.connect() as con2:
2021-12-19 22:25:36 +01:00
c2 = con2.cursor()
2021-11-16 19:44:53 +01:00
c1.execute("select _dos850 '123áé456' from rdb$database")
c2.execute("select mon$sql_text from mon$statements s where s.mon$sql_text containing '_dos850'")
for r in c2:
print(r[0])
2022-01-21 18:49:26 +01:00
act.stdout = capsys.readouterr().out
assert act.clean_stdout == act.clean_expected_stdout
2021-11-16 19:44:53 +01:00
2021-04-26 20:07:00 +02:00