diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-07-14 19:28:36 +0500 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-07-14 19:28:36 +0500 |
commit | dce04ce1beaad3979101ccb827071b03d04f66eb (patch) | |
tree | 0667ae289e93ee3455aa91b49232e5d5f83c73b1 /mysql-test/r/case.result | |
parent | 6b84badcf71d8a8494076fc2c2f66f113a6e939a (diff) | |
download | mariadb-git-dce04ce1beaad3979101ccb827071b03d04f66eb.tar.gz |
COALESCE now aggregates its argument types in this way:
if some of the arguments is STRING_RESULT the STRING_RESULT
else if some of the arguments is REAL_RESULT then REAL_RESULT
else INT_RESULT
Diffstat (limited to 'mysql-test/r/case.result')
-rw-r--r-- | mysql-test/r/case.result | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result index 914e05efa7a..04627a7a493 100644 --- a/mysql-test/r/case.result +++ b/mysql-test/r/case.result @@ -71,3 +71,24 @@ orange yellow green drop table t1; +SET NAMES latin1; +CREATE TABLE t1 SELECT COALESCE(_latin1'a',_latin2'a'); +ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation 'coalesce' +CREATE TABLE t1 SELECT COALESCE('a' COLLATE latin1_swedish_ci,'b' COLLATE latin1_bin); +ERROR HY000: Illegal mix of collations (latin1_swedish_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation 'coalesce' +CREATE TABLE t1 SELECT +COALESCE(1), COALESCE(1.0),COALESCE('a'), +COALESCE(1,1.0), COALESCE(1,'1'),COALESCE(1.1,'1'), +COALESCE('a' COLLATE latin1_bin,'b'); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `COALESCE(1)` int(1) NOT NULL default '0', + `COALESCE(1.0)` double(3,1) NOT NULL default '0.0', + `COALESCE('a')` char(1) NOT NULL default '', + `COALESCE(1,1.0)` double(3,1) NOT NULL default '0.0', + `COALESCE(1,'1')` char(1) NOT NULL default '', + `COALESCE(1.1,'1')` char(3) NOT NULL default '', + `COALESCE('a' COLLATE latin1_bin,'b')` char(1) character set latin1 collate latin1_bin NOT NULL default '' +) TYPE=MyISAM CHARSET=latin1 +DROP TABLE t1; |