summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorgluh@eagle.(none) <>2007-10-10 14:31:19 +0500
committergluh@eagle.(none) <>2007-10-10 14:31:19 +0500
commit20ec6605d349c3cfa5c062a9818612616bbe3baa (patch)
tree239a3c07a2fecf0daa2794f4fdb2f82d1989e1b5 /sql/sql_parse.cc
parent82767a0a45dd2a8c356bd9a5c8e8971dd15d4b05 (diff)
parenta5e7b726c1840190d5e90854d2a4838fad68729f (diff)
downloadmariadb-git-20ec6605d349c3cfa5c062a9818612616bbe3baa.tar.gz
Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into mysql.com:/home/gluh/MySQL/Merge/5.0-opt
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 084bcfc3c76..52f8fe8615f 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -6427,7 +6427,12 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
ST_SCHEMA_TABLE *schema_table= find_schema_table(thd, ptr->table_name);
if (!schema_table ||
(schema_table->hidden &&
- lex->orig_sql_command == SQLCOM_END)) // not a 'show' command
+ (lex->orig_sql_command == SQLCOM_END || // not a 'show' command
+ /*
+ this check is used for show columns|keys from I_S hidden table
+ */
+ lex->orig_sql_command == SQLCOM_SHOW_FIELDS ||
+ lex->orig_sql_command == SQLCOM_SHOW_KEYS)))
{
my_error(ER_UNKNOWN_TABLE, MYF(0),
ptr->table_name, INFORMATION_SCHEMA_NAME.str);