1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-3798: EXPLAIN UPDATE/DELETE

- Fix a problem with EXPLAIN multi_table UPDATE: 
  = Do use multi_update object, because multi_update::prepare() does
    various setup, e.g. it disables index-only for the tables to be updated.
  = Protect multi_update::prepare() from being invoked multiple times. 
    If the query has subqueries, they may try to invoke it, for some reason.
This commit is contained in:
Sergey Petrunya
2013-10-15 10:34:46 +04:00
parent a356cfbefb
commit a06170c8d8
3 changed files with 17 additions and 33 deletions

View File

@ -100,7 +100,7 @@ id select_type table type possible_keys key key_len ref rows Extra
explain update t0, t1 set t1.a=t1.a+1 where t0.a = t1.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 ALL NULL NULL NULL NULL 8 Using where
1 SIMPLE t1 ref a a 5 test.t0.a 4 Using index
1 SIMPLE t1 ref a a 5 test.t0.a 4
drop table t0, t1;
#
# Try DELETE ... RETURNING ...