From f807b1633413d95ccd4cd3ab88f54152aa531e3d Mon Sep 17 00:00:00 2001 From: pavel-zotov Date: Fri, 22 Sep 2023 20:19:43 +0300 Subject: [PATCH] Added/Updated tests\bugs\gh_3810_test.py: Removed usage of index test_fld2 after discuss with Anton Zuev (Red Soft) and dimitr --- tests/bugs/gh_3810_test.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/tests/bugs/gh_3810_test.py b/tests/bugs/gh_3810_test.py index 087d5523..193dcb24 100644 --- a/tests/bugs/gh_3810_test.py +++ b/tests/bugs/gh_3810_test.py @@ -8,6 +8,11 @@ NOTES: [14.04.2023] pzotov Confirmed poor performance on 3.0.11.33678 (num of fetches = 10'099). Checked on 3.0.11.33681 -- all fine, fetches differ for less than 20. + + [22.09.2023] pzotov + Changed name of table to simpler. + Removed usage of index test_fld2 after discuss with Anton Zuev (Red Soft) and dimitr, + see: https://github.com/FirebirdSQL/firebird-qa/pull/19 """ import pytest @@ -17,9 +22,9 @@ db = db_factory() test_script = """ set bail on; - create table tmp_tbl1 (fld1 integer, fld2 integer, fld3 integer); - create index tmp_tbl1_fld123 on tmp_tbl1(fld1, fld2, fld3); - create index tmp_tbl1_fld2 on tmp_tbl1(fld2); + create table test (fld1 integer, fld2 integer, fld3 integer); + create index test_fld123 on test(fld1, fld2, fld3); + -- create index test_fld2 on test(fld2); commit; set term ^; create or alter procedure tmp_sp1 as @@ -28,7 +33,7 @@ test_script = """ i=0; while ( i < 10000 ) do begin i=i+1; - insert into tmp_tbl1 values (1, :i, 2); + insert into test values (1, :i, 2); end end ^ @@ -36,8 +41,8 @@ test_script = """ commit; execute procedure tmp_sp1; commit; - SET STATISTICS INDEX TMP_TBL1_FLD123; - SET STATISTICS INDEX TMP_TBL1_FLD2; + SET STATISTICS INDEX test_fld123; + -- SET STATISTICS INDEX test_FLD2; commit; recreate view v_check as @@ -58,7 +63,7 @@ test_script = """ ^ set plan on ^ - select count(*) from tmp_tbl1 where fld1=1 and fld2 is null + select count(*) from test where fld1=1 and fld2 is null ^ set plan off ^ @@ -93,7 +98,7 @@ test_script = """ act = isql_act('db', test_script) expected_stdout = """ - PLAN (TMP_TBL1 INDEX (TMP_TBL1_FLD123)) + PLAN (TEST INDEX (TEST_FLD123)) COUNT 0 FETCHES_DIFF OK, expected """