• Aditya A's avatar
    Bug#15843818 PARTITIONING BY RANGE WITH TO_DAYS ALWAYS · c81e7bb6
    Aditya A authored
                   INCLUDES FIRST PARTITION WHEN PRUNING
    
    
    PROBLEM
    -------
    
    TO_DAYS()/TO_SECONDS() can return NULL for invalid dates which 
    was stored in the first partition ,therefore the first partition 
    was always included for the scan when range was specified.
    
    
    FIX
    ---
    
    The fix is a small optimization which we have included ,which will
    prune the scanning of NULL/first partition if the dates specified 
    in the range are valid and in the same year and month . TO_SECONDS()
    function is not supported in 5.1 so removed it from the fix and test
    scripts for mysql-5.1 version.
    
    c81e7bb6
sql_partition.cc 243 KB