Loading mysql-test/r/func_time.result +3 −0 Original line number Diff line number Diff line Loading @@ -1180,6 +1180,9 @@ id day id day 3 2005-07-01 3 2005-07-15 DROP TABLE t1,t2; set time_zone= @@global.time_zone; select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE; str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE NULL End of 5.0 tests select date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND); date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND) Loading mysql-test/t/func_time.test +6 −0 Original line number Diff line number Diff line Loading @@ -686,6 +686,12 @@ DROP TABLE t1,t2; # Restore timezone to default set time_zone= @@global.time_zone; # # Bug #22229: bug in DATE_ADD() # select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE; --echo End of 5.0 tests # Loading sql/item_timefunc.cc +3 −1 Original line number Diff line number Diff line Loading @@ -3208,7 +3208,9 @@ bool Item_func_str_to_date::get_date(TIME *ltime, uint fuzzy_date) date_time_format.format.str= (char*) format->ptr(); date_time_format.format.length= format->length(); if (extract_date_time(&date_time_format, val->ptr(), val->length(), ltime, cached_timestamp_type, 0, "datetime")) ltime, cached_timestamp_type, 0, "datetime") || ((fuzzy_date & TIME_NO_ZERO_DATE) && (ltime->year == 0 || ltime->month == 0 || ltime->day == 0))) goto null_date; if (cached_timestamp_type == MYSQL_TIMESTAMP_TIME && ltime->day) { Loading Loading
mysql-test/r/func_time.result +3 −0 Original line number Diff line number Diff line Loading @@ -1180,6 +1180,9 @@ id day id day 3 2005-07-01 3 2005-07-15 DROP TABLE t1,t2; set time_zone= @@global.time_zone; select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE; str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE NULL End of 5.0 tests select date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND); date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND) Loading
mysql-test/t/func_time.test +6 −0 Original line number Diff line number Diff line Loading @@ -686,6 +686,12 @@ DROP TABLE t1,t2; # Restore timezone to default set time_zone= @@global.time_zone; # # Bug #22229: bug in DATE_ADD() # select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE; --echo End of 5.0 tests # Loading
sql/item_timefunc.cc +3 −1 Original line number Diff line number Diff line Loading @@ -3208,7 +3208,9 @@ bool Item_func_str_to_date::get_date(TIME *ltime, uint fuzzy_date) date_time_format.format.str= (char*) format->ptr(); date_time_format.format.length= format->length(); if (extract_date_time(&date_time_format, val->ptr(), val->length(), ltime, cached_timestamp_type, 0, "datetime")) ltime, cached_timestamp_type, 0, "datetime") || ((fuzzy_date & TIME_NO_ZERO_DATE) && (ltime->year == 0 || ltime->month == 0 || ltime->day == 0))) goto null_date; if (cached_timestamp_type == MYSQL_TIMESTAMP_TIME && ltime->day) { Loading