mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 06:44:16 +01:00
branches/zip: ha_innobase::add_index(): Allocate a new transaction for
the dictionary operations. TODO: ha_innobase::final_drop_index() should do the same, and set trx->dict_operation as well.
This commit is contained in:
parent
55e009428e
commit
0a2e8d97be
1 changed files with 7 additions and 2 deletions
|
@ -8260,9 +8260,11 @@ ha_innobase::add_index(
|
|||
|
||||
heap = mem_heap_create(1024);
|
||||
|
||||
trx = check_trx_exists(user_thd);
|
||||
trx_search_latch_release_if_reserved(trx);
|
||||
/* In case MySQL calls this in the middle of a SELECT query, release
|
||||
possible adaptive hash latch to avoid deadlocks of threads. */
|
||||
trx_search_latch_release_if_reserved(check_trx_exists(user_thd));
|
||||
|
||||
trx = trx_allocate_for_mysql();
|
||||
trx_start_if_not_started(trx);
|
||||
|
||||
innobase_register_stmt(ht, user_thd);
|
||||
|
@ -8282,6 +8284,7 @@ ha_innobase::add_index(
|
|||
err_exit:
|
||||
mem_heap_free(heap);
|
||||
trx_general_rollback_for_mysql(trx, FALSE, NULL);
|
||||
trx_free_for_mysql(trx);
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
@ -8506,6 +8509,8 @@ convert_error:
|
|||
row_mysql_unlock_data_dictionary(trx);
|
||||
}
|
||||
|
||||
trx_free_for_mysql(trx);
|
||||
|
||||
/* There might be work for utility threads.*/
|
||||
srv_active_wake_master_thread();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue