1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00

Fix for bug #7210: information_schema: can't access when table-name = reserved word

This commit is contained in:
gluh@gluh.mysql.r18.ru
2004-12-18 12:48:01 +03:00
parent 0cca540502
commit bf0104045d
4 changed files with 36 additions and 0 deletions

View File

@@ -1583,6 +1583,15 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
packet, (uint) (pend-packet), thd->charset());
table_list.alias= table_list.real_name= conv_name.str;
packet= pend+1;
if (!my_strcasecmp(system_charset_info, table_list.db,
information_schema_name.str))
{
ST_SCHEMA_TABLE *schema_table= find_schema_table(thd, table_list.alias);
if (schema_table)
table_list.schema_table= schema_table;
}
/* command not cachable => no gap for data base name */
if (!(thd->query=fields=thd->memdup(packet,thd->query_length+1)))
break;