mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
MDEV-714 LP:1020645 - crash (sig 11) with union query
Don't ignore the error from st_select_lex_unit::optimize()
This commit is contained in:
parent
4b57720caa
commit
12253abadb
3 changed files with 16 additions and 1 deletions
5
mysql-test/r/union_crash-714.result
Normal file
5
mysql-test/r/union_crash-714.result
Normal file
|
@ -0,0 +1,5 @@
|
|||
create table t1 (i tinyint);
|
||||
set debug='+d,bug11747970_raise_error';
|
||||
insert into t1 (i) select i from t1 union select i from t1;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
drop table t1;
|
9
mysql-test/t/union_crash-714.test
Normal file
9
mysql-test/t/union_crash-714.test
Normal file
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# MDEV-714 LP:1020645 - crash (sig 11) with union query
|
||||
#
|
||||
--source include/have_debug.inc
|
||||
create table t1 (i tinyint);
|
||||
set debug='+d,bug11747970_raise_error';
|
||||
--error ER_QUERY_INTERRUPTED
|
||||
insert into t1 (i) select i from t1 union select i from t1;
|
||||
drop table t1;
|
|
@ -629,7 +629,8 @@ bool st_select_lex_unit::exec()
|
|||
if (!(uncacheable & ~UNCACHEABLE_EXPLAIN) && item)
|
||||
item->make_const();
|
||||
|
||||
saved_error= optimize();
|
||||
if ((saved_error= optimize()))
|
||||
DBUG_RETURN(saved_error);
|
||||
|
||||
if (uncacheable || !item || !item->assigned() || describe)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue