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

43 lines
1.1 KiB
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-20 17:32:14 +01:00
"""
ID: issue-2140
ISSUE: 2140
TITLE: Incorrect "key size exceeds implementation restriction for index" error
DESCRIPTION:
JIRA: CORE-1715
FBTEST: bugs.core_1715
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 table t1 (
2021-04-26 20:07:00 +02:00
t1_id integer not null
, vc_50_utf8_utf8 varchar(253) character set utf8 collate utf8
, vc_50_utf8_unicode varchar(169) character set utf8 collate unicode
, constraint pk_t1_id primary key (t1_id)
);"""
2022-01-20 17:32:14 +01:00
db = db_factory(charset='UTF8', init=init_script)
2021-04-26 20:07:00 +02:00
2022-01-20 17:32:14 +01:00
test_script = """create index i_vc_50_utf8_unicode on t1 (vc_50_utf8_unicode);
2021-04-26 20:07:00 +02:00
create index i_vc_50_utf8_utf8 on t1 (vc_50_utf8_utf8);
commit;
show index;
"""
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 = """I_VC_50_UTF8_UNICODE INDEX ON T1(VC_50_UTF8_UNICODE)
2021-04-26 20:07:00 +02:00
I_VC_50_UTF8_UTF8 INDEX ON T1(VC_50_UTF8_UTF8)
PK_T1_ID UNIQUE INDEX ON T1(T1_ID)
"""
2022-01-20 17:32:14 +01:00
@pytest.mark.version('>=3')
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