mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b28875
into mysql.com:/home/bar/mysql-work/mysql-5.1.b28875
This commit is contained in:
@@ -896,4 +896,30 @@ select hex(convert(s1 using latin1)) from t1;
|
||||
hex(convert(s1 using latin1))
|
||||
7F
|
||||
drop table t1;
|
||||
create table t1 (a varchar(15) character set ascii not null, b int);
|
||||
insert into t1 values ('a',1);
|
||||
select concat(a,if(b<10,_ucs2 0x0061,_ucs2 0x0062)) from t1;
|
||||
concat(a,if(b<10,_ucs2 0x0061,_ucs2 0x0062))
|
||||
aa
|
||||
select concat(a,if(b>10,_ucs2 0x0061,_ucs2 0x0062)) from t1;
|
||||
concat(a,if(b>10,_ucs2 0x0061,_ucs2 0x0062))
|
||||
ab
|
||||
select * from t1 where a=if(b<10,_ucs2 0x0061,_ucs2 0x0062);
|
||||
a b
|
||||
a 1
|
||||
select * from t1 where a=if(b>10,_ucs2 0x0061,_ucs2 0x0062);
|
||||
a b
|
||||
select concat(a,if(b<10,_ucs2 0x00C0,_ucs2 0x0062)) from t1;
|
||||
ERROR HY000: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (ucs2_general_ci,COERCIBLE) for operation 'concat'
|
||||
select concat(a,if(b>10,_ucs2 0x00C0,_ucs2 0x0062)) from t1;
|
||||
ERROR HY000: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (ucs2_general_ci,COERCIBLE) for operation 'concat'
|
||||
select concat(a,if(b<10,_ucs2 0x0062,_ucs2 0x00C0)) from t1;
|
||||
ERROR HY000: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (ucs2_general_ci,COERCIBLE) for operation 'concat'
|
||||
select concat(a,if(b>10,_ucs2 0x0062,_ucs2 0x00C0)) from t1;
|
||||
ERROR HY000: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (ucs2_general_ci,COERCIBLE) for operation 'concat'
|
||||
select * from t1 where a=if(b<10,_ucs2 0x00C0,_ucs2 0x0062);
|
||||
ERROR HY000: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (ucs2_general_ci,COERCIBLE) for operation '='
|
||||
select * from t1 where a=if(b<10,_ucs2 0x0062,_ucs2 0x00C0);
|
||||
ERROR HY000: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (ucs2_general_ci,COERCIBLE) for operation '='
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
||||
|
@@ -1639,6 +1639,42 @@ coercibility(col1) collation(col1)
|
||||
0 utf8_swedish_ci
|
||||
drop view v1, v2;
|
||||
drop table t1;
|
||||
set names utf8;
|
||||
create table t1 (a varchar(10) character set latin1, b int);
|
||||
insert into t1 values ('a',1);
|
||||
select concat(a, if(b>10, N'x', N'y')) from t1;
|
||||
concat(a, if(b>10, N'x', N'y'))
|
||||
ay
|
||||
select concat(a, if(b>10, N'æ', N'ß')) from t1;
|
||||
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'concat'
|
||||
drop table t1;
|
||||
set names utf8;
|
||||
create table t1 (a varchar(10) character set latin1, b int);
|
||||
insert into t1 values ('a',1);
|
||||
select concat(a, if(b>10, _utf8'x', _utf8'y')) from t1;
|
||||
concat(a, if(b>10, _utf8'x', _utf8'y'))
|
||||
ay
|
||||
select concat(a, if(b>10, _utf8'æ', _utf8'ß')) from t1;
|
||||
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'concat'
|
||||
drop table t1;
|
||||
set names utf8;
|
||||
create table t1 (a varchar(10) character set latin1, b int);
|
||||
insert into t1 values ('a',1);
|
||||
select concat(a, if(b>10, _utf8 0x78, _utf8 0x79)) from t1;
|
||||
concat(a, if(b>10, _utf8 0x78, _utf8 0x79))
|
||||
ay
|
||||
select concat(a, if(b>10, _utf8 0xC3A6, _utf8 0xC3AF)) from t1;
|
||||
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'concat'
|
||||
drop table t1;
|
||||
set names utf8;
|
||||
create table t1 (a varchar(10) character set latin1, b int);
|
||||
insert into t1 values ('a',1);
|
||||
select concat(a, if(b>10, 'x' 'x', 'y' 'y')) from t1;
|
||||
concat(a, if(b>10, 'x' 'x', 'y' 'y'))
|
||||
ayy
|
||||
select concat(a, if(b>10, 'x' 'æ', 'y' 'ß')) from t1;
|
||||
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'concat'
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
colA int(11) NOT NULL,
|
||||
colB varchar(255) character set utf8 NOT NULL,
|
||||
|
@@ -1222,6 +1222,21 @@ SELECT TIME_FORMAT(SEC_TO_TIME(a),"%H:%i:%s") FROM (SELECT 3020399 AS a UNION SE
|
||||
TIME_FORMAT(SEC_TO_TIME(a),"%H:%i:%s")
|
||||
838:59:58
|
||||
838:59:59
|
||||
set names latin1;
|
||||
create table t1 (a varchar(15) character set ascii not null);
|
||||
insert into t1 values ('070514-000000');
|
||||
select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1;
|
||||
concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull'))
|
||||
#
|
||||
set names swe7;
|
||||
select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1;
|
||||
ERROR HY000: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (swe7_swedish_ci,COERCIBLE) for operation 'concat'
|
||||
set names latin1;
|
||||
set lc_time_names=fr_FR;
|
||||
select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1;
|
||||
ERROR HY000: Illegal mix of collations (ascii_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation 'concat'
|
||||
set lc_time_names=en_US;
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
||||
select date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND);
|
||||
date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND)
|
||||
|
Reference in New Issue
Block a user