Commit 3bc2b8f1 authored by marko's avatar marko

branches/zip: ha_innobase::add_index(), ha_innobase::final_drop_index():

Start prebuilt->trx before locking the table.  This should fix Issue #293
and could fix Issue #229.
Approved by Sunny (over IM).
parent 95aaddbe
2009-06-29 The InnoDB Team
* handler/handler0alter.cc:
Start the user transaction prebuilt->trx if it was not started
before adding or dropping an index. Without this fix, the
table could be locked outside an active transaction.
2009-06-25 The InnoDB Team
* handler/ha_innodb.cc,
......
......@@ -647,6 +647,7 @@ ha_innobase::add_index(
/* 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(prebuilt->trx);
trx_start_if_not_started(prebuilt->trx);
/* Create a background transaction for the operations on
the data dictionary tables. */
......@@ -1136,6 +1137,7 @@ ha_innobase::final_drop_index(
update_thd();
trx_search_latch_release_if_reserved(prebuilt->trx);
trx_start_if_not_started(prebuilt->trx);
/* Create a background transaction for the operations on
the data dictionary tables. */
......
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