From: Date: March 15 2006 8:40am Subject: bk commit into 5.1 tree (jani:1.2183) BUG#18038 List-Archive: http://lists.mysql.com/commits/3850 X-Bug: 18038 Message-Id: <20060315074038.C2579239B91@ibmlab.fi> Below is the list of changes that have just been committed into a local 5.1 repository of jani. When jani 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.2183 06/03/15 09:40:30 jani@stripped +2 -0 Added a test case for Bug#18038 MySQL server corrupts binary columns data mysql-test/t/alter_table.test 1.47 06/03/15 09:40:24 jani@stripped +18 -0 Added a test case for Bug#18038 MySQL server corrupts binary columns data mysql-test/r/alter_table.result 1.62 06/03/15 09:40:24 jani@stripped +20 -0 Added a test case for Bug#18038 MySQL server corrupts binary columns data # 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: jani # Host: ibmlab.site # Root: /home/my/bk/mysql-5.1-new --- 1.61/mysql-test/r/alter_table.result 2006-02-22 11:09:46 +02:00 +++ 1.62/mysql-test/r/alter_table.result 2006-03-15 09:40:24 +02:00 @@ -621,3 +621,23 @@ engine=myisam default charset=latin1; alter table t1 change t t text; drop table t1; +CREATE TABLE t1 (s CHAR(8) BINARY); +INSERT INTO t1 VALUES ('test'); +SELECT LENGTH(s) FROM t1; +LENGTH(s) +4 +ALTER TABLE t1 MODIFY s CHAR(10) BINARY; +SELECT LENGTH(s) FROM t1; +LENGTH(s) +4 +DROP TABLE t1; +CREATE TABLE t1 (s BINARY(8)); +INSERT INTO t1 VALUES ('test'); +SELECT LENGTH(s) FROM t1; +LENGTH(s) +8 +ALTER TABLE t1 MODIFY s BINARY(10); +SELECT LENGTH(s) FROM t1; +LENGTH(s) +10 +DROP TABLE t1; --- 1.46/mysql-test/t/alter_table.test 2006-02-02 10:59:18 +02:00 +++ 1.47/mysql-test/t/alter_table.test 2006-03-15 09:40:24 +02:00 @@ -449,3 +449,21 @@ engine=myisam default charset=latin1; alter table t1 change t t text; drop table t1; + +# +# Bug#18038 MySQL server corrupts binary columns data +# + +CREATE TABLE t1 (s CHAR(8) BINARY); +INSERT INTO t1 VALUES ('test'); +SELECT LENGTH(s) FROM t1; +ALTER TABLE t1 MODIFY s CHAR(10) BINARY; +SELECT LENGTH(s) FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 (s BINARY(8)); +INSERT INTO t1 VALUES ('test'); +SELECT LENGTH(s) FROM t1; +ALTER TABLE t1 MODIFY s BINARY(10); +SELECT LENGTH(s) FROM t1; +DROP TABLE t1;