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

31 lines
699 B
Python

#coding:utf-8
"""
ID: issue-1532
ISSUE: 1532
TITLE: Crash when dealing with a string literal longer than 32K
DESCRIPTION:
JIRA: CORE-1112
FBTEST: bugs.core_1112
"""
import pytest
from firebird.qa import *
db = db_factory()
act = python_act('db')
@pytest.mark.version('>=3')
def test_1(act: Action):
with act.db.connect() as con:
c = con.cursor()
longstr = 'abc' * 10930
c.execute(f"select * from rdb$database where '{longstr}' = 'a'")
c.execute(f"select * from rdb$database where '{longstr}' containing 'a'")
c.execute("select 'a' from rdb$database")
result = c.fetchall()
assert result == [('a',)]