From 0f26f71b496f483061b3f3d801513070a9c3556d Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Tue, 27 Mar 2018 13:10:53 +0400 Subject: [PATCH] MDEV-15316 Assertion `(thd->lex)->var_list.is_empty()' failed in MYSQLparse --- mysql-test/r/variables.result | 5 +++++ mysql-test/t/variables.test | 7 +++++++ sql/sql_yacc.yy | 1 - sql/sql_yacc_ora.yy | 1 - 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index d79a7bb4bec..89b2367cec8 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -1821,3 +1821,8 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select @@FOObar.KEY_BUFfer_size AS "@@FOObar.KEY_BUFfer_size" from DUAL where rand() > @@fooBAR.key_buffer_size +# +# MDEV-15316 Assertion `(thd->lex)->var_list.is_empty()' failed in MYSQLparse +# +SET GLOBAL mc.key_cache_age_threshold=100, mc.key_cache_block_size=1024; +SET GLOBAL mc.key_buffer_size= 0 /*cleanup*/; diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 8d831567252..4da3cac3a73 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -1540,3 +1540,10 @@ explain extended select @@VERsion from dual where rand() > @@verSION; explain extended select @@SESsion.SQL_mode from dual where rand() > @@sesSION.sql_MODE; explain extended select @@GLObal.COLLATION_connection from dual where rand() > @@gloBAL.collation_CONNECTION; explain extended select @@FOObar.KEY_BUFfer_size from dual where rand() > @@fooBAR.key_bufFER_SIZE; + +--echo # +--echo # MDEV-15316 Assertion `(thd->lex)->var_list.is_empty()' failed in MYSQLparse +--echo # + +SET GLOBAL mc.key_cache_age_threshold=100, mc.key_cache_block_size=1024; +SET GLOBAL mc.key_buffer_size= 0 /*cleanup*/; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index e3ceb3bbf9c..c5ea8588a6b 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -15984,7 +15984,6 @@ option_value_no_option_type: } | ident '.' ident equal set_expr_or_default { - DBUG_ASSERT(Lex->var_list.is_empty()); if (Lex->set_variable(&$1, &$3, $5)) MYSQL_YYABORT; } diff --git a/sql/sql_yacc_ora.yy b/sql/sql_yacc_ora.yy index bdc4694b3dd..aaef7bffa4a 100644 --- a/sql/sql_yacc_ora.yy +++ b/sql/sql_yacc_ora.yy @@ -15839,7 +15839,6 @@ option_value_no_option_type: } | ident '.' ident equal set_expr_or_default { - DBUG_ASSERT(Lex->var_list.is_empty()); if (Lex->set_variable(&$1, &$3, $5)) MYSQL_YYABORT; }