summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2004-11-10 14:07:11 +0400
committerunknown <bar@mysql.com>2004-11-10 14:07:11 +0400
commit4b3a345b0c0b0bc4c7e23ae3c6e1ec318dcd36d1 (patch)
tree878f073fc6d3479c644a324b45eab2f706901719 /sql
parent7d09ee39b00a34d798b1a4082cec3798cf12952b (diff)
parentc5e6941e75454a01953ff542ceda7e4aeb1c22ae (diff)
downloadmariadb-git-4b3a345b0c0b0bc4c7e23ae3c6e1ec318dcd36d1.tar.gz
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/bar/mysql-4.1
Diffstat (limited to 'sql')
-rw-r--r--sql/item.cc4
-rw-r--r--sql/item.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/sql/item.cc b/sql/item.cc
index b4e7322b7cc..0e7a2b50b51 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -376,13 +376,13 @@ bool DTCollation::aggregate(DTCollation &dt, uint flags)
}
else if ((flags & MY_COLL_ALLOW_COERCIBLE_CONV) &&
derivation < dt.derivation &&
- dt.derivation == DERIVATION_COERCIBLE)
+ dt.derivation >= DERIVATION_COERCIBLE)
{
// Do nothing;
}
else if ((flags & MY_COLL_ALLOW_COERCIBLE_CONV) &&
dt.derivation < derivation &&
- derivation == DERIVATION_COERCIBLE)
+ derivation >= DERIVATION_COERCIBLE)
{
set(dt);
strong= nagg;
diff --git a/sql/item.h b/sql/item.h
index fea3aa010a8..547577a7ee0 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -31,6 +31,7 @@ void item_init(void); /* Init item functions */
enum Derivation
{
+ DERIVATION_IGNORABLE= 4,
DERIVATION_COERCIBLE= 3,
DERIVATION_IMPLICIT= 2,
DERIVATION_NONE= 1,
@@ -98,6 +99,7 @@ public:
{
switch(derivation)
{
+ case DERIVATION_IGNORABLE: return "IGNORABLE";
case DERIVATION_COERCIBLE: return "COERCIBLE";
case DERIVATION_IMPLICIT: return "IMPLICIT";
case DERIVATION_EXPLICIT: return "EXPLICIT";
@@ -440,6 +442,7 @@ public:
max_length= 0;
name= name_par ? name_par : (char*) "NULL";
fixed= 1;
+ collation.set(&my_charset_bin, DERIVATION_IGNORABLE);
}
enum Type type() const { return NULL_ITEM; }
bool eq(const Item *item, bool binary_cmp) const;