1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge mysql.com:/usr/home/bar/mysql-4.1.b10446

into  mysql.com:/usr/home/bar/mysql-5.0
This commit is contained in:
bar@mysql.com
2005-11-29 09:25:51 +04:00
5 changed files with 53 additions and 15 deletions

View File

@ -181,11 +181,18 @@ select * from t1 where a=_koi8r'
a
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
select * from t1 where a=concat(_koi8r'<27><><EFBFBD><EFBFBD>');
ERROR HY000: Illegal mix of collations (cp1251_general_ci,IMPLICIT) and (koi8r_general_ci,COERCIBLE) for operation '='
a
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
select * from t1 where a=_latin1'<27><><EFBFBD><EFBFBD>';
ERROR HY000: Illegal mix of collations (cp1251_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='
drop table t1;
set names latin1;
create table t1 (a char(10) character set utf8 collate utf8_bin);
insert into t1 values (' xxx');
select * from t1 where a=lpad('xxx',10,' ');
a
xxx
drop table t1;
set names koi8r;
create table t1 (c1 char(10) character set cp1251);
insert into t1 values ('<27>');

View File

@ -144,8 +144,7 @@ create table t1 (a char(10) character set cp1251);
insert into t1 values (_koi8r'<27><><EFBFBD><EFBFBD>');
# this is possible:
select * from t1 where a=_koi8r'<27><><EFBFBD><EFBFBD>';
# this is not possible, because we have a function, not just a constant:
--error 1267
# this is possible, because we have a function with constant arguments:
select * from t1 where a=concat(_koi8r'<27><><EFBFBD><EFBFBD>');
# this is not posible, cannot convert _latin1'<27><><EFBFBD><EFBFBD>' into cp1251:
--error 1267
@ -153,6 +152,14 @@ select * from t1 where a=_latin1'
drop table t1;
set names latin1;
#
# Bug#10446 Illegal mix of collations
#
create table t1 (a char(10) character set utf8 collate utf8_bin);
insert into t1 values (' xxx');
select * from t1 where a=lpad('xxx',10,' ');
drop table t1;
#
# Check more automatic conversion
#