summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <bar@bar.mysql.r18.ru>2003-07-29 17:39:39 +0500
committerunknown <bar@bar.mysql.r18.ru>2003-07-29 17:39:39 +0500
commitec1a433f087d09fd187d4a224394bfa87baa09ce (patch)
tree8aef48655752a7aa7cdc0d8c7c93977de47d1af4 /sql
parent8d7b54b7c225bb3395ea8fa0692c6799032d7304 (diff)
downloadmariadb-git-ec1a433f087d09fd187d4a224394bfa87baa09ce.tar.gz
Fixed that this sequence didn't produce an error as it should have:
CREATE TABLE t1 (s1 CHAR(5) COLLATE latin1_german1_ci, s2 CHAR(5) COLLATE latin1_swedish_ci); SELECT * FROM t1 WHERE s1 = s2;
Diffstat (limited to 'sql')
-rw-r--r--sql/item_cmpfunc.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index f89b68d3879..d992b4d69d0 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -249,7 +249,8 @@ int Arg_comparator::set_compare_func(Item_bool_func2 *item, Item_result type)
We must set cmp_charset here as we may be called from for an automatic
generated item, like in natural join
*/
- if (cmp_collation.set((*a)->collation, (*b)->collation))
+ if (cmp_collation.set((*a)->collation, (*b)->collation) ||
+ cmp_collation.derivation == DERIVATION_NONE)
{
my_coll_agg_error((*a)->collation, (*b)->collation, owner->func_name());
return 1;