mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
Extended test case to check that binary column
actually adds zeroes, not spaces at the end.
This commit is contained in:
parent
b3e5861a02
commit
373c17e7e2
2 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue