6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 13:33:07 +01:00
firebird-qa/tests/bugs/core_1506_test.py

27 lines
591 B
Python
Raw Permalink Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-20 17:32:14 +01:00
"""
ID: issue-1921
ISSUE: 1921
TITLE: Server crash with isc_dsql_execute_immediate and zero length string
DESCRIPTION:
JIRA: CORE-1506
FBTEST: bugs.core_1506
2022-01-20 17:32:14 +01:00
"""
2021-04-26 20:07:00 +02:00
import pytest
2022-01-20 17:32:14 +01:00
from firebird.qa import *
2021-11-11 18:01:08 +01:00
from firebird.driver import DatabaseError
2021-04-26 20:07:00 +02:00
2022-01-20 17:32:14 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-20 17:32:14 +01:00
act = python_act('db', substitutions=[('- SQL error code.*', '')])
2021-04-26 20:07:00 +02:00
2022-01-20 17:32:14 +01:00
@pytest.mark.version('>=3')
def test_1(act: Action):
with act.db.connect() as con:
2021-11-11 18:01:08 +01:00
with pytest.raises(DatabaseError, match='.*-Unexpected end of command.*'):
con.execute_immediate('')
2021-04-26 20:07:00 +02:00