Comment 4 for bug 1233301

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

=== modified file 'Percona-Server/sql/sql_class.cc'
--- Percona-Server/sql/sql_class.cc 2013-09-27 11:15:01 +0000
+++ Percona-Server/sql/sql_class.cc 2013-09-30 18:31:25 +0000
@@ -1017,6 +1017,7 @@
 {
   if (signal)
   {
+ ut_ad(!lock_mutex_own());
     mysql_mutex_lock(&thd->LOCK_thd_data);
     thd->awake(THD::KILL_QUERY);
     mysql_mutex_unlock(&thd->LOCK_thd_data);

=== 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);
   }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

should correct this but thread safety of the above needs to be looked into.