From 4b4a13a150c7aeffc3cd96f485b7f16ea9ea034d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 15 Mar 2006 10:14:35 +0200 Subject: [PATCH] Extended test case to check that binary column actually adds zeroes, not spaces at the end. --- mysql-test/r/alter_table.result | 6 ++++++ mysql-test/t/alter_table.test | 2 ++ 2 files changed, 8 insertions(+) diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index f1ad8d31334..1ad9cd6d1e9 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -636,7 +636,13 @@ INSERT INTO t1 VALUES ('test'); SELECT LENGTH(s) FROM t1; LENGTH(s) 8 +SELECT HEX(s) FROM t1; +HEX(s) +7465737400000000 ALTER TABLE t1 MODIFY s BINARY(10); +SELECT HEX(s) FROM t1; +HEX(s) +74657374000000000000 SELECT LENGTH(s) FROM t1; LENGTH(s) 10 diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index 57fa7acbc86..7cddb8bafa9 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -464,6 +464,8 @@ DROP TABLE t1; CREATE TABLE t1 (s BINARY(8)); INSERT INTO t1 VALUES ('test'); SELECT LENGTH(s) FROM t1; +SELECT HEX(s) FROM t1; ALTER TABLE t1 MODIFY s BINARY(10); +SELECT HEX(s) FROM t1; SELECT LENGTH(s) FROM t1; DROP TABLE t1;