diff options
author | Rohit Kalhans <rohit.kalhans@oracle.com> | 2012-09-22 18:07:04 +0530 |
---|---|---|
committer | Rohit Kalhans <rohit.kalhans@oracle.com> | 2012-09-22 18:07:04 +0530 |
commit | 1e5a759aff0ac95e3616ca9370e443e828791cca (patch) | |
tree | e8c9feb9d583b378ecdda8db05f6871ea6cefdbd /sql/sql_table.cc | |
parent | 967fd170f558f2d3e28cc1aede4589324e19d736 (diff) | |
parent | 5f003eca000167edc3601168029a7d86468e52a8 (diff) | |
download | mariadb-git-1e5a759aff0ac95e3616ca9370e443e828791cca.tar.gz |
upmerge to bug#14548159
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 7d70fa8afd2..b19b265a311 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2053,6 +2053,7 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, { bool is_trans; char *db=table->db; + int db_len= table->db_length; handlerton *table_type; enum legacy_db_type frm_db_type= DB_TYPE_UNKNOWN; @@ -2114,14 +2115,14 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, Don't write the database name if it is the current one (or if thd->db is NULL). */ - built_ptr_query->append("`"); if (thd->db == NULL || strcmp(db,thd->db) != 0) { - built_ptr_query->append(db); - built_ptr_query->append("`.`"); + append_identifier(thd, built_ptr_query, db, db_len); + built_ptr_query->append("."); } - built_ptr_query->append(table->table_name); - built_ptr_query->append("`,"); + append_identifier(thd, built_ptr_query, table->table_name, + strlen(table->table_name)); + built_ptr_query->append(","); } /* This means that a temporary table was droped and as such there @@ -2180,15 +2181,15 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, Don't write the database name if it is the current one (or if thd->db is NULL). */ - built_query.append("`"); if (thd->db == NULL || strcmp(db,thd->db) != 0) { - built_query.append(db); - built_query.append("`.`"); + append_identifier(thd, &built_query, db, db_len); + built_query.append("."); } - built_query.append(table->table_name); - built_query.append("`,"); + append_identifier(thd, &built_query, table->table_name, + strlen(table->table_name)); + built_query.append(","); } } DEBUG_SYNC(thd, "rm_table_no_locks_before_delete_table"); |