• unknown's avatar
    Fix for bug #23412: delete rows with null date field · d2c90fcb
    unknown authored
    Backport of the fix for bug #8143: A date with value 0 is treated as a NULL value
    
    
    mysql-test/r/delete.result:
      Fix for bug #23412: delete rows with null date field
        - test result
    mysql-test/t/delete.test:
      Fix for bug #23412: delete rows with null date field
        - test case
    sql/sql_delete.cc:
      Fix for bug #23412: delete rows with null date field
        - during SELECT queries processing we convert 'date[time]_field is null'                   
          conditions into 'date[time]_field = 0000-00-00[ 00:00:00]' for not null                  
          DATE and DATETIME fields. To be consistent, we have to do the same for DELETE            
          queries. So we should call remove_eq_conds() in the mysql_delete() as well.              
          Also it may simplify and speed up DELETE queries execution.
    d2c90fcb
sql_delete.cc 20 KB