summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-02-23 13:01:27 +0100
committerSergei Golubchik <serg@mariadb.org>2021-02-23 13:06:22 +0100
commitf33e57a9e66f7e1790cb84b141381bb668e281a0 (patch)
tree31bb1c5bd8e0addc9e994a1bb42b4703c37f7ed8 /sql/sql_show.cc
parent1a0526e2f294acdcac829672794ee1fe708eb2b3 (diff)
parent245d33db4e0586df4fe28362fb002cef0151a1c9 (diff)
downloadmariadb-git-f33e57a9e66f7e1790cb84b141381bb668e281a0.tar.gz
Merge branch '10.4' into 10.5
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 6fe45fe2de3..b043f83c72c 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -8657,6 +8657,16 @@ bool get_schema_tables_result(JOIN *join,
if (table_list->schema_table->fill_table == 0)
continue;
+ /*
+ Do not fill in tables thare are marked as JT_CONST as these will never
+ be read and they also don't have a tab->read_record.table set!
+ This can happen with queries like
+ SELECT * FROM t1 LEFT JOIN (t1 AS t1b JOIN INFORMATION_SCHEMA.ROUTINES)
+ ON (t1b.a IS NULL);
+ */
+ if (tab->type == JT_CONST)
+ continue;
+
/* skip I_S optimizations specific to get_all_tables */
if (lex->describe &&
(table_list->schema_table->fill_table != get_all_tables))