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

52 lines
997 B
Python
Raw Permalink Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-20 17:32:14 +01:00
"""
ID: issue-1850
ISSUE: 1850
TITLE: Collation not propagated between record formats
DESCRIPTION:
JIRA: CORE-1432
FBTEST: bugs.core_1432
2022-01-20 17:32:14 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-20 17:32:14 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-20 17:32:14 +01:00
init_script = """CREATE DOMAIN D_1250 VARCHAR(10) CHARACTER SET WIN1250 COLLATE WIN1250;
2021-04-26 20:07:00 +02:00
CREATE DOMAIN D_CZ VARCHAR(10) CHARACTER SET WIN1250 COLLATE WIN_CZ;
CREATE TABLE T (I INTEGER, A D_1250);
INSERT INTO T VALUES(10, 'a');
COMMIT;
"""
2022-01-20 17:32:14 +01:00
db = db_factory(charset='WIN1250', init=init_script)
2021-04-26 20:07:00 +02:00
2022-01-20 17:32:14 +01:00
test_script = """SET COUNT ON;
2021-04-26 20:07:00 +02:00
SELECT * FROM T WHERE A='A';
ALTER TABLE T ALTER A TYPE D_CZ;
commit;
SELECT * FROM T WHERE A='A';
"""
2022-01-20 17:32:14 +01:00
act = isql_act('db', test_script)
2021-04-26 20:07:00 +02:00
2022-01-20 17:32:14 +01:00
expected_stdout = """Records affected: 0
2021-04-26 20:07:00 +02:00
I A
============ ==========
10 a
Records affected: 1
"""
@pytest.mark.version('>=2.5.0')
2022-01-20 17:32:14 +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