Commit graph

9 commits

Author SHA1 Message Date
Sergey Petrunya
cebdf3de2e [SHOW] EXPLAIN UPDATE/DELETE, code re-structuring
- Handle another specific case where there the JOIN 
  never had a query plan, but had multiple join->cleanup(full=true) calls
- The idea that there can only be MAX_TABLES subuqeries/unions was 
  wrong. Switch QPF_query to using a Dynamic_array.
  = make Dynamic_array template support size growth. its underlying
    DYNAMIC_ARRAY supports it. (this part will need more polishing)
2013-06-21 22:26:03 +04:00
Sergey Petrunya
af5e128e50 [SHOW] EXPLAIN UPDATE/DELETE, code re-structuring
- Handle statements inside SPs:
  = regular statements
  = SET command, which does not have its own statement.

- Handle execution of subquery from range optimizer: 
  allocate subquery QPFs on the same MEM_ROOT as the whole 
  query plan was allocated.
2013-06-21 13:26:53 +04:00
Sergey Petrunya
52cfa54c1d [SHOW] EXPLAIN UPDATE/DELETE, code re-structuring
Single table UPDATE/DELETE
- Correctly print type=SIMPLE vs type=PRIMARY
- Handle UPDATE/DELETE of mergeable VIEWs: we get the 
  VIEW's select as the first subquery. 
  (MySQL 5.6 doesn't print it because it finds that the
   subquery is not attached to any select)
2013-06-20 20:58:26 +04:00
Sergey Petrunya
0a560289aa [SHOW] EXPLAIN UPDATE/DELETE, code re-structuring
- Introduce back QueryPlan/QueryPlanFootprint separation for 
  single-table UPDATEs/DELETEs
- Create an empty QueryPlanFootprint for all kinds of queries
2013-06-20 15:15:24 +04:00
Sergey Petrunya
1951d40a88 [SHOW] EXPLAIN UPDATE/DELETE, code re-structuring
- Make EXPLAIN UPDATE/DELETE use "Query Plan Footprints", too.
2013-06-18 21:08:34 +04:00
Sergey Petrunya
1c6fc3f6b9 [SHOW] EXPLAIN UPDATE/DELETE, code re-structuring
Part 2 of:
- Pass more tests
- select with subselects is now shown with type=PRIMARY where it used to be (incorrectly) 'SIMPLE'
2013-06-18 19:21:00 +04:00
Sergey Petrunya
d2ea53aaed [SHOW] EXPLAIN UPDATE/DELETE, code re-architecting
- Pass more tests
- select with subselects is now shown with type=PRIMARY where it used to be (incorrectly) 'SIMPLE'
2013-06-18 10:57:36 +04:00
Sergey Petrunya
d97ca5f56c [SHOW] EXPLAIN UPDATE/DELETE, code reordering
- Add further details, the goal is to pass the testsuite
- SJM-nests are not printed correctly yet.
2013-06-17 19:39:55 +04:00
Sergey Petrunya
03691a7771 SHOW EXPLAIN UPDATE/DELETE
- Introduce "Query Plan Footprints" (abbrev. QPFs)
  QPF is a part of query plan that is 
  1. sufficient to produce EXPLAIN output,
  2. can be used to produce EXPLAIN output even after its subquery/union
     was executed and deleted
  3. is cheap to save so that we can always save query plans

- This patch doesn't fully address #2, we make/save strings for 
  a number of EXPLAIN's columns.  This will be fixed.
2013-06-17 11:59:38 +04:00