List:Internals« Previous MessageNext Message »
From:tomas Date:September 16 2005 7:05pm
Subject:bk commit into 5.1 tree (tomas:1.1907)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1907 05/09/16 19:05:28 tomas@stripped +1 -0
  adopted to ndb binlog to "need_reopen"

  sql/ha_ndbcluster.cc
    1.216 05/09/16 19:05:21 tomas@stripped +22 -13
    adopted to ndb binlog to "need_reopen"

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	tomas
# Host:	poseidon.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-wl2325-5.0

--- 1.215/sql/ha_ndbcluster.cc	2005-09-15 18:00:35 +02:00
+++ 1.216/sql/ha_ndbcluster.cc	2005-09-16 19:05:21 +02:00
@@ -3377,8 +3377,8 @@
   Thd_ndb *thd_ndb= get_thd_ndb(thd);
   Ndb *ndb= thd_ndb->ndb;
 
-  DBUG_PRINT("enter", ("thd: %lx, thd_ndb: %lx, thd_ndb->lock_count: %d",
-                       thd, thd_ndb, thd_ndb->lock_count));
+  DBUG_PRINT("enter", ("this: %x thd: %lx, thd_ndb: %lx, thd_ndb->lock_count: %d",
+                       this, thd, thd_ndb, thd_ndb->lock_count));
 
   if (lock_type != F_UNLCK)
   {
@@ -4734,8 +4734,8 @@
   int res;
   KEY *key;
   DBUG_ENTER("open");
-  DBUG_PRINT("enter", ("name: %s mode: %d test_if_locked: %d",
-                       name, mode, test_if_locked));
+  DBUG_PRINT("enter", ("this: %d name: %s mode: %d test_if_locked: %d",
+                       this, name, mode, test_if_locked));
   
   // Setup ref_length to make room for the whole 
   // primary key to be written in the ref variable
@@ -8997,17 +8997,26 @@
   Binlog_index_row &row= *(Binlog_index_row *)_row;
   int error= 0;
   bool need_reopen;
-  if (!binlog_index && open_binlog_index(thd,&tables,&binlog_index))
+  for ( ; ; ) /* loop for need_reopen */
   {
-    error= -1;
-    goto add_binlog_index_err;
-  }
+    if (!binlog_index && open_binlog_index(thd,&tables,&binlog_index))
+    {
+      error= -1;
+      goto add_binlog_index_err;
+    }
 
-  if (lock_tables(thd, &tables, 1, &need_reopen))
-  {
-   sql_print_error("NDB Binlog: Unable to lock table binlog_index");
-    error= -1;
-    goto add_binlog_index_err;
+    if (lock_tables(thd, &tables, 1, &need_reopen))
+    {
+      if (need_reopen)
+      {
+        close_tables_for_reopen(thd, &tables);
+        continue;
+      }
+      sql_print_error("NDB Binlog: Unable to lock table binlog_index");
+      error= -1;
+      goto add_binlog_index_err;
+    }
+    break;
   }
 
   binlog_index->field[0]->store(row.master_log_pos);
Thread
bk commit into 5.1 tree (tomas:1.1907)tomas19 Sep