6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 13:33:07 +01:00

Added/Updated tests\bugs\gh_8161_test.py: Splitted expected_out after fixed #8290 -- see notes.

This commit is contained in:
pavel-zotov 2024-10-25 13:55:50 +03:00
parent d991658a61
commit 8d4f444954

View File

@ -19,6 +19,12 @@ NOTES:
Confirmed bug (regression) on 3.0.12.33735 (date of build: 09-mar-2024).
Checked on 3.0.12.33764, 4.0.5.3112, 5.0.1.1416, 6.0.0.374.
[25.10.2024] pzotov
Splitted expected_out after fixed #8290: 'Index "RDB$INDEX_nn" Range Scan (full match)' must appear in explained plan)
for RDB$PROCEDURES table (index on columns: RDB$PACKAGE_NAME,RDB$PROCEDURE_NAME - is unique and at least one of these
columns allow NULLs).
Checked on 6.0.0.502-d2f4cf6, 5.0.2.1542-ab50e20 (intermediate builds).
"""
import zipfile
from pathlib import Path
@ -79,7 +85,7 @@ def test_1(act: Action, tmp_fbk: Path, capsys):
ps = cur.prepare(test_sql)
print( '\n'.join([replace_leading(s) for s in ps.detailed_plan.split('\n')]) )
expected_stdout = """
expected_stdout_4x = """
Select Expression
....-> Singularity Check
........-> Aggregate
@ -98,6 +104,27 @@ def test_1(act: Action, tmp_fbk: Path, capsys):
............-> Bitmap
................-> Index "RDB$INDEX_3" Range Scan (full match)
"""
act.expected_stdout = expected_stdout
expected_stdout_5x = """
Select Expression
....-> Singularity Check
........-> Aggregate
............-> Nested Loop Join (inner)
................-> Filter
....................-> Table "RDB$DEPENDENCIES" as "DEP" Access By ID
........................-> Bitmap
............................-> Index "RDB$INDEX_nn" Range Scan (full match)
................-> Filter
....................-> Table "RDB$PROCEDURES" as "PRC" Access By ID
........................-> Bitmap
............................-> Index "RDB$INDEX_nn" Range Scan (full match)
Select Expression
....-> Filter
........-> Table "RDB$RELATION_FIELDS" as "X" Access By ID
............-> Bitmap
................-> Index "RDB$INDEX_nn" Range Scan (full match)
"""
act.expected_stdout = expected_stdout_4x if act.is_version('<5') else expected_stdout_5x
act.stdout = capsys.readouterr().out
assert act.clean_stdout == act.clean_expected_stdout