summaryrefslogtreecommitdiff
path: root/sql/table.h
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2014-06-24 19:41:43 +0400
committerSergei Petrunia <psergey@askmonty.org>2014-06-24 19:41:43 +0400
commitc08de06246f776c557b7795d53e2a956e156f533 (patch)
tree6c9ed33855eeb6c418fe390deef7f62db91d6d36 /sql/table.h
parent581b889771447f7a9f33d467f0b5ef2aa96e072b (diff)
downloadmariadb-git-c08de06246f776c557b7795d53e2a956e156f533.tar.gz
MDEV-406: ANALYZE $stmt: get ANALYZE work for subqueries
- "ANALYZE $stmt" should discard select's output, but it should still evaluate the output columns (otherwise, subqueries in select list are not executed) - SHOW EXPLAIN's code practice of calling JOIN::save_explain_data() after JOIN::exec() is disastrous for ANALYZE, because it resets all counters after the first execution. It is stopped = "Late" test_if_skip_sort_order() calls explicitly update their part of the query plan. = Also, I had to rewrite I_S optimization to actually have optimization and execution stages.
Diffstat (limited to 'sql/table.h')
-rw-r--r--sql/table.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/sql/table.h b/sql/table.h
index 86e03cdaaf5..6fa0aaaa3b8 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -1499,6 +1499,7 @@ typedef struct st_schema_table
uint i_s_requested_object; /* the object we need to open(TABLE | VIEW) */
} ST_SCHEMA_TABLE;
+class IS_table_read_plan;
/*
Types of derived tables. The ending part is a bitmap of phases that are
@@ -2044,12 +2045,23 @@ struct TABLE_LIST
/* TRUE <=> this table is a const one and was optimized away. */
bool optimized_away;
+ /* I_S: Flags to open_table (e.g. OPEN_TABLE_ONLY or OPEN_VIEW_ONLY) */
uint i_s_requested_object;
- bool has_db_lookup_value;
- bool has_table_lookup_value;
+
+ /*
+ I_S: how to read the tables (SKIP_OPEN_TABLE/OPEN_FRM_ONLY/OPEN_FULL_TABLE)
+ */
uint table_open_method;
+ /*
+ I_S: where the schema table was filled
+ (this is a hack. The code should be able to figure out whether reading
+ from I_S should be done by create_sort_index() or by JOIN::exec.)
+ */
enum enum_schema_table_state schema_table_state;
+ /* Something like a "query plan" for reading INFORMATION_SCHEMA table */
+ IS_table_read_plan *is_table_read_plan;
+
MDL_request mdl_request;
#ifdef WITH_PARTITION_STORAGE_ENGINE