From: gluh Date: December 19 2005 12:21pm Subject: bk commit into 5.0 tree (gluh:1.1993) BUG#14271 List-Archive: http://lists.mysql.com/commits/247 X-Bug: 14271 Message-Id: <20051219122113.949E73006B@eagle.intranet.mysql.r18.ru> Below is the list of changes that have just been committed into a local 5.0 repository of gluh. When gluh 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.1993 05/12/19 16:21:02 gluh@stripped +3 -0 Fix for bug#14271 I_S: columns has no size for (var)binary columns set character_octet_length, character_maximum_length for binary and varbinary field types sql/sql_show.cc 1.302 05/12/19 16:20:56 gluh@stripped +3 -1 Fix for bug#14271 I_S: columns has no size for (var)binary columns set character_octet_length, character_maximum_length for binary and varbinary field types mysql-test/t/information_schema.test 1.65 05/12/19 16:20:56 gluh@stripped +8 -0 Fix for bug#14271 I_S: columns has no size for (var)binary columns test case mysql-test/r/information_schema.result 1.92 05/12/19 16:20:56 gluh@stripped +7 -0 Fix for bug#14271 I_S: columns has no size for (var)binary columns test case # 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: gluh # Host: eagle.intranet.mysql.r18.ru # Root: /home/gluh/MySQL/Merge/5.0 --- 1.301/sql/sql_show.cc Mon Dec 19 14:46:49 2005 +++ 1.302/sql/sql_show.cc Mon Dec 19 16:20:56 2005 @@ -2616,7 +2616,9 @@ static int get_schema_column_record(THD table->field[6]->store((const char*) pos, strlen((const char*) pos), cs); is_blob= (field->type() == FIELD_TYPE_BLOB); - if (field->has_charset() || is_blob) + if (field->has_charset() || is_blob || + field->real_type() == MYSQL_TYPE_VARCHAR || // For varbinary type + field->real_type() == MYSQL_TYPE_STRING) // For binary type { longlong char_max_len= is_blob ? (longlong) field->max_length() / field->charset()->mbminlen : --- 1.91/mysql-test/r/information_schema.result Mon Dec 19 14:46:48 2005 +++ 1.92/mysql-test/r/information_schema.result Mon Dec 19 16:20:56 2005 @@ -1067,3 +1067,10 @@ show indexes from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 1 f1 1 f1 A NULL NULL NULL YES BTREE drop table t1; +create table t1(f1 binary(32), f2 varbinary(64)); +select character_maximum_length, character_octet_length +from information_schema.columns where table_name='t1'; +character_maximum_length character_octet_length +32 32 +64 64 +drop table t1; --- 1.64/mysql-test/t/information_schema.test Mon Dec 19 14:46:49 2005 +++ 1.65/mysql-test/t/information_schema.test Mon Dec 19 16:20:56 2005 @@ -759,3 +759,11 @@ show columns from t1; describe t1; show indexes from t1; drop table t1; + +# +# Bug#14271 I_S: columns has no size for (var)binary columns +# +create table t1(f1 binary(32), f2 varbinary(64)); +select character_maximum_length, character_octet_length +from information_schema.columns where table_name='t1'; +drop table t1;