mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 06:44:16 +01:00
branches/zip: ha_innobase::add_index(): Split some assertions.
Remove the variable parent_trx. Call innobase_register_stmt() in order to work around a MySQL bug in mysql_alter_table(), which, as of ChangeSet@1.2482.61.2, 2007-06-07 16:37:15+02:00, joerg@trift2. +8 -0 commits the transaction before calling ha_innobase::add_index(). Without re-registering the statement, the ha_commit_stmt(thd) in mysql_alter_table() would not invoke innobase_commit.
This commit is contained in:
parent
513f7ceb3c
commit
7235ea1060
1 changed files with 7 additions and 7 deletions
|
@ -8117,7 +8117,6 @@ ha_innobase::add_index(
|
|||
merge_index_def_t* index_defs; /* Index definitions */
|
||||
mem_heap_t* heap; /* Heap for index definitions */
|
||||
trx_t* trx; /* Transaction */
|
||||
trx_t* parent_trx;
|
||||
ulint num_of_idx;
|
||||
ulint num_created;
|
||||
ibool dict_locked = FALSE;
|
||||
|
@ -8126,20 +8125,21 @@ ha_innobase::add_index(
|
|||
ulint error;
|
||||
|
||||
DBUG_ENTER("ha_innobase::add_index");
|
||||
ut_a(table && key_info && num_of_keys);
|
||||
ut_a(table);
|
||||
ut_a(key_info);
|
||||
ut_a(num_of_keys);
|
||||
|
||||
update_thd(ha_thd());
|
||||
|
||||
heap = mem_heap_create_noninline(1024);
|
||||
|
||||
parent_trx = check_trx_exists(user_thd);
|
||||
trx_search_latch_release_if_reserved(parent_trx);
|
||||
|
||||
trx = parent_trx;
|
||||
ut_a(trx);
|
||||
trx = check_trx_exists(user_thd);
|
||||
trx_search_latch_release_if_reserved(trx);
|
||||
|
||||
trx_start_if_not_started_noninline(trx);
|
||||
|
||||
innobase_register_stmt(ht, user_thd);
|
||||
|
||||
trx->mysql_thd = user_thd;
|
||||
trx->mysql_query_str = thd_query(user_thd);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue