Skip to content
  • Catalin Besleaga's avatar
    8ddbbc2a
    Bug#29025656 UNEXPECTED BEHAVIOUR FOR DATE COMPARISON WITH CONSTANT STRINGS · 8ddbbc2a
    Catalin Besleaga authored
    When comparing DATEs with constant strings, MySQL first tries to convert
    the constant string to date and do the comparison as DATETIME. In case
    the conversion fails, MySQL will still execute the comparison but as
    string which is likely not what was intended in the first place.
    
    Fix is to always compare as DATETIME, and in case the constant string is
    invalid date, to return error.
    
    Change-Id: I0d1e35c4d7af1f8082760c6a93aab3861c23ab40
    8ddbbc2a
    Bug#29025656 UNEXPECTED BEHAVIOUR FOR DATE COMPARISON WITH CONSTANT STRINGS
    Catalin Besleaga authored
    When comparing DATEs with constant strings, MySQL first tries to convert
    the constant string to date and do the comparison as DATETIME. In case
    the conversion fails, MySQL will still execute the comparison but as
    string which is likely not what was intended in the first place.
    
    Fix is to always compare as DATETIME, and in case the constant string is
    invalid date, to return error.
    
    Change-Id: I0d1e35c4d7af1f8082760c6a93aab3861c23ab40
Loading