diff options
author | unknown <jimw@rama.(none)> | 2006-07-12 13:22:38 -0700 |
---|---|---|
committer | unknown <jimw@rama.(none)> | 2006-07-12 13:22:38 -0700 |
commit | 2fc276d54f43ec063019ce261fb9b9a17e484c96 (patch) | |
tree | a62c206cafe37632e7eae07821fbe93990d86fb9 /mysql-test/r/cast.result | |
parent | a7dddd3b67e70292c0813e80ad255f1dc2f3a867 (diff) | |
download | mariadb-git-2fc276d54f43ec063019ce261fb9b9a17e484c96.tar.gz |
Bug #17903: cast to char results in binary
The character set was not being properly initialized in CAST() with
a type like "CHAR(2) BINARY", which resulted in incorrect results or
even a crash.
mysql-test/r/cast.result:
Add new results
mysql-test/t/cast.test:
Add new regression test
sql/sql_yacc.yy:
Make sure Lex->charset is set to NULL when nothing follows BINARY
in type declaration.
Diffstat (limited to 'mysql-test/r/cast.result')
-rw-r--r-- | mysql-test/r/cast.result | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index d60efa083e0..a07ca21652b 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -381,3 +381,14 @@ DROP TABLE t1; select cast(NULL as decimal(6)) as t1; t1 NULL +set names latin1; +select hex(cast('a' as char(2) binary)); +hex(cast('a' as char(2) binary)) +61 +select hex(cast('a' as binary(2))); +hex(cast('a' as binary(2))) +6100 +select hex(cast('a' as char(2) binary)); +hex(cast('a' as char(2) binary)) +61 +End of 5.0 tests |