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

51 lines
1.1 KiB
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-22 21:59:15 +01:00
"""
ID: issue-4141
ISSUE: 4141
TITLE: fb server die when carry out the LEFT + INNER JOIN
DESCRIPTION:
JIRA: CORE-3798
FBTEST: bugs.core_3798
2022-01-22 21:59:15 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-22 21:59:15 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-22 21:59:15 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-22 21:59:15 +01:00
test_script = """
2021-04-26 20:07:00 +02:00
recreate table table1 (
id integer not null,
name varchar(30),
id_breed integer
);
alter table table1 add constraint pk_table1 primary key (id);
2022-01-22 21:59:15 +01:00
2021-04-26 20:07:00 +02:00
recreate table table2 (
id integer not null,
id_table1 integer
);
alter table table2 add constraint pk_table2 primary key (id);
2022-01-22 21:59:15 +01:00
2021-04-26 20:07:00 +02:00
recreate table table3 (
id integer not null,
id_breed integer
);
alter table table3 add constraint pk_table3 primary key (id);
commit;
2022-01-22 21:59:15 +01:00
2021-04-26 20:07:00 +02:00
select table2.id
from table2
left join table1 on table1.id = table2.id_table1
inner join table3 on table1.id_breed = table3.id_breed
where table1.id = 1
;
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-22 21:59:15 +01:00
act = isql_act('db', test_script)
2021-04-26 20:07:00 +02:00
@pytest.mark.version('>=3.0')
2022-01-22 21:59:15 +01:00
def test_1(act: Action):
2022-01-25 22:55:48 +01:00
act.execute()