• Mattias Jonsson's avatar
    Bug#20577: Partitions: use of to_days() function leads to selection failures · 401fb7c6
    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).
    401fb7c6
sql_partition.cc 238 KB