diff options
author | unknown <dlenev@brandersnatch.localdomain> | 2004-12-30 23:44:42 +0300 |
---|---|---|
committer | unknown <dlenev@brandersnatch.localdomain> | 2004-12-30 23:44:42 +0300 |
commit | fd9008c6638f2f5ec724528b8d28abc480f3639f (patch) | |
tree | 034cd41311f5191200ab752ee86ddd489d204b26 /sql-common | |
parent | dc09d7f3626241fe34ed0dffa659bb4630ca4bf8 (diff) | |
download | mariadb-git-fd9008c6638f2f5ec724528b8d28abc480f3639f.tar.gz |
Merged fixes for bug #7297 "Two digit year should be interpreted
correctly even with zero month and day" and bug #7515 "from_unixtime(0)
now returns NULL instead of the Epoch" into 4.1 tree.
mysql-test/r/ps_2myisam.result:
Updated test result after merging fix for bug #7297 "Two digit year should
be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_3innodb.result:
Updated test result after merging fix for bug #7297 "Two digit year should
be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_4heap.result:
Updated test result after merging fix for bug #7297 "Two digit year should
be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_5merge.result:
Updated test result after merging fix for bug #7297 "Two digit year should
be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_6bdb.result:
Updated test result after merging fix for bug #7297 "Two digit year should
be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_7ndb.result:
Updated test result after merging fix for bug #7297 "Two digit year should
be interpreted correctly even with zero month and day" into 4.1
sql-common/my_time.c:
Merged fix for bug #7297 "Two digit year should be interpreted correctly
even with zero month and day" into 4.1
sql/item_timefunc.cc:
Small fix after merging patch solving bug #7515 "from_unixtime(0) now
returns NULL instead of the Epoch" into 4.1.
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/my_time.c | 3 |
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 || |