summaryrefslogtreecommitdiff
path: root/sql/sql_show.h
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2014-09-04 01:12:49 +0400
committerSergei Petrunia <psergey@askmonty.org>2014-09-04 01:12:49 +0400
commitd161546b67142cdd5322a4ed160441045ae0cd1e (patch)
treeafe0945ecdc769895652c5f16fe9483dab716172 /sql/sql_show.h
parente44751b65f4760067d15f8a526e8f97f84810c29 (diff)
downloadmariadb-git-d161546b67142cdd5322a4ed160441045ae0cd1e.tar.gz
MDEV-6689: valgrind errors in view.test in 10.1
SHOW COLUMNS and SHOW KEYS commands fill IS_table_read_plan in a special way - they don't set or use lookup_field_vals member. Added a "trivial_show_command" flag that signals that lookup_field_vals has no valid data, made EXPLAIN code honor it.
Diffstat (limited to 'sql/sql_show.h')
-rw-r--r--sql/sql_show.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/sql_show.h b/sql/sql_show.h
index 2f1cb26d17a..2b58fc45d4c 100644
--- a/sql/sql_show.h
+++ b/sql/sql_show.h
@@ -192,9 +192,17 @@ typedef struct st_lookup_field_values
class IS_table_read_plan : public Sql_alloc
{
public:
- IS_table_read_plan() : no_rows(false) {}
+ IS_table_read_plan() : no_rows(false), trivial_show_command(FALSE) {}
bool no_rows;
+ /*
+ For EXPLAIN only: For SHOW KEYS and SHOW COLUMNS, we know which
+ db_name.table_name will be read, however for some reason we don't
+ set the fields in this->lookup_field_vals.
+ In order to not have JOIN::save_explain_data() walking over uninitialized
+ data, we set trivial_show_command=true.
+ */
+ bool trivial_show_command;
LOOKUP_FIELD_VALUES lookup_field_vals;
Item *partial_cond;