Comment 5 for bug 1233301

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

=== modified file 'Percona-Server/storage/innobase/handler/ha_innodb.cc'
--- Percona-Server/storage/innobase/handler/ha_innodb.cc 2013-09-30 13:09:29 +0000
+++ Percona-Server/storage/innobase/handler/ha_innodb.cc 2013-09-30 18:36:19 +0000
@@ -4301,6 +4301,7 @@
         handlerton* hton, /*!< in: innobase handlerton */
  THD* thd) /*!< in: handle to the MySQL thread being killed */
 {
+ ut_ad(!lock_mutex_own());
  trx_t* trx;

  DBUG_ENTER("innobase_kill_connection");

=== modified file 'Percona-Server/storage/innobase/lock/lock0lock.cc'
--- Percona-Server/storage/innobase/lock/lock0lock.cc 2013-09-30 08:59:29 +0000
+++ Percona-Server/storage/innobase/lock/lock0lock.cc 2013-09-30 18:30:52 +0000
@@ -1662,7 +1662,9 @@

   if (lock_rec_has_to_wait(trx, mode, lock, is_supremum)) {
 #ifdef WITH_WSREP
+ lock_mutex_exit();
    wsrep_kill_victim(trx, lock);
+ lock_mutex_enter();
 #endif
    return(lock);
   }

=============================================================

is better since lock_mutex is innodb only.