summaryrefslogtreecommitdiff
path: root/sql/sql_tvc.cc
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2017-11-23 18:57:26 +0300
committerAleksey Midenkov <midenok@gmail.com>2017-11-23 19:41:44 +0300
commit6e0b2c7fe027a897688c729b55a08e748817cef0 (patch)
tree98ca98e5c0b307c4a0dfe7a55623fe46d4ab35c7 /sql/sql_tvc.cc
parentcbe93291e4391dc5788c022e92d1baf17ca33625 (diff)
parent1773116fe03e893a74af2d35038470d3033054f2 (diff)
downloadmariadb-git-6e0b2c7fe027a897688c729b55a08e748817cef0.tar.gz
System Versioning 1.0pre2
Merge branch '10.3' into trunk
Diffstat (limited to 'sql/sql_tvc.cc')
-rw-r--r--sql/sql_tvc.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_tvc.cc b/sql/sql_tvc.cc
index 7b4a9596afd..56a6ae58a77 100644
--- a/sql/sql_tvc.cc
+++ b/sql/sql_tvc.cc
@@ -283,6 +283,9 @@ int table_value_constr::save_explain_data_intern(THD *thd,
explain= new (output->mem_root) Explain_select(output->mem_root,
thd->lex->analyze_stmt);
+ if (!explain)
+ DBUG_RETURN(1);
+
select_lex->set_explain_type(true);
explain->select_id= select_lex->select_number;
@@ -309,7 +312,7 @@ int table_value_constr::save_explain_data_intern(THD *thd,
Optimization of TVC
*/
-void table_value_constr::optimize(THD *thd)
+bool table_value_constr::optimize(THD *thd)
{
create_explain_query_if_not_exists(thd->lex, thd->mem_root);
have_query_plan= QEP_AVAILABLE;
@@ -320,8 +323,9 @@ void table_value_constr::optimize(THD *thd)
thd->lex->explain && // for "SET" command in SPs.
(!thd->lex->explain->get_select(select_lex->select_number)))
{
- save_explain_data_intern(thd, thd->lex->explain);
+ return save_explain_data_intern(thd, thd->lex->explain);
}
+ return 0;
}