Extended test case to check that binary column

actually adds zeroes, not spaces at the end.
This commit is contained in:
jani@ibmlab.site 2006-03-15 10:14:35 +02:00
parent b3e5861a02
commit 373c17e7e2
2 changed files with 8 additions and 0 deletions

View file

@ -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

View file

@ -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;