diff options
author | Aleksey Midenkov <midenok@gmail.com> | 2017-11-23 18:57:26 +0300 |
---|---|---|
committer | Aleksey Midenkov <midenok@gmail.com> | 2017-11-23 19:41:44 +0300 |
commit | 6e0b2c7fe027a897688c729b55a08e748817cef0 (patch) | |
tree | 98ca98e5c0b307c4a0dfe7a55623fe46d4ab35c7 /sql/sql_union.cc | |
parent | cbe93291e4391dc5788c022e92d1baf17ca33625 (diff) | |
parent | 1773116fe03e893a74af2d35038470d3033054f2 (diff) | |
download | mariadb-git-6e0b2c7fe027a897688c729b55a08e748817cef0.tar.gz |
System Versioning 1.0pre2
Merge branch '10.3' into trunk
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index d1551cb5e96..ecc2a54bdd8 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -1282,7 +1282,11 @@ bool st_select_lex_unit::optimize() sl->tvc->select_options= (select_limit_cnt == HA_POS_ERROR || sl->braces) ? sl->options & ~OPTION_FOUND_ROWS : sl->options | found_rows_for_union; - sl->tvc->optimize(thd); + if (sl->tvc->optimize(thd)) + { + thd->lex->current_select= lex_select_save; + DBUG_RETURN(TRUE); + } continue; } thd->lex->current_select= sl; @@ -1397,7 +1401,7 @@ bool st_select_lex_unit::exec() sl->tvc->select_options= (select_limit_cnt == HA_POS_ERROR || sl->braces) ? sl->options & ~OPTION_FOUND_ROWS : sl->options | found_rows_for_union; - sl->tvc->optimize(thd); + saved_error= sl->tvc->optimize(thd); } else { |