Commit 3aa1eeb2 authored by unknown's avatar unknown

Merge skozlov@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl

into  mysql.com:/home/ksm/commits/mysql-5.1-new-rpl

parents 335aa54d fa85d64d
...@@ -187,6 +187,14 @@ select * from t1 where a=_latin1' ...@@ -187,6 +187,14 @@ select * from t1 where a=_latin1'
ERROR HY000: Illegal mix of collations (cp1251_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '=' ERROR HY000: Illegal mix of collations (cp1251_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='
drop table t1; drop table t1;
set names latin1; set names latin1;
set names ascii;
create table t1 (a char(1) character set latin1);
insert into t1 values ('a');
select * from t1 where a='a';
a
a
drop table t1;
set names latin1;
create table t1 (a char(10) character set utf8 collate utf8_bin); create table t1 (a char(10) character set utf8 collate utf8_bin);
insert into t1 values (' xxx'); insert into t1 values (' xxx');
select * from t1 where a=lpad('xxx',10,' '); select * from t1 where a=lpad('xxx',10,' ');
......
...@@ -152,6 +152,16 @@ select * from t1 where a=_latin1' ...@@ -152,6 +152,16 @@ select * from t1 where a=_latin1'
drop table t1; drop table t1;
set names latin1; set names latin1;
#
# Test the same with ascii
#
set names ascii;
create table t1 (a char(1) character set latin1);
insert into t1 values ('a');
select * from t1 where a='a';
drop table t1;
set names latin1;
# #
# Bug#10446 Illegal mix of collations # Bug#10446 Illegal mix of collations
# #
......
...@@ -253,8 +253,6 @@ bool String::needs_conversion(uint32 arg_length, ...@@ -253,8 +253,6 @@ bool String::needs_conversion(uint32 arg_length,
(to_cs == &my_charset_bin) || (to_cs == &my_charset_bin) ||
(to_cs == from_cs) || (to_cs == from_cs) ||
my_charset_same(from_cs, to_cs) || my_charset_same(from_cs, to_cs) ||
(my_charset_is_ascii_based(to_cs) &&
my_charset_is_8bit_pure_ascii(from_cs)) ||
((from_cs == &my_charset_bin) && ((from_cs == &my_charset_bin) &&
(!(*offset=(arg_length % to_cs->mbminlen))))) (!(*offset=(arg_length % to_cs->mbminlen)))))
return FALSE; return FALSE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment