From 0e802637ccd18f1e237b43416b4855bfab93d745 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 15 Mar 2005 16:23:02 +0100 Subject: BUG#9123: If a table name is given with an underscore, then this must be properly quoted when sent to SHOW TABLES LIKE ... --- client/mysqldump.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index a53dc319b2e..cfff4d4e7ed 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -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); -- cgit v1.2.1