From 4d128777dde904c5f0adab9b093e854c9c580d41 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 6 Jun 2011 20:28:15 +0200 Subject: revert a suggested "optimization" that introduced a bug compilation error in mysys/my_getsystime.c fixed some redundant code removed sec_to_time, time_to_sec, from_unixtime, unix_timestamp, @@timestamp now use decimal, not double for numbers with a fractional part. purge_master_logs_before_date() fixed many bugs in corner cases fixed mysys/my_getsystime.c: compilation failure fixed sql/sql_parse.cc: don't cut corners. it backfires. --- sql/item_cmpfunc.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sql/item_cmpfunc.h') diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index d86ae7422c6..6ec070bcc57 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -950,7 +950,8 @@ public: virtual int cmp(Item *item)= 0; // for optimized IN with row virtual int compare(cmp_item *item)= 0; - static cmp_item* get_comparator(Item_result type, CHARSET_INFO *cs); + static cmp_item* get_comparator(Item_result type, Item * warn_item, + CHARSET_INFO *cs); virtual cmp_item *make_same()= 0; virtual void store_value_by_template(cmp_item *tmpl, Item *item) { @@ -1146,7 +1147,7 @@ class Item_func_case :public Item_func Item_result cmp_type; DTCollation cmp_collation; enum_field_types cached_field_type; - cmp_item *cmp_items[5]; /* For all result types */ + cmp_item *cmp_items[6]; /* For all result types */ cmp_item *case_item; public: Item_func_case(List &list, Item *first_expr_arg, Item *else_expr_arg) @@ -1236,7 +1237,7 @@ public: Item_int_func::cleanup(); delete array; array= 0; - for (i= 0; i <= (uint)DECIMAL_RESULT + 1; i++) + for (i= 0; i <= (uint)TIME_RESULT; i++) { delete cmp_items[i]; cmp_items[i]= 0; -- cgit v1.2.1