summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2005-08-04 15:25:03 +0500
committerunknown <bar@mysql.com>2005-08-04 15:25:03 +0500
commit9e3562d77326dd81103428a243869c84f84551b3 (patch)
tree4f5621330b6475f621be708c12d20328161f6a37 /sql/item.cc
parent357ebcc284c9d5c5e18c6badc419001831a108db (diff)
downloadmariadb-git-9e3562d77326dd81103428a243869c84f84551b3.tar.gz
grant.result, grant.test:
fixing tests accordingly item.cc: Bug #10892 user variables not auto cast for comparisons When mixing strings with different character sets, and coercibility is the same, we allow conversion if one character set is superset for other character set. sql/item.cc: Bug #10892 user variables not auto cast for comparisons When mixing strings with different character sets, and coercibility is the same, we allow conversion if one character set is superset for other character set. mysql-test/t/grant.test: fixing tests accordingly mysql-test/r/grant.result: fixing tests accordingly
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 84dbc382a52..41cda365750 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -455,14 +455,16 @@ bool DTCollation::aggregate(DTCollation &dt, uint flags)
; // Do nothing
}
else if ((flags & MY_COLL_ALLOW_SUPERSET_CONV) &&
- derivation < dt.derivation &&
- collation->state & MY_CS_UNICODE)
+ derivation <= dt.derivation &&
+ collation->state & MY_CS_UNICODE &&
+ !(dt.collation->state & MY_CS_UNICODE))
{
// Do nothing
}
else if ((flags & MY_COLL_ALLOW_SUPERSET_CONV) &&
- dt.derivation < derivation &&
- dt.collation->state & MY_CS_UNICODE)
+ dt.derivation <= derivation &&
+ dt.collation->state & MY_CS_UNICODE &&
+ !(collation->state & MY_CS_UNICODE))
{
set(dt);
}