summaryrefslogtreecommitdiff
path: root/mysql-test/r/cast.result
diff options
context:
space:
mode:
authorunknown <bar@bar.mysql.r18.ru>2003-08-21 14:15:25 +0500
committerunknown <bar@bar.mysql.r18.ru>2003-08-21 14:15:25 +0500
commit34e882dd79663c428199a76ba8fcfe6d704592af (patch)
treec97e84f2eab14aa455ae3c07b91e184b75d6cd28 /mysql-test/r/cast.result
parent8359a2c7298f4c936ca2a0bde083d87d35538e1d (diff)
downloadmariadb-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.result54
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