• unknown's avatar
    BUG#27927:Partition pruning not optimal with TO_DAYS and YEAR functions · 4aaabb06
    unknown authored
    - 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.
    4aaabb06
partition_info.h 10.5 KB