summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/sql_show.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 0eeb333f278..17fbf62b097 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -2939,11 +2939,15 @@ make_table_name_list(THD *thd, List<LEX_STRING> *table_names, LEX *lex,
{
if (with_i_schema)
{
+ LEX_STRING *name;
ST_SCHEMA_TABLE *schema_table=
find_schema_table(thd, lookup_field_vals->table_value.str);
if (schema_table && !schema_table->hidden)
{
- if (table_names->push_back(&lookup_field_vals->table_value))
+ if (!(name=
+ thd->make_lex_string(NULL, schema_table->table_name,
+ strlen(schema_table->table_name), TRUE)) ||
+ table_names->push_back(name))
return 1;
}
}