From: Date: September 19 2005 3:39pm Subject: bk commit into 5.0 tree (tulin:1.1974) BUG#13152 List-Archive: http://lists.mysql.com/internals/30046 X-Bug: 13152 Message-Id: <200509191339.j8JDdBAo003247@dl145c.mysql.com> 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.1974 05/09/19 15:39:07 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.180 05/09/19 15:38:19 tulin@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: dl145c.mysql.com # Root: /home/ndbdev/tomas/mysql-5.0-wl1012 --- 1.179/sql/table.cc Fri Sep 16 13:12:03 2005 +++ 1.180/sql/table.cc Mon Sep 19 15:38:19 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 */ @@ -460,6 +458,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 @@ -871,6 +872,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;