diff options
author | unknown <bell@laptop.sanja.is.com.ua> | 2003-08-26 16:24:51 +0300 |
---|---|---|
committer | unknown <bell@laptop.sanja.is.com.ua> | 2003-08-26 16:24:51 +0300 |
commit | b51b167e0ba3ed00c17608ce05ba154ff739a43b (patch) | |
tree | 91f4d09d0ea1f8b3c9c10f839c2a4406176b1df3 /mysql-test | |
parent | 78f54936a7f7668007a153891d4009d876741562 (diff) | |
parent | 3b799e8fd8eb13c7ad6e2bb01a922e37d9101ea7 (diff) | |
download | mariadb-git-b51b167e0ba3ed00c17608ce05ba154ff739a43b.tar.gz |
Merge laptop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into laptop.sanja.is.com.ua:/home/bell/mysql/bk/work-collation-4.1
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/mysql-test-run.sh | 19 | ||||
-rw-r--r-- | mysql-test/r/cast.result | 54 | ||||
-rw-r--r-- | mysql-test/t/cast.test | 41 |
3 files changed, 99 insertions, 15 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 874abdc0c86..f11cad4a13e 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -210,7 +210,6 @@ CHARACTER_SET=latin1 DBUSER="" START_WAIT_TIMEOUT=10 STOP_WAIT_TIMEOUT=10 -TEST_REPLICATION=0 MYSQL_TEST_SSL_OPTS="" while test $# -gt 0; do @@ -288,9 +287,6 @@ while test $# -gt 0; do --user-test=*) USER_TEST=`$ECHO "$1" | $SED -e "s;--user-test=;;"` ;; - --rpl) - TEST_REPLICATION=1 - ;; --mysqld=*) TMP=`$ECHO "$1" | $SED -e "s;--mysqld=;;"` EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT $TMP" @@ -1407,17 +1403,10 @@ then if [ x$RECORD = x1 ]; then $ECHO "Will not run in record mode without a specific test case." else - if [ x$TEST_REPLICATION = x1 ]; then - for tf in `ls -1 $TESTDIR/*.$TESTSUFFIX | $SORT` - do - run_testcase $tf - done - else - for tf in $TESTDIR/*.$TESTSUFFIX - do - run_testcase $tf - done - fi + for tf in $TESTDIR/*.$TESTSUFFIX + do + run_testcase $tf + done $RM -f $TIMEFILE # Remove for full test fi else 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 diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test index 8241d491465..b3ae8981671 100644 --- a/mysql-test/t/cast.test +++ b/mysql-test/t/cast.test @@ -24,6 +24,47 @@ show create table t1; drop table t1; # +# CAST to CHAR with/without length +# +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; + +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; +show create table t1; +drop table t1; + +# +# CAST to NCHAR with/without length +# +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; + +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; +show create table t1; +drop table t1; + + +# # The following should be fixed in 4.1 # |