Commit 91bd28c2 authored by Marko Mäkelä's avatar Marko Mäkelä

Merge mysql-5.1 to mysql-5.5.

parents 29e12cae 26ed79ec
......@@ -3283,6 +3283,18 @@ check_next_foreign:
trx_set_dict_operation(trx, TRX_DICT_OP_TABLE);
trx->table_id = table->id;
/* Mark all indexes unavailable in the data dictionary cache
before starting to drop the table. */
for (index = dict_table_get_first_index(table);
index != NULL;
index = dict_table_get_next_index(index)) {
rw_lock_x_lock(dict_index_get_lock(index));
ut_ad(!index->to_be_dropped);
index->to_be_dropped = TRUE;
rw_lock_x_unlock(dict_index_get_lock(index));
}
/* We use the private SQL parser of Innobase to generate the
query graphs needed in deleting the dictionary data from system
tables in Innobase. Deleting a row from SYS_INDEXES table also
......@@ -3369,18 +3381,6 @@ check_next_foreign:
"END;\n"
, FALSE, trx);
/* Mark all indexes unavailable in the data dictionary cache
before starting to drop the table. */
for (index = dict_table_get_first_index(table);
index != NULL;
index = dict_table_get_next_index(index)) {
rw_lock_x_lock(dict_index_get_lock(index));
ut_ad(!index->to_be_dropped);
index->to_be_dropped = TRUE;
rw_lock_x_unlock(dict_index_get_lock(index));
}
switch (err) {
ibool is_temp;
const char* name_or_path;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment