diff options
author | unknown <ingo@chilla.local> | 2006-07-06 15:38:47 +0200 |
---|---|---|
committer | unknown <ingo@chilla.local> | 2006-07-06 15:38:47 +0200 |
commit | 9532056d1351f0377db90738363f5b4bff176588 (patch) | |
tree | 1efd4d6be4cd94b4d675fcaf788d5c44f897a53b /sql/time.cc | |
parent | 4ceb9bb0901432d675003d8e306c020a54f880be (diff) | |
download | mariadb-git-9532056d1351f0377db90738363f5b4bff176588.tar.gz |
After merge fixes.
mysql-test/r/archive.result:
After merge fix. It might come from the fix for
bug 1662 (ALTER TABLE LIKE ignores DATA/INDEX DIRECTPORY)
sql/time.cc:
After merge fix. Auto resolve failed because this piece
of code was moved from another file to here.
Diffstat (limited to 'sql/time.cc')
-rw-r--r-- | sql/time.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/time.cc b/sql/time.cc index ae776a32aab..0461f7723c6 100644 --- a/sql/time.cc +++ b/sql/time.cc @@ -749,6 +749,7 @@ void make_truncated_value_warning(THD *thd, const char *str_val, ER_TRUNCATED_WRONG_VALUE, warn_buff); } +/* Daynumber from year 0 to 9999-12-31 */ #define MAX_DAY_NUMBER 3652424L bool date_add_interval(TIME *ltime, interval_type int_type, INTERVAL interval) @@ -804,7 +805,7 @@ bool date_add_interval(TIME *ltime, interval_type int_type, INTERVAL interval) ltime->hour= (uint) (sec/3600); daynr= calc_daynr(ltime->year,ltime->month,1) + days; /* Day number from year 0 to 9999-12-31 */ - if ((ulonglong) daynr >= MAX_DAY_NUMBER) + if ((ulonglong) daynr > MAX_DAY_NUMBER) goto invalid_date; get_date_from_daynr((long) daynr, <ime->year, <ime->month, <ime->day); @@ -815,7 +816,7 @@ bool date_add_interval(TIME *ltime, interval_type int_type, INTERVAL interval) period= (calc_daynr(ltime->year,ltime->month,ltime->day) + sign * (long) interval.day); /* Daynumber from year 0 to 9999-12-31 */ - if ((ulong) period >= MAX_DAY_NUMBER) + if ((ulong) period > MAX_DAY_NUMBER) goto invalid_date; get_date_from_daynr((long) period,<ime->year,<ime->month,<ime->day); break; |