diff options
author | unknown <sergefp@mysql.com> | 2007-09-14 14:18:42 +0400 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2007-09-14 14:18:42 +0400 |
commit | 4aaabb06c011e20054613bff225823b3d66a135e (patch) | |
tree | aaea0275de6b908339bf300c554b155600561052 /sql/item_timefunc.h | |
parent | 9d016335711970ed17bc1380f71a6335af04b933 (diff) | |
download | mariadb-git-4aaabb06c011e20054613bff225823b3d66a135e.tar.gz |
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.
mysql-test/r/partition_pruning.result:
BUG#27927: Partition pruning not optimal with TO_DAYS and YEAR functions
- Testcase
mysql-test/t/partition_pruning.test:
BUG#27927: Partition pruning not optimal with TO_DAYS and YEAR functions
- Testcase
sql/item.cc:
BUG#27927: Partition pruning not optimal with TO_DAYS and YEAR functions
- Added Item_field::val_int_endpoint() implementation
sql/item.h:
BUG#27927: Partition pruning not optimal with TO_DAYS and YEAR functions
- Added Item::val_int_endpoint() which converts intervals from argument
space to function value space for unary monotonic functions.
sql/item_timefunc.cc:
BUG#27927: Partition pruning not optimal with TO_DAYS and YEAR functions
- Added val_int_endpoint() for TO_DAYS and YEAR functions.
sql/item_timefunc.h:
BUG#27927: Partition pruning not optimal with TO_DAYS and YEAR functions
- Added val_int_endpoint() for TO_DAYS and YEAR functions.
sql/partition_info.h:
BUG#27927: Partition pruning not optimal with TO_DAYS and YEAR functions
- Removed partition_info::range_analysis_include_bounds as it is no longer
needed.
sql/sql_partition.cc:
BUG#27927: Partition pruning not optimal with TO_DAYS and YEAR functions
- Make partition interval analyzer use part_expr->val_int_endpoint() to
check if the edge values should be included.
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r-- | sql/item_timefunc.h | 2 |
1 files changed, 2 insertions, 0 deletions
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; |