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