List:Commits« Previous MessageNext Message »
From:Martin Skold Date:September 13 2010 8:06am
Subject:bzr commit into mysql-5.1-telco-6.3 branch (Martin.Skold:3287) Bug#55909
View as plain text  
#At file:///home/marty/MySQL/mysql-5.1-telco-6.3/

 3287 Martin Skold	2010-09-13
      Bug#55909 ndb_binlog_index missing entry on normal mysqld shutdown: Added retry during shutdown
      modified:
        sql/ha_ndbcluster_binlog.cc

=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc	2010-09-01 10:03:47 +0000
+++ b/sql/ha_ndbcluster_binlog.cc	2010-09-13 08:06:11 +0000
@@ -6347,7 +6347,24 @@ restart_cluster_failure:
           DBUG_PRINT("info", ("COMMIT gci: %lu", (ulong) gci));
           if (ndb_log_binlog_index)
           {
-            ndb_add_ndb_binlog_index(thd, rows);
+            if (ndb_add_ndb_binlog_index(thd, rows))
+            {
+              /* 
+                 Writing to ndb_binlog_index failed, check if we are
+                 being killed and retry
+              */
+              if (thd->killed)
+              {
+                (void) pthread_mutex_lock(&LOCK_thread_count);
+                volatile THD::killed_state killed= thd->killed;
+                /* We are cleaning up, allow for flushing last epoch */
+                thd->killed= THD::NOT_KILLED;
+                ndb_add_ndb_binlog_index(thd, rows);
+                /* Restore kill flag */
+                thd->killed= killed;
+                (void) pthread_mutex_unlock(&LOCK_thread_count);
+              }
+            }
           }
           ndb_latest_applied_binlog_epoch= gci;
           break;

Thread
bzr commit into mysql-5.1-telco-6.3 branch (Martin.Skold:3287) Bug#55909Martin Skold13 Sep