summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
Diffstat (limited to 'sql-common')
-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 29935696b7d..8dd4801b562 100644
--- a/sql-common/my_time.c
+++ b/sql-common/my_time.c
@@ -339,8 +339,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 (number_of_fields < 3 ||