From 7a6059cc88403a8d7ba25f3fdd2b0f0d7dd34235 Mon Sep 17 00:00:00 2001 From: "lenz@kallisto.local" <> Date: Fri, 20 Jun 2003 13:57:51 +0200 Subject: [PATCH 1/3] - make sure that scripts/*.sql files are being added to the source distribution as well --- scripts/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. From f78a77798c29c8f83d28b5e35bf2146a20cfcb6d Mon Sep 17 00:00:00 2001 From: "bar@bar.mysql.r18.ru" <> Date: Fri, 20 Jun 2003 18:45:28 +0500 Subject: [PATCH 2/3] item_cmpfunc.cc: Rewritten in nicer way , --- sql/item_cmpfunc.cc | 69 +++++++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 28 deletions(-) diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index d4997f78a9e..e67c742928e 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -90,38 +90,51 @@ 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 (!my_charset_same(cs1, cs2)) { - cmp_charset= &my_charset_bin; - return 0; - } - - if ((co1 == COER_NOCOLL) || (co2 == COER_NOCOLL)) - return 1; - - if (!my_charset_same(cs1,cs2)) - return 1; - - if (co1 < co2) - cmp_charset= cs1; - else if (co2 < co1) - cmp_charset= cs2; - else // co1==co2 - { - if (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 { - 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; + cmp_charset= 0; + coercibility= COER_NOCOLL; + return 1; + } + } + else if (co1 < co2) + { + cmp_charset= cs1; + coercibility= co1; + } + else if (co2 < co1) + { + cmp_charset= cs2; + coercibility= co1; + } + else + { + if (cs1 == cs2) + { + cmp_charset= cs1; + coercibility= co1; + } + else + { + coercibility= COER_NOCOLL; + cmp_charset= 0; + return (co1 == COER_EXPLICIT) ? 1 : 0; } } return 0; From 4c7714b7f98a072a20655f029753c648362ac43c Mon Sep 17 00:00:00 2001 From: "bar@bar.mysql.r18.ru" <> Date: Fri, 20 Jun 2003 19:05:45 +0500 Subject: [PATCH 3/3] item_cmpfunc.cc: Temporarily fix for test failure ,. --- sql/item_cmpfunc.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index e67c742928e..5c2b9ed4682 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -90,6 +90,13 @@ 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) + { + cmp_charset= &my_charset_bin; + coercibility= co1 > co2 ? co1 : co2; + return 0; + } + if (!my_charset_same(cs1, cs2)) { /*