List:Commits« Previous MessageNext Message »
From:pekka Date:February 20 2006 4:36pm
Subject:bk commit into 5.1 tree (pekka:1.2141) BUG#17505
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of pekka. When pekka 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.2141 06/02/20 16:36:30 pekka@stripped +2 -0
  ndb - rbr blobs etc: minor changes  bug#17045 bug#17505

  storage/ndb/src/ndbapi/Ndb.cpp
    1.64 06/02/20 16:32:01 pekka@stripped +8 -6
    use NAME_LEN

  sql/ha_ndbcluster_binlog.cc
    1.22 06/02/20 16:31:17 pekka@stripped +8 -6
    optim: setting db/schema for data events seems unnecessary

# 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:	pekka
# Host:	orca.ndb.mysql.com
# Root:	/space/pekka/ndb/version/my51

--- 1.63/storage/ndb/src/ndbapi/Ndb.cpp	2006-02-20 12:01:20 +01:00
+++ 1.64/storage/ndb/src/ndbapi/Ndb.cpp	2006-02-20 16:32:01 +01:00
@@ -1093,12 +1093,14 @@
   if (s1 && s1 != s0) {
     const char* s2 = strchr(s1 + 1, table_name_separator);
     if (s2 && s2 != s1 + 1) {
-      char buf[200];
-      sprintf(buf, "%.*s", s1 - s0, s0);
-      setDatabaseName(buf);
-      sprintf(buf, "%.*s", s2 - (s1 + 1), s1 + 1);
-      setDatabaseSchemaName(buf);
-      return 0;
+      char buf[NAME_LEN + 1];
+      if (s1 - s0 <= NAME_LEN && s2 - (s1 + 1) <= NAME_LEN) {
+        sprintf(buf, "%.*s", s1 - s0, s0);
+        setDatabaseName(buf);
+        sprintf(buf, "%.*s", s2 - (s1 + 1), s1 + 1);
+        setDatabaseSchemaName(buf);
+        return 0;
+      }
     }
   }
   return -1;

--- 1.21/sql/ha_ndbcluster_binlog.cc	2006-02-20 12:19:34 +01:00
+++ 1.22/sql/ha_ndbcluster_binlog.cc	2006-02-20 16:31:17 +01:00
@@ -2913,17 +2913,19 @@
             DBUG_ASSERT(share != 0);
           }
 #endif
-          // set injector_ndb database/schema from table internal name
-          int ret= ndb->setDatabaseAndSchemaName(pOp->getEvent()->getTable());
-          assert(ret == 0);
           if ((unsigned) pOp->getEventType() <
               (unsigned) NDBEVENT::TE_FIRST_NON_DATA_EVENT)
             ndb_binlog_thread_handle_data_event(ndb, pOp, row, trans);
           else
+          {
+            // set injector_ndb database/schema from table internal name
+            int ret= ndb->setDatabaseAndSchemaName(pOp->getEvent()->getTable());
+            assert(ret == 0);
             ndb_binlog_thread_handle_non_data_event(ndb, pOp, row);
-          // reset to catch errors
-          ndb->setDatabaseName("");
-          ndb->setDatabaseSchemaName("");
+            // reset to catch errors
+            ndb->setDatabaseName("");
+            ndb->setDatabaseSchemaName("");
+          }
 
           pOp= ndb->nextEvent();
         } while (pOp && pOp->getGCI() == gci);
Thread
bk commit into 5.1 tree (pekka:1.2141) BUG#17505pekka20 Feb