From 9532056d1351f0377db90738363f5b4bff176588 Mon Sep 17 00:00:00 2001 From: unknown <ingo@chilla.local> Date: Thu, 6 Jul 2006 15:38:47 +0200 Subject: [PATCH] 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. --- mysql-test/r/archive.result | 2 ++ sql/time.cc | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result index cacf4aaf30..1dfec8ff71 100644 --- a/mysql-test/r/archive.result +++ b/mysql-test/r/archive.result @@ -13812,6 +13812,8 @@ select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn'); i v 4 3r4f alter table t1 data directory="$MYSQLTEST_VARDIR/tmp"; +Warnings: +Warning 0 DATA DIRECTORY option ignored select * from t1; i v 1 def diff --git a/sql/time.cc b/sql/time.cc index ae776a32aa..0461f7723c 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; -- 2.30.9