mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-22 13:33:07 +01:00
Added/Updated tests\bugs\gh_7569_test.py: Confirmed problem on 5.0.0.1033. Checked on 5.0.0.1046 -- all fine.
This commit is contained in:
parent
8be31b4509
commit
4809f54a68
66
tests/bugs/gh_7569_test.py
Normal file
66
tests/bugs/gh_7569_test.py
Normal file
@ -0,0 +1,66 @@
|
||||
#coding:utf-8
|
||||
|
||||
"""
|
||||
ID: issue-7569
|
||||
ISSUE: https://github.com/FirebirdSQL/firebird/issues/7569
|
||||
TITLE: Multi-level order by and offset/fetch ignored on parenthesized query expressions
|
||||
NOTES:
|
||||
[12.05.2023] pzotov
|
||||
Confirmed problem on 5.0.0.1033. Checked on 5.0.0.1046 -- all fine.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from firebird.qa import *
|
||||
|
||||
db = db_factory()
|
||||
|
||||
test_script = """
|
||||
set list on;
|
||||
recreate table rowdata (id int generated by default as identity);
|
||||
insert into rowdata default values;
|
||||
insert into rowdata default values;
|
||||
insert into rowdata default values;
|
||||
insert into rowdata default values;
|
||||
insert into rowdata default values;
|
||||
insert into rowdata default values;
|
||||
insert into rowdata default values;
|
||||
insert into rowdata default values;
|
||||
insert into rowdata default values;
|
||||
commit;
|
||||
|
||||
|
||||
select id_a
|
||||
from
|
||||
(
|
||||
select id as id_a
|
||||
from rowdata
|
||||
order by id
|
||||
offset 2 rows fetch next 5 rows only
|
||||
)
|
||||
order by id_a desc
|
||||
offset 2 rows fetch next 2 rows only;
|
||||
|
||||
(
|
||||
select id as id_b
|
||||
from rowdata
|
||||
order by id
|
||||
offset 2 rows fetch next 5 rows only
|
||||
)
|
||||
order by id_b desc
|
||||
offset 2 rows fetch next 2 rows only;
|
||||
"""
|
||||
|
||||
act = isql_act('db', test_script)
|
||||
|
||||
expected_stdout = """
|
||||
ID_A 5
|
||||
ID_A 4
|
||||
ID_B 5
|
||||
ID_B 4
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=5.0')
|
||||
def test_1(act: Action):
|
||||
act.expected_stdout = expected_stdout
|
||||
act.execute()
|
||||
assert act.clean_stdout == act.clean_expected_stdout
|
Loading…
Reference in New Issue
Block a user