• Mattias Jonsson's avatar
    Bug#20577: Partitions: use of to_days() function leads to selection failures · 591141d9
    Mattias Jonsson authored
    Problem was that the partition containing NULL values
    was pruned away, since '2001-01-01' < '2001-02-00' but
    TO_DAYS('2001-02-00') is NULL.
    
    Added the NULL partition for RANGE/LIST partitioning on TO_DAYS()
    function to be scanned too.
    
    Also fixed a bug that added ALLOW_INVALID_DATES to sql_mode
    (SELECT * FROM t WHERE date_col < '1999-99-99' on a RANGE/LIST
    partitioned table would add it).
    
    mysql-test/include/partition_date_range.inc:
      Bug#20577: Partitions: use of to_days() function leads to selection failures
      
      Added include file to decrease test code duplication
    mysql-test/r/partition_pruning.result:
      Bug#20577: Partitions: use of to_days() function leads to selection failures
      
      Added test results
    mysql-test/r/partition_range.result:
      Bug#20577: Partitions: use of to_days() function leads to selection failures
      
      Updated test result.
      This fix adds the partition containing NULL values to
      the list of partitions to ...
    591141d9
item.h 100 KB