From: Date: October 25 2006 11:19am Subject: bk commit into 4.1 tree (mskold:1.2569) BUG#21072 List-Archive: http://lists.mysql.com/commits/14329 X-Bug: 21072 Message-Id: <20061025091900.AD5CA1DC64D@linux.site> Below is the list of changes that have just been committed into a local 4.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, 2006-10-25 11:18:52+02:00, mskold@stripped +1 -0 Bug #21072 Duplicate key error in NDB references wrong key: Re-wrote string usage to avoid valgrind warnings sql/handler.cc@stripped, 2006-10-25 11:18:00+02:00, mskold@stripped +2 -3 Bug #21072 Duplicate key error in NDB references wrong key: Re-wrote string usage to avoid valgrind warnings # 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-4.1 --- 1.175/sql/handler.cc 2006-10-25 11:19:00 +02:00 +++ 1.176/sql/handler.cc 2006-10-25 11:19:00 +02:00 @@ -1103,16 +1103,15 @@ void handler::print_error(int error, myf char key[MAX_KEY_LENGTH]; String str(key,sizeof(key),system_charset_info); + key_unpack(&str,table,(uint) key_nr); if (key_nr == MAX_KEY) { /* Key is unknown */ - str.length(0); - str.append(""); + str.copy("", 0, system_charset_info); key_nr= -1; } else { - key_unpack(&str,table,(uint) key_nr); uint max_length=MYSQL_ERRMSG_SIZE-(uint) strlen(ER(ER_DUP_ENTRY)); if (str.length() >= max_length) {