2021-04-26 20:07:00 +02:00
|
|
|
#coding:utf-8
|
|
|
|
|
2022-01-21 18:49:26 +01:00
|
|
|
"""
|
|
|
|
ID: issue-3058
|
|
|
|
ISSUE: 3058
|
|
|
|
TITLE: Incorrect "string right truncation" error with NONE column and multibyte connection charset
|
|
|
|
DESCRIPTION:
|
|
|
|
JIRA: CORE-2651
|
2022-02-02 15:46:19 +01:00
|
|
|
FBTEST: bugs.core_2651
|
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
|
|
|
init_script = """create table TEST_NONE
|
2021-04-26 20:07:00 +02:00
|
|
|
(VARCHAR_1 VARCHAR(1) CHARACTER SET NONE);
|
|
|
|
|
|
|
|
insert into test_none values (ascii_char(1));
|
|
|
|
"""
|
|
|
|
|
2022-01-21 18:49:26 +01:00
|
|
|
db = db_factory(init=init_script)
|
|
|
|
|
|
|
|
act = python_act('db')
|
|
|
|
|
|
|
|
@pytest.mark.version('>=3')
|
|
|
|
def test_1(act: Action):
|
|
|
|
with act.db.connect(charset='CP943C') as con:
|
2021-11-16 19:44:53 +01:00
|
|
|
c = con.cursor()
|
|
|
|
try:
|
|
|
|
c.execute("select * from TEST_NONE")
|
|
|
|
except:
|
|
|
|
pytest.fail("Test FAILED")
|
2021-04-26 20:07:00 +02:00
|
|
|
|
|
|
|
|