summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BitKeeper/etc/logging_ok1
-rw-r--r--scripts/Makefile.am2
-rw-r--r--sql/item_cmpfunc.cc62
3 files changed, 43 insertions, 22 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok
index 6d700cfd6c6..794edcdd968 100644
--- a/BitKeeper/etc/logging_ok
+++ b/BitKeeper/etc/logging_ok
@@ -17,6 +17,7 @@ bar@gw.udmsearch.izhnet.ru
bell@laptop.sanja.is.com.ua
bell@sanja.is.com.ua
bk@admin.bk
+bk@mysql.r18.ru
carsten@tsort.bitbybit.dk
davida@isil.mysql.com
gluh@gluh.(none)
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 6006222992e..ff35170dcf3 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -62,7 +62,7 @@ EXTRA_DIST = $(EXTRA_SCRIPTS) \
mysqlaccess.conf \
mysqlbug
-pkgdata_DATA = fill_help_tables.sql mysql_fix_privilege_tables.sql
+dist_pkgdata_DATA = fill_help_tables.sql mysql_fix_privilege_tables.sql
# mysqlbug should be distributed built so that people can report build
# failures with it.
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index d4997f78a9e..5c2b9ed4682 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -90,38 +90,58 @@ static bool convert_constant_item(Field *field, Item **item)
bool Item_bool_func2::set_cmp_charset(CHARSET_INFO *cs1, enum coercion co1,
CHARSET_INFO *cs2, enum coercion co2)
{
- if ((cs1 == &my_charset_bin) || (cs2 == &my_charset_bin))
+ if (cs1 == &my_charset_bin || cs2 == &my_charset_bin)
{
cmp_charset= &my_charset_bin;
+ coercibility= co1 > co2 ? co1 : co2;
return 0;
}
- if ((co1 == COER_NOCOLL) || (co2 == COER_NOCOLL))
- return 1;
-
- if (!my_charset_same(cs1,cs2))
- return 1;
-
- if (co1 < co2)
+ if (!my_charset_same(cs1, cs2))
+ {
+ /*
+ We do allow to use BLOBS together with character strings
+ BLOBS have more precedance
+ */
+ if ((co1 <= co2) && (cs1==&my_charset_bin))
+ {
+ cmp_charset= cs1;
+ coercibility= co1;
+ }
+ else if ((co2 <= co1) && (cs2==&my_charset_bin))
+ {
+ cmp_charset= cs2;
+ coercibility= co2;
+ }
+ else
+ {
+ cmp_charset= 0;
+ coercibility= COER_NOCOLL;
+ return 1;
+ }
+ }
+ else if (co1 < co2)
+ {
cmp_charset= cs1;
+ coercibility= co1;
+ }
else if (co2 < co1)
- cmp_charset= cs2;
- else // co1==co2
{
+ cmp_charset= cs2;
+ coercibility= co1;
+ }
+ else
+ {
if (cs1 == cs2)
+ {
cmp_charset= cs1;
- else
+ coercibility= co1;
+ }
+ else
{
- if (co1 == COER_COERCIBLE)
- {
- CHARSET_INFO *c;
- if ((c= get_charset_by_csname(cs1->csname, MY_CS_PRIMARY, MYF(0))))
- {
- cmp_charset= c;
- return 0;
- }
- }
- return 1;
+ coercibility= COER_NOCOLL;
+ cmp_charset= 0;
+ return (co1 == COER_EXPLICIT) ? 1 : 0;
}
}
return 0;