diff options
author | unknown <gluh@mysql.com/eagle.(none)> | 2007-10-04 16:20:56 +0500 |
---|---|---|
committer | unknown <gluh@mysql.com/eagle.(none)> | 2007-10-04 16:20:56 +0500 |
commit | 4ae273e3955ebb166d4f016b1b6d9e0d3de4aa83 (patch) | |
tree | a2c84809afd60b4a3c4671c62dfab5a3c4e1436f /sql/sql_parse.cc | |
parent | a408f34866de14649b13dc1e4c08edf40a19db28 (diff) | |
download | mariadb-git-4ae273e3955ebb166d4f016b1b6d9e0d3de4aa83.tar.gz |
Bug#30079 A check for "hidden" I_S tables is flawed
added check for hidden I_S tables for 'show columns|keys' commands
mysql-test/r/information_schema.result:
test result
mysql-test/t/information_schema.test:
test case
sql/sql_parse.cc:
added check for hidden I_S tables for 'show columns|keys' commands
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 7 |
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); |