diff options
author | unknown <jimw@rama.(none)> | 2006-07-18 10:58:44 -0700 |
---|---|---|
committer | unknown <jimw@rama.(none)> | 2006-07-18 10:58:44 -0700 |
commit | d13a39b583104c3a5e75cdaa59c7991e9b721a45 (patch) | |
tree | 264c7b9fb6af28d1b64da4ce831790f6a1206c5a | |
parent | 7f2140d3ed7a114a42a2ca645608e46ff2768238 (diff) | |
parent | 2fc276d54f43ec063019ce261fb9b9a17e484c96 (diff) | |
download | mariadb-git-d13a39b583104c3a5e75cdaa59c7991e9b721a45.tar.gz |
Merge bk-internal:/home/bk/mysql-5.0-maint
into rama.(none):/home/jimw/my/mysql-5.0-17903
-rw-r--r-- | mysql-test/r/cast.result | 11 | ||||
-rw-r--r-- | mysql-test/t/cast.test | 14 | ||||
-rw-r--r-- | sql/sql_yacc.yy | 2 |
3 files changed, 25 insertions, 2 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 diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test index 533da542855..ecc92ed01d1 100644 --- a/mysql-test/t/cast.test +++ b/mysql-test/t/cast.test @@ -204,7 +204,19 @@ SELECT CAST(v AS DECIMAL), CAST(tt AS DECIMAL), CAST(t AS DECIMAL), CAST(mt AS DECIMAL), CAST(lt AS DECIMAL) from t1; DROP TABLE t1; -# Bug @10237 (CAST(NULL DECIMAL) crashes server) + +# +# Bug #10237 (CAST(NULL DECIMAL) crashes server) # select cast(NULL as decimal(6)) as t1; + +# +# Bug #17903: cast to char results in binary +# +set names latin1; +select hex(cast('a' as char(2) binary)); +select hex(cast('a' as binary(2))); +select hex(cast('a' as char(2) binary)); + +--echo End of 5.0 tests diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index deac9cb5c40..a730e2533b1 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -3089,7 +3089,7 @@ opt_bin_mod: | BINARY { Lex->type|= BINCMP_FLAG; }; opt_bin_charset: - /* empty */ { } + /* empty */ { Lex->charset= NULL; } | ASCII_SYM { Lex->charset=&my_charset_latin1; } | UNICODE_SYM { |