From 26b00be33256f7679d31219903d4a511643c94a8 Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Tue, 29 Jan 2013 23:40:34 +0100 Subject: Fix problems with ODBC raised by Adding the type TYPE_BIGINT (longlong). --- storage/connect/value.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'storage/connect/value.h') diff --git a/storage/connect/value.h b/storage/connect/value.h index 32f5d5664b7..5e170c40c1b 100644 --- a/storage/connect/value.h +++ b/storage/connect/value.h @@ -169,7 +169,7 @@ class STRING : public VALUE { virtual PSZ GetCharValue(void) {return Strp;} virtual short GetShortValue(void) {return (short)atoi(Strp);} virtual int GetIntValue(void) {return atol(Strp);} - virtual longlong GetBigintValue(void) {return strtoll(Strp, NULL, 10);} + virtual longlong GetBigintValue(void) {return atoll(Strp);} virtual double GetFloatValue(void) {return atof(Strp);} virtual void *GetTo_Val(void) {return Strp;} @@ -449,8 +449,8 @@ class DllExport BIGVAL : public VALUE { // Implementation virtual bool IsTypeNum(void) {return true;} - virtual bool IsZero(void) {return Lval == 0;} - virtual void Reset(void) {Lval = 0;} + virtual bool IsZero(void) {return Lval == 0LL;} + virtual void Reset(void) {Lval = 0LL;} virtual int GetValLen(void); virtual int GetValPrec() {return 0;} virtual int GetSize(void) {return sizeof(longlong);} @@ -465,7 +465,7 @@ class DllExport BIGVAL : public VALUE { virtual bool SetValue_pval(PVAL valp, bool chktype); virtual void SetValue_char(char *p, int n); virtual void SetValue_psz(PSZ s); - virtual void SetValue_bool(bool b) {Lval = (b) ? 1 : 0;} + virtual void SetValue_bool(bool b) {Lval = (b) ? 1LL : 0LL;} virtual void SetValue(short i) {Lval = (longlong)i;} virtual void SetValue(int n) {Lval = (longlong)n;} virtual void SetValue(longlong n) {Lval = n;} -- cgit v1.2.1