2021-04-26 20:07:00 +02:00
|
|
|
#coding:utf-8
|
|
|
|
|
2022-01-19 17:54:56 +01:00
|
|
|
"""
|
|
|
|
ID: issue-1479
|
2023-10-05 14:32:05 +02:00
|
|
|
ISSUE: https://github.com/FirebirdSQL/firebird/issues/1479
|
2022-01-19 17:54:56 +01:00
|
|
|
TITLE: ALTER DOMAIN and ALTER TABLE don't allow to change character set and/or collation
|
|
|
|
DESCRIPTION:
|
|
|
|
JIRA: CORE-1058
|
2022-02-02 15:46:19 +01:00
|
|
|
FBTEST: bugs.core_1058
|
2023-10-05 14:32:05 +02:00
|
|
|
NOTES:
|
|
|
|
[05.10.2023] pzotov
|
|
|
|
Removed SHOW command for check result because its output often changes.
|
|
|
|
It is enough for this test to verify just absense of any error messages.
|
2022-01-19 17:54:56 +01:00
|
|
|
"""
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-19 17:54:56 +01:00
|
|
|
import pytest
|
|
|
|
from firebird.qa import *
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-19 17:54:56 +01:00
|
|
|
db = db_factory(init=init_script)
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2023-10-05 14:32:05 +02:00
|
|
|
test_script = """
|
|
|
|
create domain dm_test varchar(10) character set win1251;
|
|
|
|
create table test1(s dm_test);
|
|
|
|
create table test2(s varchar(10) character set win1251);
|
|
|
|
---------
|
|
|
|
alter domain dm_test varchar(10) character set utf8;
|
|
|
|
alter domain dm_test varchar(10) character set utf8 collate unicode_ci;
|
2021-04-26 20:07:00 +02:00
|
|
|
"""
|
|
|
|
|
2022-01-19 17:54:56 +01:00
|
|
|
act = isql_act('db', test_script)
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2023-10-05 14:32:05 +02:00
|
|
|
expected_stdout = """
|
2021-04-26 20:07:00 +02:00
|
|
|
"""
|
|
|
|
|
2022-01-19 17:54:56 +01:00
|
|
|
@pytest.mark.version('>=3')
|
|
|
|
def test_1(act: Action):
|
|
|
|
act.expected_stdout = expected_stdout
|
2023-10-05 14:32:05 +02:00
|
|
|
act.execute(combine_output = True)
|
2022-01-19 17:54:56 +01:00
|
|
|
assert act.clean_stdout == act.clean_expected_stdout
|
2021-04-26 20:07:00 +02:00
|
|
|
|