List:Commits« Previous MessageNext Message »
From:Martin Skold Date:April 5 2007 1:59pm
Subject:bk commit into 5.1 tree (mskold:1.2557) BUG#26591
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of marty. When marty 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@stripped, 2007-04-05 15:59:42+02:00, mskold@stripped +2 -0
  ha_ndbcluster.cc:
    Bug #26591  Cluster handler does not set bits in null bytes correctly: Improved comments
  ha_ndbcluster_binlog.cc:
    Bug #26591  Cluster handler does not set bits in null bytes correctly: Using empty_record() instead of bzero

  sql/ha_ndbcluster.cc@stripped, 2007-04-05 15:58:34+02:00, mskold@stripped +9 -2
    Bug #26591  Cluster handler does not set bits in null bytes correctly: Improved comments

  sql/ha_ndbcluster_binlog.cc@stripped, 2007-04-05 15:59:11+02:00, mskold@stripped +10 -6
    Bug #26591  Cluster handler does not set bits in null bytes correctly: Using empty_record() instead of bzero

# 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:	mskold
# Host:	linux.site
# Root:	/windows/Linux_space/MySQL/mysql-5.1-new-ndb

--- 1.439/sql/ha_ndbcluster.cc	2007-04-05 15:59:53 +02:00
+++ 1.440/sql/ha_ndbcluster.cc	2007-04-05 15:59:53 +02:00
@@ -3126,11 +3126,18 @@ void ndb_unpack_record(TABLE *table, Ndb
   my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->write_set);
   DBUG_ENTER("ndb_unpack_record");
 
- // Set filler bits
+  /*
+    Set the filler bits of the null byte, since they are
+    not touched in the code below.
+    
+    The filler bits are the MSBs in the last null byte
+  */ 
   if (table->s->null_bytes > 0)
        buf[table->s->null_bytes - 1]|= 256U - (1U <<
 					       table->s->last_null_bit_pos);
-  // Set null flag(s)
+  /*
+    Set null flag(s)
+  */
   for ( ; field;
        p_field++, value++, field= *p_field)
   {

--- 1.109/sql/ha_ndbcluster_binlog.cc	2007-04-05 15:59:53 +02:00
+++ 1.110/sql/ha_ndbcluster_binlog.cc	2007-04-05 15:59:53 +02:00
@@ -2273,9 +2273,11 @@ int ndb_add_ndb_binlog_index(THD *thd, v
     break;
   }
 
-  // Set all fields non-null.
-  if(ndb_binlog_index->s->null_bytes > 0)
-    bzero(ndb_binlog_index->record[0], ndb_binlog_index->s->null_bytes);
+  /*
+    Intialize ndb_binlog_index->record[0]
+  */
+  empty_record(ndb_binlog_index);
+
   ndb_binlog_index->field[0]->store(row.master_log_pos);
   ndb_binlog_index->field[1]->store(row.master_log_file,
                                 strlen(row.master_log_file),
@@ -3909,9 +3911,11 @@ restart:
             IF_DBUG(int ret=) trans.use_table(::server_id, tbl);
             DBUG_ASSERT(ret == 0);
 
-            // Set all fields non-null.
-            if(table->s->null_bytes > 0)
-              bzero(table->record[0], table->s->null_bytes);
+	    /* 
+	       Intialize table->record[0] 
+	    */
+	    empty_record(table);
+
             table->field[0]->store((longlong)::server_id);
             table->field[1]->store((longlong)gci);
             table->field[2]->store("", 0, &my_charset_bin);
Thread
bk commit into 5.1 tree (mskold:1.2557) BUG#26591Martin Skold5 Apr