summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2003-12-21 02:07:45 +0200
committerunknown <monty@mysql.com>2003-12-21 02:07:45 +0200
commit4f72061f4095e5c9b5823f998b58302eef19382a (patch)
treeb4b50b6b03398c2d68a97d79f6b2d07eb470327e /sql/item_timefunc.cc
parente622f6fb0bdf48c7fff4d0819a276f0f6418e0ab (diff)
downloadmariadb-git-4f72061f4095e5c9b5823f998b58302eef19382a.tar.gz
Update for VC++
(Fixed project files, compiler warnings etc..) BitKeeper/etc/ignore: added mysql_priv.h VC++Files/libmysqld/libmysqld.dsp: Update for VC++to VC++Files/sql/mysqld.dsp: Update for VC++ client/mysqlbinlog.cc: Remove not used variable sql-common/client.c: Fix for compilation with VC++ sql/filesort.cc: Remove not used variable sql/item_timefunc.cc: Fixed compiler warnings sql/log_event.cc: Fixed compiler warnings - One can't portable allocate an stack-array dynamicly - Changed sql_mode to ulong to match THD.variables.sql_mode (If they are not the same we get a lot of compiler warnings) sql/log_event.h: Changed sql_mode to ulong to match THD.variables.sql_mode (If they are not the same we get a lot of compiler warnings) sql/sp.cc: sql_mode to ulong Don't use strcpy Replaced sprintf() with strmov sql/sp_cache.cc: Fixed compiler warning sql/sp_head.cc: Removed not used variable sql/sp_rcontext.cc: Removed not used variable sql/sp_rcontext.h: Fixed compiler warning sql/sql_class.cc: Portability fix sql/sql_delete.cc: Fixed compiler warning sql/sql_insert.cc: Fixed compiler warning sql/sql_update.cc: Fixed compiler warning
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 7d28cd10b81..cccea6bcdb5 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2226,7 +2226,6 @@ String *Item_func_timediff::val_str(String *str)
{
longlong seconds;
long microseconds;
- long days;
int l_sign= 1;
TIME l_time1 ,l_time2, l_time3;
@@ -2336,9 +2335,9 @@ longlong Item_func_timestamp_diff::val_int()
int_type == INTERVAL_QUARTER ||
int_type == INTERVAL_MONTH)
{
- uint year, year_tmp;
+ uint year;
uint year_beg, year_end, month_beg, month_end;
- uint diff_days= seconds/86400L;
+ uint diff_days= (uint) (seconds/86400L);
uint diff_months= 0;
uint diff_years= 0;
if (neg == -1)