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

39 lines
1.2 KiB
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-27 20:08:36 +01:00
"""
ID: issue-6532
ISSUE: 6532
TITLE: Hex number used at end of statement (e.g. CREATE DOMAIN ... DEFAULT) may read
invalid memory and produce wrong values or exceptions
2022-01-27 20:08:36 +01:00
DESCRIPTION:
JIRA: CORE-6290
FBTEST: bugs.core_6290
2022-01-27 20:08:36 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-27 20:08:36 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-27 20:08:36 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-27 20:08:36 +01:00
test_script = """
2021-04-26 20:07:00 +02:00
-- All following statements should not produce neither STDOUT nor STDERR:
create domain dm_test_01 as double precision default 100000000;
create domain dm_test_02 as bigint default 0xf0000000;
----------------------------------------------------------------
create domain dm_test_03 as int default 1;
2022-01-27 20:08:36 +01:00
create domain dm_test_04 as bigint default 0xf0000000;
2021-04-26 20:07:00 +02:00
----------------------------------------------------------------
create domain dm_test_05 as date default 'TODAY';
2022-01-27 20:08:36 +01:00
create domain dm_test_06 as bigint default 0x0F0000000;
2021-04-26 20:07:00 +02:00
----------------------------------------------------------------
create domain dm_test_07 as boolean default true;
create domain dm_test_08 as bigint default 0x0F0000000;
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-27 20:08:36 +01:00
act = isql_act('db', test_script)
2021-04-26 20:07:00 +02:00
@pytest.mark.version('>=3.0.6')
2022-01-27 20:08:36 +01:00
def test_1(act: Action):
act.execute()