diff options
author | Alexander Nozdrin <alik@sun.com> | 2009-08-27 16:46:34 +0400 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2009-08-27 16:46:34 +0400 |
commit | 4bf2c41df4ea0d62ce6b66da155988aafe2328ba (patch) | |
tree | 18b7f63b07eb1ba083173f148d764f818d36ceeb /storage/innobase | |
parent | 0108660d12edfe3e522d364440cf3c4e566668b0 (diff) | |
parent | f76fb67e7c963b4d4181301e650ecbeec6458895 (diff) | |
download | mariadb-git-4bf2c41df4ea0d62ce6b66da155988aafe2328ba.tar.gz |
Merge from mysql-trunk.
Diffstat (limited to 'storage/innobase')
-rw-r--r-- | storage/innobase/handler/handler0alter.cc | 1 | ||||
-rw-r--r-- | storage/innobase/lock/lock0lock.c | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index d1f64a1985c..5075b841879 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -863,6 +863,7 @@ error_handling: indexed_table->n_mysql_handles_opened++; error = row_merge_drop_table(trx, innodb_table); + innodb_table = indexed_table; goto convert_error; case DB_TOO_BIG_RECORD: diff --git a/storage/innobase/lock/lock0lock.c b/storage/innobase/lock/lock0lock.c index fcd8d268331..0cc89336199 100644 --- a/storage/innobase/lock/lock0lock.c +++ b/storage/innobase/lock/lock0lock.c @@ -3574,7 +3574,8 @@ lock_table_remove_low( and lock_grant()). Therefore it can be empty and we need to check for that. */ - if (!ib_vector_is_empty(trx->autoinc_locks)) { + if (!lock_get_wait(lock) + && !ib_vector_is_empty(trx->autoinc_locks)) { lock_t* autoinc_lock; autoinc_lock = ib_vector_pop(trx->autoinc_locks); @@ -3647,8 +3648,10 @@ lock_table_enqueue_waiting( if (lock_deadlock_occurs(lock, trx)) { - lock_reset_lock_and_trx_wait(lock); + /* The order here is important, we don't want to + lose the state of the lock before calling remove. */ lock_table_remove_low(lock); + lock_reset_lock_and_trx_wait(lock); return(DB_DEADLOCK); } |