[MDEV-2600] LP:914224 - different derived tables has refernce on the sema SELECT_LEX structure Created: 2012-01-10  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Oleksandr Byelkin Assignee: Oleksandr Byelkin
Resolution: Not a Bug Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug914224.xml    

 Description   

(gdb) frame 1
#1 0x000000000069a948 in execute_sqlcom_select (thd=0x1b51408, all_tables=0x1bd0db0) at sql_parse.cc:5196
(gdb) p all_tables->alias
$1 = 0x1bd0d70 "t1"
(gdb) p all_tables->select_lex
$2 = (st_select_lex *) 0x1b53c28
(gdb) p all_tables->next_global->next_global->alias
$3 = 0x1bd1c28 "t2"
(gdb) p all_tables->next_global->next_global->select_lex
$4 = (st_select_lex *) 0x1b53c28
(gdb) p thd->query()
$5 = 0x1bcfc70 "select * from (select 1 as a) as t1 join (select * from test.t3) as t2"
(gdb)

the test suite is:
create table t3 (a int);
select * from (select 1 as a) as t1 join (select * from test.t3) as t2;
drop table t3;



 Comments   
Comment by Oleksandr Byelkin [ 2012-01-10 ]

Re: different derived tables has refernce on the sema SELECT_LEX structure
It was my mistake the TABLE_LIST::select_lex shoudle be the same (in is where table is used).

Comment by Rasmus Johansson (Inactive) [ 2012-01-10 ]

Launchpad bug id: 914224

Generated at Thu Feb 08 06:42:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.