diff options
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 7ccf475b65e..1a7457386f0 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -2061,6 +2061,11 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond) { int res; TABLE *old_open_tables= thd->open_tables; + /* + Set the parent lex of 'sel' because it is needed by sel.init_query() + which is called inside make_table_list. + */ + sel.parent_lex= lex; if (make_table_list(thd, &sel, base_name, file_name)) goto err; TABLE_LIST *show_table_list= (TABLE_LIST*) sel.table_list.first; |