mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 22:12:30 +01:00
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).
This commit is contained in:
parent
95aaddbe70
commit
3bc2b8f158
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
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
|
2009-06-25 The InnoDB Team
|
||||||
|
|
||||||
* handler/ha_innodb.cc,
|
* 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
|
/* In case MySQL calls this in the middle of a SELECT query, release
|
||||||
possible adaptive hash latch to avoid deadlocks of threads. */
|
possible adaptive hash latch to avoid deadlocks of threads. */
|
||||||
trx_search_latch_release_if_reserved(prebuilt->trx);
|
trx_search_latch_release_if_reserved(prebuilt->trx);
|
||||||
|
trx_start_if_not_started(prebuilt->trx);
|
||||||
|
|
||||||
/* Create a background transaction for the operations on
|
/* Create a background transaction for the operations on
|
||||||
the data dictionary tables. */
|
the data dictionary tables. */
|
||||||
|
@ -1136,6 +1137,7 @@ ha_innobase::final_drop_index(
|
||||||
update_thd();
|
update_thd();
|
||||||
|
|
||||||
trx_search_latch_release_if_reserved(prebuilt->trx);
|
trx_search_latch_release_if_reserved(prebuilt->trx);
|
||||||
|
trx_start_if_not_started(prebuilt->trx);
|
||||||
|
|
||||||
/* Create a background transaction for the operations on
|
/* Create a background transaction for the operations on
|
||||||
the data dictionary tables. */
|
the data dictionary tables. */
|
||||||
|
|
Loading…
Reference in a new issue