From b75c003372d6f35b230d0bd9af3cd4a1d8227bde Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Fri, 18 Sep 2015 23:03:35 +0400 Subject: MDEV-8816 Equal field propagation is not applied for WHERE varbinary_column>=_utf8'a' COLLATE utf8_general_ci AND varbinary_column='A'; 1. Removing the legacy code that disabled equal field propagation in cases when comparison is done as VARBINARY. This is now correctly handled by the new propagation code in Item_xxx::propagate_equal_fields() and Field_str::can_be_substituted_to_equal_item (the bug fix). 2. Also, removing legacy (pre-MySQL-4.1) Arg_comparator methods compare_binary_string() and compare_e_binary_string(), as VARBINARY comparison is correcty handled in compare_string() and compare_e_string() by the corresponding VARBINARY collation handler implemented in my_charset_bin. (not really a part of the bug fix) --- sql/item.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'sql/item.h') diff --git a/sql/item.h b/sql/item.h index f727c33326b..45f19b860be 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1520,7 +1520,6 @@ public: return trace_unsupported_by_check_vcol_func_processor(full_name()); } - virtual bool set_no_const_sub(uchar *arg) { return FALSE; } /* arg points to REPLACE_EQUAL_FIELD_ARG object */ virtual Item *replace_equal_field(THD *thd, uchar *arg) { return this; } /* @@ -2333,7 +2332,6 @@ protected: public: Field *field; Item_equal *item_equal; - bool no_const_subst; /* if any_privileges set to TRUE then here real effective privileges will be stored @@ -2465,7 +2463,6 @@ public: void set_item_equal(Item_equal *item_eq) { item_equal= item_eq; } Item_equal *find_item_equal(COND_EQUAL *cond_equal); Item* propagate_equal_fields(THD *, const Context &, COND_EQUAL *); - bool set_no_const_sub(uchar *arg); Item *replace_equal_field(THD *thd, uchar *arg); inline uint32 max_disp_length() { return field->max_display_length(); } Item_field *field_for_view_update() { return this; } -- cgit v1.2.1