diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-03-07 23:19:26 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-03-07 23:19:26 +0100 |
commit | b27b5793a0d812cb2be535eadd280134efab22a5 (patch) | |
tree | 451da73aac3b73d20ae839a258faf3e5a8245eaa /sql-common | |
parent | 30e5b4d7196eb56ef3032f016823ecaae2207680 (diff) | |
download | mariadb-git-b27b5793a0d812cb2be535eadd280134efab22a5.tar.gz |
followup for lp:730637
mysql-test/t/func_time.test:
fixed wrong test case
sql-common/my_time.c:
negative datetime is invalid.
fix check_date() to reflect that.
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/my_time.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql-common/my_time.c b/sql-common/my_time.c index ae1e4b7aa89..11dd60646ef 100644 --- a/sql-common/my_time.c +++ b/sql-common/my_time.c @@ -84,7 +84,7 @@ my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date, if (not_zero_date) { if ((((flags & TIME_NO_ZERO_IN_DATE) || !(flags & TIME_FUZZY_DATE)) && - (ltime->month == 0 || ltime->day == 0)) || + (ltime->month == 0 || ltime->day == 0)) || ltime->neg || (!(flags & TIME_INVALID_DATES) && ltime->month && ltime->day > days_in_month[ltime->month-1] && (ltime->month != 2 || calc_days_in_year(ltime->year) != 366 || |