diff options
author | Marko Mäkelä <marko.makela@oracle.com> | 2012-02-28 21:43:08 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@oracle.com> | 2012-02-28 21:43:08 +0200 |
commit | 2367e79e4c531c74a8f1da8107f955c4cae48f49 (patch) | |
tree | df35e3b8c705bfbb1c3f314f3e1723ce6b5e22db /storage/innobase/row/row0mysql.c | |
parent | 8235c4e1618c685f248197a4ee6aa68215a79e7a (diff) | |
parent | e74c9b71ab80d6795e3d4028f23b64a9acba7c93 (diff) | |
download | mariadb-git-2367e79e4c531c74a8f1da8107f955c4cae48f49.tar.gz |
Merge mysql-5.1 to mysql-5.5.
Diffstat (limited to 'storage/innobase/row/row0mysql.c')
-rw-r--r-- | storage/innobase/row/row0mysql.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c index 58cf08acaca..6a5cdba549f 100644 --- a/storage/innobase/row/row0mysql.c +++ b/storage/innobase/row/row0mysql.c @@ -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; |