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

56 lines
1.4 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-6386
ISSUE: 6386
TITLE: Server crashes when it run SQL
DESCRIPTION:
Confirmed bug on: 4.0.0.1573, 3.0.5.33166
(got in firebird.log: "internal Firebird consistency check (invalid SEND request (167), file: JrdStatement.cpp line: 327)")
JIRA: CORE-6137
FBTEST: bugs.core_6137
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 = """
create table tmp_labelbarcode (
id integer not null,
barcode char(20) not null,
idlabel integer not null
);
2021-04-26 20:07:00 +02:00
2022-01-27 20:08:36 +01:00
alter table tmp_labelbarcode add primary key (id);
create index tmlb_barcode on tmp_labelbarcode (barcode);
create index tmlb_idlabel on tmp_labelbarcode (idlabel);
create unique index tmp_labelbarcode_idx1 on tmp_labelbarcode (barcode, idlabel);
2021-04-26 20:07:00 +02:00
commit;
2022-01-27 20:08:36 +01:00
insert into tmp_labelbarcode (id, barcode, idlabel) values (224423, '4627136039368', 278164);
2021-04-26 20:07:00 +02:00
commit;
set count on;
--set echo on;
2022-01-27 20:08:36 +01:00
select tmp_labelbarcode.BARCODE
from tmp_labelbarcode
2021-04-26 20:07:00 +02:00
where tmp_labelbarcode.BARCODE = '462713603936820000004620016596753'
2022-01-27 20:08:36 +01:00
order by tmp_labelbarcode.BARCODE
2021-04-26 20:07:00 +02:00
;
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
2022-01-27 20:08:36 +01:00
expected_stdout = """
2021-04-26 20:07:00 +02:00
Records affected: 0
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-27 20:08:36 +01:00
@pytest.mark.version('>=3')
def test_1(act: Action):
act.expected_stdout = expected_stdout
act.execute()
assert act.clean_stdout == act.clean_expected_stdout