From e2a8eeda57488c4e3ed38a4e27baabbde36841bd Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 11 Jan 2006 23:39:09 +0300 Subject: Fixed bug #15538: unchecked table absence caused server crash. Absence of table in left part of LEFT/RIGHT join wasn't checked before name resolution which resulted in NULL dereferencing and server crash. Modified rules: "table_ref LEFT opt_outer JOIN_SYM table_ref" and "table_ref RIGHT opt_outer JOIN_SYM table_ref" NULL check is moved before push_new_name_resolution_context() sql/sql_yacc.yy: Fixed bug #15538: unchecked table absence caused server crash. Modified rules: "table_ref LEFT opt_outer JOIN_SYM table_ref" and "table_ref RIGHT opt_outer JOIN_SYM table_ref" NULL check is moved before push_new_name_resolution_context() mysql-test/r/select.result: Added test case for bug #15538: unchecked table absence caused server crash. mysql-test/t/select.test: Added test case for bug #15538: unchecked table absence caused server crash. --- mysql-test/t/select.test | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mysql-test/t/select.test') diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index a85b82a7767..53f82690888 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -2815,3 +2815,9 @@ create table t2 (f2 char not null); insert into t2 values('b'); select * from t1 left join t2 on f1=t2.f2 where t1.f2='a'; drop table t1,t2; + +# +# Bug#15538 unchecked table absense caused server crash. +# +--error 1064 +select * from (select * left join t on f1=f2) tt; -- cgit v1.2.1