Fix for bug #19370: DateTime datatype in MySQL has two bugs in it
mysql-test/r/date_formats.result: Fix for bug #19370: DateTime datatype in MySQL has two bugs in it - results adjusted mysql-test/r/strict.result: Fix for bug #19370: DateTime datatype in MySQL has two bugs in it - results adjusted mysql-test/r/type_datetime.result: Fix for bug #19370: DateTime datatype in MySQL has two bugs in it - results adjusted mysql-test/t/strict.test: Fix for bug #19370: DateTime datatype in MySQL has two bugs in it - tests adjusted sql-common/my_time.c: Fix for bug #19370: DateTime datatype in MySQL has two bugs in it - Regardless of the title of the bug the only real bug is that it doesn't make sense to have only some invalid parts in a date. E.g. a valid day among invalid years or months is totally ambiguous and we should refuse to guess what it means. To fix it, we add a check that both the year is zero and either day or month are zero (year and (day or month)), and if they are then we reject such dates. Doing so should adequately fix the reported problem.
Showing
Please register or sign in to comment