List:Internals« Previous MessageNext Message »
From:tomas Date:September 19 2005 3:53pm
Subject:bk commit into 5.0 tree (tulin:1.1982) BUG#13152
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of ndbdev. When ndbdev 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.1982 05/09/19 15:52:57 tulin@stripped +1 -0
    Corrected last fix for
    Bug #13152 bit fields and fields that follow become corrupted when dumped from NDB
tables

  sql/table.cc
    1.190 05/09/19 15:51:52 ndbdev@stripped +6 -2
      Corrected last fix for
      Bug #13152 bit fields and fields that follow become corrupted when dumped from NDB
tables

# 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:	tulin
# Host:	dl145b.mysql.com
# Root:	/home/ndbdev/tomas/mysql-5.0

--- 1.189/sql/table.cc	Wed Sep 14 13:44:40 2005
+++ 1.190/sql/table.cc	Mon Sep 19 15:51:52 2005
@@ -287,8 +287,6 @@
   keynames=(char*) key_part;
   strpos+= (strmov(keynames, (char *) strpos) - keynames)+1;
 
-  share->null_bytes= null_pos - (uchar*) outparam->null_flags + (null_bit_pos + 7)
/ 8;
-
   share->reclength = uint2korr((head+16));
   if (*(head+26) == 1)
     share->system= 1;				/* one-record-database */
@@ -459,6 +457,9 @@
   {
     outparam->null_flags=null_pos=(uchar*) record+1;
     null_bit_pos= (db_create_options & HA_OPTION_PACK_RECORD) ? 0 : 1;
+    /* null_bytes below is only correct under the condition that
+       there are no bit fields.  Correct values is set below after the
+       table struct is initialized */
     share->null_bytes= (share->null_fields + null_bit_pos + 7) / 8;
   }
   else
@@ -870,6 +871,9 @@
 	(*save++)= i;
     }
   }
+
+  /* the correct null_bytes can now be set, since bitfields have been taken into account
*/
+  share->null_bytes= null_pos - (uchar*) outparam->null_flags + (null_bit_pos + 7)
/ 8;
 
   /* The table struct is now initialized;  Open the table */
   error=2;
Thread
bk commit into 5.0 tree (tulin:1.1982) BUG#13152tomas19 Sep