1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#30079 A check for "hidden" I_S tables is flawed

added check for hidden I_S tables for 'show columns|keys' commands
This commit is contained in:
gluh@mysql.com/eagle.(none)
2007-10-04 16:20:56 +05:00
parent 0918fe8320
commit d6e626a61d
3 changed files with 19 additions and 1 deletions

View File

@ -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);