summaryrefslogtreecommitdiff
path: root/sql-common/my_time.c
diff options
context:
space:
mode:
Diffstat (limited to 'sql-common/my_time.c')
-rw-r--r--sql-common/my_time.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql-common/my_time.c b/sql-common/my_time.c
index 45adb657f73..c67ce1d3f85 100644
--- a/sql-common/my_time.c
+++ b/sql-common/my_time.c
@@ -382,8 +382,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
}
l_time->neg= 0;
- if (year_length == 2 && i >= format_position[1] && i >=format_position[2] &&
- (l_time->month || l_time->day))
+ if (year_length == 2 && not_zero_date)
l_time->year+= (l_time->year < YY_PART_YEAR ? 2000 : 1900);
if (!not_zero_date && (flags & TIME_NO_ZERO_DATE))