summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2013-10-09 09:40:33 +0400
committerSergey Petrunya <psergey@askmonty.org>2013-10-09 09:40:33 +0400
commit161d68759433b0315a6b95209d3db86be411a686 (patch)
tree8d7123f8b473ae696bf3bf89bf5191afcad986f8 /sql/sql_lex.h
parent69e6a2bb22434d94d96312ba8a0540195273dfdd (diff)
downloadmariadb-git-161d68759433b0315a6b95209d3db86be411a686.tar.gz
MDEV-3798: EXPLAIN UPDATE/DELETE
- Generate correct contents of `Extra` column for UPDATEs/DELETEs that use quick selects - UPDATEs with used_key_is_modified=true will show "Using buffer"
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 21f3b5a5859..9515079e75f 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -2390,6 +2390,9 @@ public:
select should not be shown when printing EXPLAIN.
*/
bool updating_a_view;
+
+ /* Allocate things there */
+ MEM_ROOT *mem_root;
TABLE *table;
SQL_SELECT *select;
@@ -2403,6 +2406,7 @@ public:
key_map possible_keys;
bool using_filesort;
+ bool using_io_buffer;
/* Set this plan to be a plan to do nothing because of impossible WHERE */
void set_impossible_where() { impossible_where= true; }
@@ -2412,8 +2416,10 @@ public:
void save_explain_data_intern(Explain_query *query, Explain_update *eu);
virtual ~Update_plan() {}
- Update_plan() :
- impossible_where(false), no_partitions(false), using_filesort(false)
+ Update_plan(MEM_ROOT *mem_root_arg) :
+ impossible_where(false), no_partitions(false),
+ mem_root(mem_root_arg),
+ using_filesort(false), using_io_buffer(false)
{}
};
@@ -2425,8 +2431,10 @@ class Delete_plan : public Update_plan
public:
/* Construction functions */
- Delete_plan() :
- deleting_all_rows(false) {}
+ Delete_plan(MEM_ROOT *mem_root_arg) :
+ Update_plan(mem_root_arg),
+ deleting_all_rows(false)
+ {}
/* Set this query plan to be a plan to make a call to h->delete_all_rows() */
void set_delete_all_rows(ha_rows rows_arg)