@@ -906,7 +906,6 @@ static int handle_request_for_tables(char *tables, size_t length,
906906 my_bool view , my_bool dont_quote )
907907{
908908 char * query , * end , options [100 ], message [100 ];
909- char table_name_buff [NAME_CHAR_LEN * 2 * 2 + 1 ], * table_name ;
910909 size_t query_length = 0 , query_size = sizeof (char )* (length + 110 );
911910 const char * op = 0 ;
912911 const char * tab_view ;
@@ -984,21 +983,13 @@ static int handle_request_for_tables(char *tables, size_t length,
984983 DBUG_ASSERT (strlen (op )+ strlen (tables )+ strlen (options )+ 8 + 1 <= query_size );
985984
986985 /* No backticks here as we added them before */
987- query_length = snprintf (query , query_size , "%s%s%s %s" , op ,
988- tab_view , tables , options );
989- table_name = tables ;
986+ query_length = my_snprintf (query , query_size , "%s%s%s %s" , op ,
987+ tab_view , tables , options );
990988 }
991989 else
992990 {
993- char * ptr , * org ;
994-
995- org = ptr = strmov (strmov (query , op ), tab_view );
996- ptr = fix_table_name (ptr , tables );
997- strmake (table_name_buff , org , MY_MIN ((int ) sizeof (table_name_buff )- 1 ,
998- (int ) (ptr - org )));
999- table_name = table_name_buff ;
1000- ptr = strxmov (ptr , " " , options , NullS );
1001- query_length = (size_t ) (ptr - query );
991+ query_length = my_snprintf (query , query_size , "%s%s%sQ %s" ,
992+ op , tab_view , tables , options );
1002993 }
1003994 if (verbose >= 3 )
1004995 puts (query );
@@ -1013,7 +1004,7 @@ static int handle_request_for_tables(char *tables, size_t length,
10131004 print_result ();
10141005 if (opt_flush_tables )
10151006 {
1016- query_length = snprintf (query , query_size , "FLUSH TABLES %s " , table_name );
1007+ query_length = my_snprintf (query , query_size , "FLUSH TABLES %sQ " , tables );
10171008 if (mysql_real_query (sock , query , (ulong )query_length ))
10181009 {
10191010 DBerror (sock , query );
@@ -1105,7 +1096,7 @@ static void __attribute__((noinline)) print_result()
11051096 }
11061097 else
11071098 printf ("%-9s: %s\n" , row [2 ], row [3 ]);
1108- strmov (prev , row [0 ]);
1099+ strmake_buf (prev , row [0 ]);
11091100 }
11101101 /* add the last table to be repaired to the list */
11111102 if (found_error && opt_auto_repair && what_to_do != DO_REPAIR )
0 commit comments