Loading mysql-test/r/cast.result +11 −0 Original line number Diff line number Diff line Loading @@ -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 mysql-test/t/cast.test +13 −1 Original line number Diff line number Diff line Loading @@ -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 sql/sql_yacc.yy +1 −1 Original line number Diff line number Diff line Loading @@ -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 { Loading Loading
mysql-test/r/cast.result +11 −0 Original line number Diff line number Diff line Loading @@ -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
mysql-test/t/cast.test +13 −1 Original line number Diff line number Diff line Loading @@ -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
sql/sql_yacc.yy +1 −1 Original line number Diff line number Diff line Loading @@ -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 { Loading