Commit 12253aba authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-714 LP:1020645 - crash (sig 11) with union query

Don't ignore the error from st_select_lex_unit::optimize()
parent 4b57720c
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;
#
# 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)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment