#coding:utf-8 """ ID: issue-3811 ISSUE: 3811 TITLE: Inefficient optimization (regression) DESCRIPTION: JIRA: CORE-3450 FBTEST: bugs.core_3450 NOTES: [30.11.2016] pzotov It seems that we have regression in current 4.0 snapshots (elapsed time more than 10x comparing with 2.5). Also, 4.0 has different plan comparing with 3.0. After discuss with dimitr it was decided to commit this test into fbt-repo in order to have constant reminder about this issue. Currently this test should FAIL on 4.0. [22.09.2022] pzotov Removed SKIP notation because test works fine on FB 4.0.1 Checked on 3.0.8.33535, 4.0.1.2692, 5.0.0.736 """ import pytest from firebird.qa import * db = db_factory() test_script = """ create or alter procedure sp_2 as begin end; recreate table test_1 (f1 int, f2 int, f3 int); create index test_1_f1 on test_1(f1); create index test_1_f2 on test_1(f2); commit; recreate table test_2 (f1 int, f2 int); create index test_2_f1 on test_2(f1); create index test_2_f2 on test_2(f2); commit; recreate table test_3 (f1 int); create index test_3_f1 on test_3(f1); commit; set term ^; create or alter procedure sp_1 returns (f1 int) as begin f1=1; suspend; end ^ create or alter procedure sp_2 as declare i int; declare t1_lim int = 1000; declare t2_lim int = 100; declare t3_lim int = 10; begin i=0; while (i=3.0') def test_1(act: Action): act.expected_stdout = expected_stdout act.execute() assert act.clean_stdout == act.clean_expected_stdout