summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorbar@mysql.com <>2005-08-04 15:25:03 +0500
committerbar@mysql.com <>2005-08-04 15:25:03 +0500
commit1b40adcb064b96064bc71d975f054579b41fa378 (patch)
tree4f5621330b6475f621be708c12d20328161f6a37 /sql
parentfc5829d65165019cc6b27814810d85b2e3081975 (diff)
downloadmariadb-git-1b40adcb064b96064bc71d975f054579b41fa378.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.
Diffstat (limited to 'sql')
-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);
}