diff --git a/storage/innobase/clone/clone0api.cc b/storage/innobase/clone/clone0api.cc index 2b3a4c2e330..ae9e69db96b 100644 --- a/storage/innobase/clone/clone0api.cc +++ b/storage/innobase/clone/clone0api.cc @@ -2065,11 +2065,17 @@ bool Fixup_data::execute_sql(THD *thd, const char *schema_name, } else if (table_name != nullptr) { /* TABLE operation */ - snprintf(sql_stmt, sizeof(sql_stmt), "%s TABLE `%s`.`%s`", sql_operation(), - schema_name, table_name); + String format_schema_name; + String format_table_name; + append_identifier(&format_schema_name, schema_name, strlen(schema_name)); + append_identifier(&format_table_name, table_name, strlen(table_name)); + snprintf(sql_stmt, sizeof(sql_stmt), "%s TABLE %s.%s", sql_operation(), + format_schema_name.ptr(), format_table_name.ptr()); } else { /* SCHEMA operation */ - snprintf(sql_stmt, sizeof(sql_stmt), "DROP SCHEMA `%s`", schema_name); + snprintf(sql_stmt, sizeof(sql_stmt), "DROP SCHEMA %s", format_schema_name); + String format_schema_name; + append_identifier(&format_schema_name, schema_name, strlen(schema_name)); } auto saved_thread_type = thd->system_thread;