Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5.4
-
None
-
None
Description
Date comparisons involving null values are not working properly even in strict mode, or when NO_ZERO_DATE is defined.
testing> SET SESSION sql_mode = 'STRICT_ALL_TABLES';
testing> SELECT CAST('2031-33-99' as date), CAST('2021-05-25' as date), CAST('2031-33-99' as date) < CAST('2021-05-25' as date), CAST(null as date) < CAST('2021-05-25' as date), null < CAST('2021-05-25' as date)\G
**************************[ 1. row ]**************************
CAST('2031-33-99' as date) | <null>
CAST('2021-05-25' as date) | 2021-05-25
CAST('2031-33-99' as date) < CAST('2021-05-25' as date) | 1
CAST(null as date) < CAST('2021-05-25' as date) | <null>
null < CAST('2021-05-25' as date) | <null>