List:Commits« Previous MessageNext Message »
From:msvensson Date:December 20 2005 7:53pm
Subject:bk commit into 5.1 tree (msvensson:1.1970) BUG#15981
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson 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.1970 05/12/20 20:53:29 msvensson@neptunus.(none) +1 -0
  BUG#15981 Current 5.1 fails for NDB tests

  sql/ha_ndbcluster.cc
    1.225 05/12/20 20:53:23 msvensson@neptunus.(none) +20 -0
    Add part that where lost when merging from 5.0 to 5.1

# 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:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/bug15891/my51-bug15891

--- 1.224/sql/ha_ndbcluster.cc	2005-12-18 18:02:32 +01:00
+++ 1.225/sql/ha_ndbcluster.cc	2005-12-20 20:53:23 +01:00
@@ -3014,6 +3014,26 @@
         }      
         *buff++= 0;
       }
+
+      size_t len = key_part->length;
+      const byte * ptr = record + key_part->offset;
+      Field *field = key_part->field;
+      if ((field->type() ==  MYSQL_TYPE_VARCHAR) &&
+	  ((Field_varstring*)field)->length_bytes == 1)
+      {
+	/** 
+	 * Keys always use 2 bytes length
+	 */
+	buff[0] = ptr[0];
+	buff[1] = 0;
+	memcpy(buff+2, ptr + 1, len);	
+	len += 2;
+      }
+      else
+      {
+	memcpy(buff, ptr, len);
+      }
+      buff += len;
     }
   } 
   else 
Thread
bk commit into 5.1 tree (msvensson:1.1970) BUG#15981msvensson20 Dec