Below is the list of changes that have just been committed into a local
4.1 repository of bar. When bar does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2339 05/07/18 17:59:00 bar@stripped +3 -0
ctype_recoding.result, ctype_recoding.test:
fixing tests accordingly
item.cc:
bug#10446: Illegal mix of collations
Allow conversion of all constant items.
mysql-test/r/ctype_recoding.result
1.25 05/07/18 17:58:30 bar@stripped +2 -1
fixing tests accordingly
mysql-test/t/ctype_recoding.test
1.20 05/07/18 17:57:12 bar@stripped +0 -1
fixing tests accordingly
sql/item.cc
1.215 05/07/18 17:56:14 bar@stripped +9 -1
bug#10446: Illegal mix of collations
Allow conversion of all constant items.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: bar
# Host: bar.intranet.mysql.r18.ru
# Root: /usr/home/bar/mysql-4.1
--- 1.214/sql/item.cc 2005-07-14 10:46:08 +05:00
+++ 1.215/sql/item.cc 2005-07-18 17:56:14 +05:00
@@ -219,7 +219,15 @@
if (collation.collation != &my_charset_bin &&
tocs != &my_charset_bin &&
!(tocs->state & MY_CS_UNICODE))
- return NULL; // safe conversion is not possible
+ {
+ if (!const_item())
+ return NULL; // safe conversion is not possible
+ String cstr, tmp, *str= val_str(&tmp);
+ uint conv_errors;
+ cstr.copy(str->ptr(), str->length(), str->charset(), tocs,
&conv_errors);
+ if (conv_errors)
+ return NULL;
+ }
return new Item_func_conv_charset(this, tocs);
}
--- 1.24/mysql-test/r/ctype_recoding.result 2004-11-02 16:01:13 +04:00
+++ 1.25/mysql-test/r/ctype_recoding.result 2005-07-18 17:58:30 +05:00
@@ -181,7 +181,8 @@
a
×ÁÓÑ
select * from t1 where a=concat(_koi8r'×ÁÓÑ');
-ERROR HY000: Illegal mix of collations (cp1251_general_ci,IMPLICIT) and
(koi8r_general_ci,COERCIBLE) for operation '='
+a
+×ÁÓÑ
select * from t1 where a=_latin1'×ÁÓÑ';
ERROR HY000: Illegal mix of collations (cp1251_general_ci,IMPLICIT) and
(latin1_swedish_ci,COERCIBLE) for operation '='
drop table t1;
--- 1.19/mysql-test/t/ctype_recoding.test 2004-11-02 16:00:56 +04:00
+++ 1.20/mysql-test/t/ctype_recoding.test 2005-07-18 17:57:12 +05:00
@@ -145,7 +145,6 @@
# this is possible:
select * from t1 where a=_koi8r'×ÁÓÑ';
# this is not possible, because we have a function, not just a constant:
---error 1267
select * from t1 where a=concat(_koi8r'×ÁÓÑ');
# this is not posible, cannot convert _latin1'×ÁÓÑ' into cp1251:
--error 1267
| Thread |
|---|
| • bk commit into 4.1 tree (bar:1.2339) BUG#10446 | bar | 18 Jul |