From 41404ec52ed8a3132df2402ce06e0a017a48bf99 Mon Sep 17 00:00:00 2001 From: "sergefp@mysql.com" <> Date: Fri, 14 Sep 2007 14:18:42 +0400 Subject: BUG#27927:Partition pruning not optimal with TO_DAYS and YEAR functions - Introduced val_int_endpoint() function which converts between func argument intervals and func value intervals for monotonic functions. - Made partition interval analyzer use part_expr->val_int_endpoint() to check if the edge values should be included. --- sql/item_timefunc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql/item_timefunc.h') diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index 32f5bcf8e52..36556269d07 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -68,6 +68,7 @@ public: maybe_null=1; } enum_monotonicity_info get_monotonicity_info() const; + longlong val_int_endpoint(bool left_endp, bool *incl_endp); bool check_partition_func_processor(uchar *int_arg) {return FALSE;} }; @@ -248,6 +249,7 @@ public: longlong val_int(); const char *func_name() const { return "year"; } enum_monotonicity_info get_monotonicity_info() const; + longlong val_int_endpoint(bool left_endp, bool *incl_endp); void fix_length_and_dec() { decimals=0; -- cgit v1.2.1