1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-3798: [SHOW] EXPLAIN UPDATE/DELETE

- Merge with 10.0-base
This commit is contained in:
Sergey Petrunya
2013-10-15 11:51:41 +04:00
71 changed files with 8292 additions and 713 deletions

View File

@ -622,6 +622,7 @@ bool st_select_lex_unit::exec()
ulonglong add_rows=0;
ha_rows examined_rows= 0;
DBUG_ENTER("st_select_lex_unit::exec");
bool was_executed= executed;
if (executed && !uncacheable && !describe)
DBUG_RETURN(FALSE);
@ -631,6 +632,9 @@ bool st_select_lex_unit::exec()
saved_error= optimize();
if (!saved_error && !was_executed && thd->lex->explain)
save_union_explain(thd->lex->explain);
if (uncacheable || !item || !item->assigned() || describe)
{
for (SELECT_LEX *sl= select_cursor; sl; sl= sl->next_select())
@ -777,6 +781,9 @@ bool st_select_lex_unit::exec()
*/
if (!fake_select_lex->ref_pointer_array)
fake_select_lex->n_child_sum_items+= global_parameters->n_sum_items;
if (!was_executed && thd->lex->explain)
save_union_explain_part2(thd->lex->explain);
saved_error= mysql_select(thd, &fake_select_lex->ref_pointer_array,
&result_table_list,