Regression: could not execute query (select from view with nested view)
-----------------------------------------------------------------------

                 Key: CORE-5381
                 URL: http://tracker.firebirdsql.org/browse/CORE-5381
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 3.0.1
         Environment: Windows, Firebird-3.0.1.32609_0_x64
            Reporter: Rashid Abzalov


This example works in v2.5 but fails in v3.0.

Query:
select A.ID
  from test_view A
  inner join RDB$TYPES D1 on D1.rdb$type = A.ID
  inner join RDB$RELATIONS D2 on D2.rdb$relation_id = A.ID
  inner join RDB$DEPENDENCIES D3 on D3.rdb$dependent_type = A.ID
where A.ID = 1

Error:
Statement failed, SQLSTATE = HY000
request size limit exceeded

DDL:
create database 'localhost:c:\test.fdb' page_size 16384 user 'SYSDBA' password 
'masterkey' default character set UTF8 collation UTF8;

connect 'localhost:c:\test.fdb' user 'SYSDBA' password 'masterkey';

create table t1(ID bigint not null primary key);
create table t2(ID bigint not null primary key);
create table t3(ID bigint not null primary key);
create table t4(ID bigint not null primary key);
create table t5(ID bigint not null primary key);
create table t6(ID bigint not null primary key);
create table t7(ID bigint not null primary key);
create table t8(ID bigint not null primary key);

set term ^;

create view inner_view(ID)
as
select t1.ID
  from t1
  inner join t8 B on B.ID = t1.ID
  inner join t2 C on C.ID = t1.ID
  left join t4 D on D.ID = t1.ID
  inner join t5 E on E.ID = t1.ID
  left join t6 F on F.ID = t1.ID

  inner join RDB$TYPES G1 on G1.rdb$type = t1.ID
  inner join RDB$RELATIONS G2 on G2.rdb$relation_id = t1.ID
  inner join RDB$DEPENDENCIES G3 on G3.rdb$dependent_type = t1.ID
  inner join RDB$COLLATIONS G4 on G4.rdb$collation_id = t1.ID
  inner join RDB$FIELDS G5 on G5.rdb$field_type = t1.ID
  inner join RDB$CHARACTER_SETS G6 on G6.rdb$character_set_id = t1.ID
^

create view test_view(ID)
as
select t1.ID
  from t1
  inner join inner_view on inner_view.ID = t1.ID
  inner join t7 on t7.ID = t1.ID
  left join t3 on t3.ID = t1.ID

  inner join RDB$TYPES D1 on D1.rdb$type = t1.ID
  inner join RDB$RELATIONS D2 on D2.rdb$relation_id = t1.ID
  inner join RDB$DEPENDENCIES D3 on D3.rdb$dependent_type = t1.ID
  inner join RDB$COLLATIONS D4 on D4.rdb$collation_id = t1.ID
  inner join RDB$FIELDS D5 on D5.rdb$field_type = t1.ID
^

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to