diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2013-10-01 17:49:03 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2013-10-01 17:49:03 +0400 |
commit | 6519ca51dd8815dc1f2d88708e540bd4032cb45e (patch) | |
tree | d032f4a1bf5596172cfedbc41ca6ec7afdbe330c /sql/sql_update.cc | |
parent | e8eeb2e7f90dfa7d54a0146322cfba32731e4b34 (diff) | |
download | mariadb-git-6519ca51dd8815dc1f2d88708e540bd4032cb45e.tar.gz |
EXPLAIN UPDATE/DELETE
- Make EXPLAIN UPDATE/DELETE work inside SPs
- Return correct error code from mysql_delete()
- EXPLAIN <multi-DELETE> will create a multi_delete object (as it
affects the optimization). select_result will be only used for
producing EXPLAIN output.
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 15b3b9ad7e7..2881f6a7a1d 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -1039,8 +1039,8 @@ exit_without_my_ok: List<Item> dummy; /* note: looked in 5.6 and they too use a dummy list like this */ result->prepare(dummy, &thd->lex->unit); thd->send_explain_fields(result); - int err2= thd->lex->query_plan_footprint->print_explain(result, 0 /* explain flags*/); - + int err2= thd->lex->query_plan_footprint->print_explain(result, + thd->lex->describe); if (err2) result->abort_result_set(); else @@ -1048,7 +1048,7 @@ exit_without_my_ok: delete select; free_underlaid_joins(thd, select_lex); - DBUG_RETURN((error >= 0 || thd->is_error()) ? 1 : 0); + DBUG_RETURN((err2 || thd->is_error()) ? 1 : 0); } /* @@ -1518,7 +1518,7 @@ bool mysql_multi_update(THD *thd, { if (explain) { - thd->lex->query_plan_footprint->print_explain(output, 0); + thd->lex->query_plan_footprint->print_explain(output, thd->lex->describe); output->send_eof(); delete output; } |