File tree Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -1797,4 +1797,14 @@ select * from t2;
1797
1797
ERROR HY000: Table 't2' was not locked with LOCK TABLES
1798
1798
SET STATEMENT max_statement_time=900 FOR unlock tables;
1799
1799
drop table t1, t2;
1800
+ #
1801
+ # MDEV-21616: Server crash when using
1802
+ # "SET STATEMENT max_statement_time=0 FOR desc xxx" lead to collapse
1803
+ #
1804
+ create table t1 (a int);
1805
+ SET STATEMENT max_statement_time=0 FOR desc t1;
1806
+ Field Type Null Key Default Extra
1807
+ a int(11) YES NULL
1808
+ drop table t1;
1809
+ SET STATEMENT max_statement_time=0 FOR do 1;
1800
1810
# End of 10.4 tests
Original file line number Diff line number Diff line change @@ -1565,4 +1565,14 @@ select * from t2;
1565
1565
SET STATEMENT max_statement_time=900 FOR unlock tables;
1566
1566
drop table t1, t2;
1567
1567
1568
+ --echo #
1569
+ --echo # MDEV-21616: Server crash when using
1570
+ --echo # "SET STATEMENT max_statement_time=0 FOR desc xxx" lead to collapse
1571
+ --echo #
1572
+
1573
+ create table t1 (a int);
1574
+ SET STATEMENT max_statement_time=0 FOR desc t1;
1575
+ drop table t1;
1576
+ SET STATEMENT max_statement_time=0 FOR do 1;
1577
+
1568
1578
--echo # End of 10.4 tests
Original file line number Diff line number Diff line change @@ -13253,11 +13253,14 @@ do:
13253
13253
{
13254
13254
LEX *lex=Lex;
13255
13255
lex->sql_command = SQLCOM_DO;
13256
+ if (lex->main_select_push())
13257
+ MYSQL_YYABORT;
13256
13258
mysql_init_select(lex);
13257
13259
}
13258
13260
expr_list
13259
13261
{
13260
13262
Lex->insert_list= $3;
13263
+ Lex->pop_select(); //main select
13261
13264
}
13262
13265
;
13263
13266
@@ -14552,6 +14555,8 @@ describe:
14552
14555
describe_command table_ident
14553
14556
{
14554
14557
LEX *lex= Lex;
14558
+ if (lex->main_select_push())
14559
+ MYSQL_YYABORT;
14555
14560
mysql_init_select(lex);
14556
14561
lex->current_select->parsing_place= SELECT_LIST;
14557
14562
lex->sql_command= SQLCOM_SHOW_FIELDS;
@@ -14563,6 +14568,7 @@ describe:
14563
14568
opt_describe_column
14564
14569
{
14565
14570
Select->parsing_place= NO_MATTER;
14571
+ Lex->pop_select(); //main select
14566
14572
}
14567
14573
| describe_command opt_extended_describe
14568
14574
{ Lex->describe|= DESCRIBE_NORMAL; }
You can’t perform that action at this time.
0 commit comments