6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-02-02 10:50:42 +01:00

Added/Updated tests\bugs\gh_7904_test.py: Changed substitutions: one need to suppress '(keys: N, total key length: M)' in FB 6.x after commit c50b0aa6 ('Add key info to the hash join plan output').

This commit is contained in:
pavel-zotov 2024-09-23 23:59:10 +03:00
parent ede28525bd
commit 25530f80bb

View File

@ -8,6 +8,14 @@ DESCRIPTION:
NOTES: NOTES:
Confirmed problem on 5.0.0.1291 (for UMOWA_ROWS = 700K number of fetches = 6059386, elapsed time = 9.609s) Confirmed problem on 5.0.0.1291 (for UMOWA_ROWS = 700K number of fetches = 6059386, elapsed time = 9.609s)
Checked on 5.0.0.1303, 6.0.0.180 (for UMOWA_ROWS = 700K number of fetches = 270208, elapsed time = 0.741s) Checked on 5.0.0.1303, 6.0.0.180 (for UMOWA_ROWS = 700K number of fetches = 270208, elapsed time = 0.741s)
[24.09.2024] pzotov
Changed substitutions: one need to suppress '(keys: N, total key length: M)' in FB 6.x (and ONLY there),
otherwise actual and expected output become differ.
Commit: https://github.com/FirebirdSQL/firebird/commit/c50b0aa652014ce3610a1890017c9dd436388c43
("Add key info to the hash join plan output", 23.09.2024 18:26)
Discussed with dimitr.
Checked on 6.0.0.467-cc183f5, 5.0.2.1513
""" """
import pytest import pytest
@ -16,6 +24,7 @@ from firebird.qa import *
UMOWA_ROWS = 7000 UMOWA_ROWS = 7000
ROZL_MULTIPLIER = 10 ROZL_MULTIPLIER = 10
init_sql = f""" init_sql = f"""
set bail on; set bail on;
@ -178,9 +187,20 @@ init_sql = f"""
commit; commit;
""" """
#-----------------------------------------------------------
db = db_factory(init = init_sql) db = db_factory(init = init_sql)
substitutions = \
[
( r'\(record length: \d+, key length: \d+\)', '' ) # (record length: 132, key length: 16)
,( r'\(keys: \d+, total key length: \d+\)', '' ) # (keys: 1, total key length: 2)
]
act = python_act('db', substitutions = substitutions)
#-----------------------------------------------------------
query_lst = [ query_lst = [
# Query from https://github.com/FirebirdSQL/firebird/issues/7904: # Query from https://github.com/FirebirdSQL/firebird/issues/7904:
""" """
@ -207,9 +227,6 @@ query_lst = [
""", """,
] ]
substitutions = [ ('record length: \\d+.*', 'record length'), ('key length: \\d+.*', 'key length') ]
act = python_act('db', substitutions = substitutions)
#--------------------------------------------------------- #---------------------------------------------------------
def replace_leading(source, char="."): def replace_leading(source, char="."):
stripped = source.lstrip() stripped = source.lstrip()