Commit c157205e authored by marko's avatar marko

branches/zip: ha_innobase::add_index(): When creating a clustered index,

do not release and relock the data dictionary during initial preparations.
parent a691de4b
......@@ -8387,16 +8387,16 @@ ha_innobase::add_index(
heap, '1', innodb_table->name);
row_mysql_lock_data_dictionary(trx);
dict_locked = TRUE;
/* Clone table and write UNDO log record */
indexed_table = row_merge_create_temporary_table(
new_table_name, innodb_table, trx);
row_mysql_unlock_data_dictionary(trx);
if (!indexed_table) {
error = trx->error_state;
row_mysql_unlock_data_dictionary(trx);
goto err_exit;
}
} else if (!trx->dict_redo_list) {
......@@ -8415,8 +8415,10 @@ ha_innobase::add_index(
or lock waits can happen in it during an index create operation.
Drop table etc. do this latching in row0mysql.c. */
row_mysql_lock_data_dictionary(trx);
dict_locked = TRUE;
if (UNIV_LIKELY(!dict_locked)) {
row_mysql_lock_data_dictionary(trx);
dict_locked = TRUE;
}
num_created = 0;
......
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