diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index 23417b16698..53e021063d2 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -750,13 +750,19 @@ CAST(CAST('20:05:05' AS TIME) as date) set sql_mode= TRADITIONAL; select cast("2101-00-01 02:03:04" as datetime); cast("2101-00-01 02:03:04" as datetime) -2101-00-01 02:03:04 +NULL +Warnings: +Warning 1292 Incorrect datetime value: '2101-00-01 02:03:04' select cast(cast("2101-00-01 02:03:04" as datetime) as time); cast(cast("2101-00-01 02:03:04" as datetime) as time) -02:03:04 +NULL +Warnings: +Warning 1292 Incorrect datetime value: '2101-00-01 02:03:04' SELECT CAST(CAST('20:05:05' AS TIME) as date); CAST(CAST('20:05:05' AS TIME) as date) -0000-00-00 +NULL +Warnings: +Warning 1292 Truncated incorrect date value: '0000-00-00' set sql_mode=DEFAULT; create table t1 (f1 time, f2 date, f3 datetime); insert into t1 values ('11:22:33','2011-12-13','2011-12-13 11:22:33'); diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 378b20829f3..4c8b0dc222b 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -4175,10 +4175,14 @@ str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00' set SQL_MODE=TRADITIONAL; select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'; str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34' -1 +0 +Warnings: +Warning 1292 Incorrect datetime value: '2007-10-00 12:34' select str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'; str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34' 0 +Warnings: +Warning 1292 Incorrect datetime value: '2007-10-00 12:34' select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34'; str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34' 0 diff --git a/mysql-test/r/select_jcl6.result b/mysql-test/r/select_jcl6.result index b5c6f89b87b..4c8c9f21897 100644 --- a/mysql-test/r/select_jcl6.result +++ b/mysql-test/r/select_jcl6.result @@ -4186,10 +4186,14 @@ str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00' set SQL_MODE=TRADITIONAL; select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'; str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34' -1 +0 +Warnings: +Warning 1292 Incorrect datetime value: '2007-10-00 12:34' select str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'; str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34' 0 +Warnings: +Warning 1292 Incorrect datetime value: '2007-10-00 12:34' select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34'; str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34' 0