diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2014-06-26 19:09:23 +0400 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2014-06-26 19:09:23 +0400 |
commit | c6be74458fd478b019ac357371d5aee8925fe012 (patch) | |
tree | ec719b8163e9a26adf795d8e4cbcf69bd39f7e73 /sql/sql_delete.cc | |
parent | a787edd7e660a00f015ca0a25ded0952085f7451 (diff) | |
download | mariadb-git-c6be74458fd478b019ac357371d5aee8925fe012.tar.gz |
MDEV-6398: ANALYZE UPDATE does not populate r_rows
- In print_explain_row(), do not forget to print r_rows.
- Switch Explain_update from using its own counters to re-using
Table_access_tracker.
- Make ANALYZE UPDATE code structure uniform with ANALYZE DELETE.
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index d149d09949f..c241cbf67c2 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -539,10 +539,12 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, } explain= (Explain_delete*)thd->lex->explain->get_upd_del_plan(); + explain->tracker.on_scan_init(); + while (!(error=info.read_record(&info)) && !thd->killed && ! thd->is_error()) { - explain->on_record_read(); + explain->tracker.on_record_read(); if (table->vfield) update_virtual_fields(thd, table, table->triggers ? VCOL_UPDATE_ALL : @@ -551,7 +553,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, // thd->is_error() is tested to disallow delete row on error if (!select || select->skip_record(thd) > 0) { - explain->on_record_after_where(); + explain->tracker.on_record_after_where(); if (table->triggers && table->triggers->process_triggers(thd, TRG_EVENT_DELETE, TRG_ACTION_BEFORE, FALSE)) |