diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-08-21 14:15:25 +0500 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-08-21 14:15:25 +0500 |
commit | 34e882dd79663c428199a76ba8fcfe6d704592af (patch) | |
tree | c97e84f2eab14aa455ae3c07b91e184b75d6cd28 /mysql-test/r/cast.result | |
parent | 8359a2c7298f4c936ca2a0bde083d87d35538e1d (diff) | |
download | mariadb-git-34e882dd79663c428199a76ba8fcfe6d704592af.tar.gz |
CAST(expr AS CHAR(10)) is now working
Diffstat (limited to 'mysql-test/r/cast.result')
-rw-r--r-- | mysql-test/r/cast.result | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index 5d185bee005..d604a17d270 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -42,6 +42,60 @@ t1 CREATE TABLE `t1` ( `t` char(4) character set cp1251 NOT NULL default '' ) TYPE=MyISAM CHARSET=latin1 drop table t1; +select +cast(_latin1'ab' AS char) as c1, +cast(_latin1'a ' AS char) as c2, +cast(_latin1'abc' AS char(2)) as c3, +cast(_latin1'a ' AS char(2)) as c4, +cast(_latin1'a' AS char(2)) as c5; +c1 c2 c3 c4 c5 +ab a ab a a +create table t1 select +cast(_latin1'ab' AS char) as c1, +cast(_latin1'a ' AS char) as c2, +cast(_latin1'abc' AS char(2)) as c3, +cast(_latin1'a ' AS char(2)) as c4, +cast(_latin1'a' AS char(2)) as c5; +select * from t1; +c1 c2 c3 c4 c5 +ab a ab a a +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` char(2) binary NOT NULL default '', + `c2` char(2) binary NOT NULL default '', + `c3` char(2) binary NOT NULL default '', + `c4` char(2) binary NOT NULL default '', + `c5` char(2) binary NOT NULL default '' +) TYPE=MyISAM CHARSET=latin1 +drop table t1; +select +cast(_koi8r'ÆÇ' AS nchar) as c1, +cast(_koi8r'Æ ' AS nchar) as c2, +cast(_koi8r'ÆÇÈ' AS nchar(2)) as c3, +cast(_koi8r'Æ ' AS nchar(2)) as c4, +cast(_koi8r'Æ' AS nchar(2)) as c5; +c1 c2 c3 c4 c5 +фг Ñ„ фг Ñ„ Ñ„ +create table t1 select +cast(_koi8r'ÆÇ' AS nchar) as c1, +cast(_koi8r'Æ ' AS nchar) as c2, +cast(_koi8r'ÆÇÈ' AS nchar(2)) as c3, +cast(_koi8r'Æ ' AS nchar(2)) as c4, +cast(_koi8r'Æ' AS nchar(2)) as c5; +select * from t1; +c1 c2 c3 c4 c5 +фг Ñ„ фг Ñ„ Ñ„ +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` char(2) character set utf8 NOT NULL default '', + `c2` char(2) character set utf8 NOT NULL default '', + `c3` char(2) character set utf8 NOT NULL default '', + `c4` char(2) character set utf8 NOT NULL default '', + `c5` char(2) character set utf8 NOT NULL default '' +) TYPE=MyISAM CHARSET=latin1 +drop table t1; select cast("2001-1-1" as date) = "2001-01-01"; cast("2001-1-1" as date) = "2001-01-01" 1 |