6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-23 05:53:06 +01:00
firebird-qa/tests/bugs/core_1112_test.py

31 lines
699 B
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-19 17:54:56 +01:00
"""
ID: issue-1532
ISSUE: 1532
TITLE: Crash when dealing with a string literal longer than 32K
DESCRIPTION:
JIRA: CORE-1112
FBTEST: bugs.core_1112
2022-01-19 17:54:56 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-19 17:54:56 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-19 17:54:56 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-19 17:54:56 +01:00
act = python_act('db')
2021-04-26 20:07:00 +02:00
2022-01-19 17:54:56 +01:00
@pytest.mark.version('>=3')
def test_1(act: Action):
with act.db.connect() as con:
2021-11-10 19:02:05 +01:00
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',)]
2021-04-26 20:07:00 +02:00