summaryrefslogtreecommitdiff
path: root/mysql-test/t/binary.test
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.(none)>2006-03-02 19:59:49 -0500
committerunknown <cmiller@zippy.(none)>2006-03-02 19:59:49 -0500
commite2ba74b8252586bd27ace8603aab33c76b2b50cd (patch)
tree93057b81d12a646375f9b7997adb21f55fbe55e1 /mysql-test/t/binary.test
parent44c175b7efbdf1c0a6575376698609dc328b7a85 (diff)
downloadmariadb-git-e2ba74b8252586bd27ace8603aab33c76b2b50cd.tar.gz
Expanding a binary field should result in 0x00-filled positions, not 0x20
(ASCII space). For Bug#16857. sql/field_conv.cc: Bug#16857: Do not expand BINARY fields as if they are strings (which presumably /should/ be filled with spaces). Instead, fill BINARY fields with 0x00 bytes.
Diffstat (limited to 'mysql-test/t/binary.test')
-rw-r--r--mysql-test/t/binary.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/binary.test b/mysql-test/t/binary.test
index 1ac0cfebb28..4ab6ee9eaf1 100644
--- a/mysql-test/t/binary.test
+++ b/mysql-test/t/binary.test
@@ -89,3 +89,15 @@ show create table t1;
drop table t1;
# End of 4.1 tests
+
+#
+# Bug#16857
+#
+create table t1 (col1 binary(4));
+insert into t1 values ('a'),('a ');
+select hex(col1) from t1;
+alter table t1 modify col1 binary(10);
+select hex(col1) from t1;
+insert into t1 values ('b'),('b ');
+select hex(col1) from t1;
+drop table t1;