2021-12-30 19:43:52 +01:00
|
|
|
#coding:utf-8
|
|
|
|
|
2022-01-27 20:08:36 +01:00
|
|
|
"""
|
|
|
|
ID: issue-6915
|
|
|
|
ISSUE: 6915
|
|
|
|
TITLE: Allow attribute DISABLE-COMPRESSIONS in UNICODE collations
|
|
|
|
DESCRIPTION:
|
2024-12-30 10:13:09 +01:00
|
|
|
Original discussion:
|
|
|
|
https://sourceforge.net/p/firebird/mailman/firebird-devel/thread/9361c612-d720-eb76-d412-7101518ca60d%40ibphoenix.cz/
|
|
|
|
|
|
|
|
Only ability to use 'DISABLE-COMPRESSION' in attributes list is checked here.
|
|
|
|
Performance comparison with and without this attribute will be checked in separate test.
|
2024-12-24 12:21:11 +01:00
|
|
|
NOTES:
|
|
|
|
[24.12.2024] pzotov
|
|
|
|
Several tests have been added in order to check PERFORMANCE affect of 'DISABLE-COMPRESSIONS=1':
|
|
|
|
* bugs/gh_6915_cs_cz_test.py
|
|
|
|
* bugs/gh_6915_hu_hu_test.py
|
2022-01-27 20:08:36 +01:00
|
|
|
"""
|
2021-12-30 19:43:52 +01:00
|
|
|
|
2022-01-27 20:08:36 +01:00
|
|
|
import pytest
|
|
|
|
from firebird.qa import *
|
2021-12-30 19:43:52 +01:00
|
|
|
|
2022-01-27 20:08:36 +01:00
|
|
|
db = db_factory()
|
2021-12-30 19:43:52 +01:00
|
|
|
|
2022-01-27 20:08:36 +01:00
|
|
|
test_script = """
|
2021-12-30 19:43:52 +01:00
|
|
|
create collation coll_cs_dc
|
2022-01-27 20:08:36 +01:00
|
|
|
for UTF8
|
|
|
|
from UNICODE
|
|
|
|
case sensitive
|
2021-12-30 19:43:52 +01:00
|
|
|
'LOCALE=cs_CZ;DISABLE-COMPRESSIONS=1'
|
|
|
|
;
|
|
|
|
|
|
|
|
create collation coll_ci_dc
|
2022-01-27 20:08:36 +01:00
|
|
|
for UTF8
|
|
|
|
from UNICODE
|
|
|
|
case insensitive
|
2021-12-30 19:43:52 +01:00
|
|
|
'LOCALE=cs_CZ;DISABLE-COMPRESSIONS=1'
|
|
|
|
;
|
|
|
|
|
|
|
|
create collation coll_cs_dc_ns
|
2022-01-27 20:08:36 +01:00
|
|
|
for UTF8
|
|
|
|
from UNICODE
|
|
|
|
case sensitive
|
2021-12-30 19:43:52 +01:00
|
|
|
'LOCALE=cs_CZ;DISABLE-COMPRESSIONS=1;NUMERIC-SORT=1'
|
|
|
|
;
|
|
|
|
|
|
|
|
create collation coll_ci_dc_ns
|
2022-01-27 20:08:36 +01:00
|
|
|
for UTF8
|
|
|
|
from UNICODE
|
|
|
|
case insensitive
|
2021-12-30 19:43:52 +01:00
|
|
|
'LOCALE=cs_CZ;DISABLE-COMPRESSIONS=1;NUMERIC-SORT=1'
|
|
|
|
;
|
|
|
|
"""
|
|
|
|
|
2022-01-27 20:08:36 +01:00
|
|
|
act = isql_act('db', test_script, substitutions=[('[ \t]+', ' ')])
|
2021-12-30 19:43:52 +01:00
|
|
|
|
2024-12-29 07:57:56 +01:00
|
|
|
@pytest.mark.intl
|
2021-12-30 19:43:52 +01:00
|
|
|
@pytest.mark.version('>=4.0.1')
|
2022-01-27 20:08:36 +01:00
|
|
|
def test_1(act: Action):
|
|
|
|
act.execute()
|
|
|
|
assert act.clean_stdout == act.clean_expected_stdout
|