From b6823b66922c8ea7325541a8c7c132e9027fa412 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Jul 2005 14:17:06 +0400 Subject: [PATCH] Fix warnings/compilation failures reported by Jan Lindstrom sql/field.cc: Fix warnings/compilation failures. --- sql/field.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sql/field.cc b/sql/field.cc index a9b22a2fca9..2d7cc4b6b35 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -5184,20 +5184,20 @@ int Field_date::store(const char *from, uint len,CHARSET_INFO *cs) int Field_date::store(double nr) { - long tmp; + longlong tmp; int error= 0; if (nr >= 19000000000000.0 && nr <= 99991231235959.0) nr=floor(nr/1000000.0); // Timestamp to date if (nr < 0.0 || nr > 99991231.0) { - tmp=0L; + tmp= LL(0); set_datetime_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, nr, MYSQL_TIMESTAMP_DATE); error= 1; } else - tmp=(long) rint(nr); + tmp= (longlong) rint(nr); return Field_date::store(tmp); } @@ -6908,8 +6908,8 @@ String *Field_blob::val_str(String *val_buffer __attribute__((unused)), my_decimal *Field_blob::val_decimal(my_decimal *decimal_value) { - char *blob; - memcpy_fixed(&blob, ptr+packlength, sizeof(char*)); + const char *blob; + memcpy_fixed(&blob, ptr+packlength, sizeof(const char*)); if (!blob) blob= ""; str2my_decimal(E_DEC_FATAL_ERROR, blob, get_length(ptr), charset(),