summaryrefslogtreecommitdiff
path: root/storage/connect/value.h
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2013-01-29 23:40:34 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2013-01-29 23:40:34 +0100
commit26b00be33256f7679d31219903d4a511643c94a8 (patch)
tree38095f602a8e97d091d1b75a910a8a3cfc5216bf /storage/connect/value.h
parenta9d06e106629bebff98a2cc1b4f8a274aa15e5f5 (diff)
downloadmariadb-git-26b00be33256f7679d31219903d4a511643c94a8.tar.gz
Fix problems with ODBC raised by Adding the type TYPE_BIGINT (longlong).
Diffstat (limited to 'storage/connect/value.h')
-rw-r--r--storage/connect/value.h8
1 files changed, 4 insertions, 4 deletions
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;}