From 0ba528fe56f6c637d9fbc9d177a62610038fd519 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 18 May 2022 13:11:16 +0200 Subject: MDEV-28606 Server crashes in st_select_lex::add_table_to_list instead of error 1066: Not unique table/alias 10.2-only fix, 10.3+ uses LEX_STRING's and checks the length first --- mysql-test/t/parser.test | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mysql-test/t/parser.test') diff --git a/mysql-test/t/parser.test b/mysql-test/t/parser.test index 095d274724b..4d35a53ecf6 100644 --- a/mysql-test/t/parser.test +++ b/mysql-test/t/parser.test @@ -1432,6 +1432,15 @@ query_vertical show create function a; drop function a; set timestamp=default; +--echo # +--echo # MDEV-28606 Server crashes in st_select_lex::add_table_to_list instead of error 1066: Not unique table/alias +--echo # +create table t1 (i int) ; +insert into t1 values (1),(2),(3) ; +--error 1066 +with cte1 as (select i from t1) select i from cte1 natural join cte1; +drop table t1; + --echo # --echo # End of 10.2 tests --echo # -- cgit v1.2.1