From: Date: January 12 2006 1:05pm Subject: bk commit into 5.0 tree (bar:1.2041) BUG#15581 List-Archive: http://lists.mysql.com/commits/959 X-Bug: 15581 Message-Id: <200601121205.k0CC5rlP045656@bar.intranet.mysql.r18.ru> Below is the list of changes that have just been committed into a local 5.0 repository of bar. When bar 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.2041 06/01/12 16:05:46 bar@stripped +1 -0 sql_show.cc: after-merge fix for bug#15581 COALESCE function truncates mutli-byte TINYTEXT values sql/sql_show.cc 1.305 06/01/12 16:04:45 bar@stripped +6 -3 after-merge fix for bug#15581 COALESCE function truncates mutli-byte TINYTEXT values , # 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: bar # Host: bar.intranet.mysql.r18.ru # Root: /usr/home/bar/mysql-5.0 --- 1.304/sql/sql_show.cc 2006-01-11 03:07:35 +04:00 +++ 1.305/sql/sql_show.cc 2006-01-12 16:04:45 +04:00 @@ -2623,12 +2623,15 @@ field->real_type() == MYSQL_TYPE_VARCHAR || // For varbinary type field->real_type() == MYSQL_TYPE_STRING) // For binary type { + uint32 octet_max_length= field->max_length(); + if (octet_max_length != (uint32) 4294967295U) + octet_max_length /= field->charset()->mbmaxlen; longlong char_max_len= is_blob ? - (longlong) field->max_length() / field->charset()->mbminlen : - (longlong) field->max_length() / field->charset()->mbmaxlen; + (longlong) octet_max_length / field->charset()->mbminlen : + (longlong) octet_max_length / field->charset()->mbmaxlen; table->field[8]->store(char_max_len, TRUE); table->field[8]->set_notnull(); - table->field[9]->store((longlong) field->max_length(), TRUE); + table->field[9]->store((longlong) octet_max_length, TRUE); table->field[9]->set_notnull(); }