6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 21:43:06 +01:00
firebird-qa/tests/bugs/core_3256_test.py

185 lines
8.8 KiB
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-22 21:59:15 +01:00
"""
ID: issue-3624
ISSUE: 3624
TITLE: Error "request depth exceeded" may appear while preparing a select query against a view with explicit plan
DESCRIPTION:
JIRA: CORE-3256
"""
2021-04-26 20:07:00 +02:00
2022-01-22 21:59:15 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-22 21:59:15 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-22 21:59:15 +01:00
test_script = """
2021-04-26 20:07:00 +02:00
create or alter view vt(id,name) as select 1 id, '' name from rdb$database;
commit;
2022-01-22 21:59:15 +01:00
2021-04-26 20:07:00 +02:00
recreate table t1 (id integer not null,name integer not null);
2022-01-22 21:59:15 +01:00
alter table t1 add constraint pk_t1 primary key (id)
2021-04-26 20:07:00 +02:00
using index pk_t1
;
create or alter view vt(id,name) as select * from t1;
commit;
-- repeat ~130 times
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
---
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
---
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
---
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
---
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
---
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
---
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
---
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
---
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
---
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
---
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
---
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
---
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
2022-01-22 21:59:15 +01:00
2021-04-26 20:07:00 +02:00
-- The following statement leads to:
-- Statement failed, SQLSTATE = 54001
-- unsuccessful metadata update
-- -request depth exceeded. (Recursive definition?)
-- Confirmed for 2.5.0 only, 26.02.2015.
--#####################################################
select * from vt where id=1 PLAN (vt T1 INDEX (PK_T1));
--#####################################################
2021-12-22 20:23:11 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-22 21:59:15 +01:00
act = isql_act('db', test_script)
2021-04-26 20:07:00 +02:00
2022-01-22 21:59:15 +01:00
@pytest.mark.version('>=3')
def test_1(act: Action):
2022-01-25 22:55:48 +01:00
act.execute()