1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

BUG#9123: If a table name is given with an underscore,

then this must be properly quoted when sent to 
SHOW TABLES LIKE ...
This commit is contained in:
lars@mysql.com
2005-03-15 16:23:02 +01:00
parent 13ec961c3a
commit 26fae36137

View File

@ -2109,7 +2109,9 @@ static void get_actual_table_name(const char *old_table_name,
char query[ NAME_LEN + 50 ];
DBUG_ENTER("get_actual_table_name");
sprintf( query, "SHOW TABLES LIKE '%s'", old_table_name);
char show_name_buff[FN_REFLEN];
sprintf(query, "SHOW TABLES LIKE %s",
quote_for_like(old_table_name, show_name_buff));
if (mysql_query_with_error_report(sock, 0, query))
{
safe_exit(EX_MYSQLERR);