diff options
author | unknown <bar@mysql.com> | 2005-10-25 15:36:39 +0500 |
---|---|---|
committer | unknown <bar@mysql.com> | 2005-10-25 15:36:39 +0500 |
commit | 4b5c33a75ca07fade8e9bd9893b05c28c89b3075 (patch) | |
tree | c55b70882640f5c49ad3be26fe5917053c1033cd /mysql-test | |
parent | 215602cbe39243e9b6421894e11aa52ef576da81 (diff) | |
download | mariadb-git-4b5c33a75ca07fade8e9bd9893b05c28c89b3075.tar.gz |
Bug#14255 CAST(x AS BINARY(N)) does not pad
type_binary.result, type_binary.test:
Adding test case.
item_timefunc.cc:
Padding code was added.
sql/item_timefunc.cc:
Bug#14255 CAST(x AS BINARY(N)) does not pad
Padding code was added.
mysql-test/t/type_binary.test:
Adding test case.
mysql-test/r/type_binary.result:
Adding test case.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/type_binary.result | 3 | ||||
-rw-r--r-- | mysql-test/t/type_binary.test | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/r/type_binary.result b/mysql-test/r/type_binary.result index 49fd7ba5633..1c60bf46608 100644 --- a/mysql-test/r/type_binary.result +++ b/mysql-test/r/type_binary.result @@ -111,3 +111,6 @@ select count(distinct s1) from t1; count(distinct s1) 3 drop table t1; +select hex(cast(0x10 as binary(2))); +hex(cast(0x10 as binary(2))) +1000 diff --git a/mysql-test/t/type_binary.test b/mysql-test/t/type_binary.test index b5928cb14c4..451363c1ae4 100644 --- a/mysql-test/t/type_binary.test +++ b/mysql-test/t/type_binary.test @@ -65,3 +65,6 @@ select hex(s1) from t1 where s1=0x0120; select hex(s1) from t1 where s1=0x0100; select count(distinct s1) from t1; drop table t1; + +# check that cast appends trailing zeros +select hex(cast(0x10 as binary(2))); |