1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Merge from 5.3

This commit is contained in:
unknown
2012-08-24 15:29:01 +02:00
45 changed files with 1217 additions and 467 deletions

View File

@@ -2104,6 +2104,7 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists,
{
bool is_trans;
char *db=table->db;
size_t db_length= table->db_length;
handlerton *table_type;
enum legacy_db_type frm_db_type= DB_TYPE_UNKNOWN;
@@ -2165,14 +2166,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_length);
built_ptr_query->append(".");
}
built_ptr_query->append(table->table_name);
built_ptr_query->append("`,");
append_identifier(thd, built_ptr_query, table->table_name,
table->table_name_length);
built_ptr_query->append(",");
}
/*
This means that a temporary table was droped and as such there
@@ -2228,15 +2229,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_length);
built_query.append(".");
}
built_query.append(table->table_name);
built_query.append("`,");
append_identifier(thd, &built_query, table->table_name,
table->table_name_length);
built_query.append(",");
}
}
DEBUG_SYNC(thd, "rm_table_no_locks_before_delete_table");