diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2013-10-14 20:09:33 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2013-10-14 20:09:33 +0400 |
commit | 105e3ae6c93f57498fa6c504dfbb92203b0d1056 (patch) | |
tree | 8148f8bc8bbd717f5b4540e0ea8a7673a490fc00 /sql/sql_insert.cc | |
parent | f67f8fd00fa6cf4bb38b10094060e6842a7d8daa (diff) | |
download | mariadb-git-105e3ae6c93f57498fa6c504dfbb92203b0d1056.tar.gz |
MDEV-3798: EXPLAIN UPDATE/DELETE
Update the SHOW EXPLAIN code to work with the
new architecture (part#1):
Before, SHOW EXPLAIN operated on real query plan structures,
which meant it had to check when SELECTs are created/deleted.
SELECTs would call apc_target->enable() when they got a query
plan and disable() when their query plan was deleted.
Now, Explain data structure becomes available at once (and we
call apc_target->enable()) and then it stays until it is deleted
(when that happens, we call apc_target->disable()).
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index cbc44700b17..24b43442e2a 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -461,7 +461,8 @@ void upgrade_lock_type(THD *thd, thr_lock_type *lock_type, if (specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE) || thd->variables.max_insert_delayed_threads == 0 || thd->locked_tables_mode > LTM_LOCK_TABLES || - thd->lex->uses_stored_routines()) + thd->lex->uses_stored_routines() /*|| + thd->lex->describe*/) { *lock_type= TL_WRITE; return; @@ -649,7 +650,7 @@ static void save_insert_query_plan(THD* thd, TABLE_LIST *table_list) Explain_insert* explain= new Explain_insert; explain->table_name.append(table_list->table->alias); - thd->lex->explain->insert_plan= explain; + thd->lex->explain->add_insert_plan(explain); /* See Update_plan::updating_a_view for details */ bool skip= test(table_list->view); |