diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2015-01-06 10:18:04 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2015-01-06 10:18:04 +0100 |
commit | afd373c11951f48f7f9dde9990e7be2c76456559 (patch) | |
tree | 9744ecf79636c1ffd9e59e1bf05d22b2f3649edf /storage/connect/value.h | |
parent | 8761f22a11e3ebe9563b93bb79cb65260b177873 (diff) | |
download | mariadb-git-afd373c11951f48f7f9dde9990e7be2c76456559.tar.gz |
- Set connection charset before calling mysql_real_connect for MYSQL
tables. This should fix bug MDEV-7343.
modified:
storage/connect/ha_connect.cc
storage/connect/myconn.cpp
storage/connect/myconn.h
storage/connect/reldef.cpp
storage/connect/reldef.h
storage/connect/table.cpp
storage/connect/tabmysql.cpp
storage/connect/xtable.h
- Prevent double column evaluation when CONNECT does filtering
modified:
storage/connect/connect.cc
- Export CreateFileMap and CloseMemMap (for OEM tables)
modified:
storage/connect/maputil.h
- Add the compute function to be used on VALUE types.
Preserve precision for DOUBLE values.
modified:
storage/connect/value.cpp
storage/connect/value.h
- Typo (in preparation to the future JSON table type)
modified:
storage/connect/ha_connect.cc
storage/connect/mycat.cc
storage/connect/plgdbsem.h
Diffstat (limited to 'storage/connect/value.h')
-rw-r--r-- | storage/connect/value.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/storage/connect/value.h b/storage/connect/value.h index 3ce7027aeeb..c2cc24894ae 100644 --- a/storage/connect/value.h +++ b/storage/connect/value.h @@ -29,12 +29,9 @@ enum CONV {CNV_ANY = 0, /* Convert to any type */ class CONSTANT; // For friend setting typedef struct _datpar *PDTP; // For DTVAL - /***********************************************************************/ /* Utilities used to test types and to allocated values. */ /***********************************************************************/ -PVAL AllocateValue(PGLOBAL, void *, short); - // Exported functions DllExport PSZ GetTypeName(int); DllExport int GetTypeSize(int, int); @@ -47,6 +44,7 @@ DllExport int GetFormatType(char); DllExport bool IsTypeChar(int type); DllExport bool IsTypeNum(int type); DllExport int ConvertType(int, int, CONV, bool match = false); +DllExport PVAL AllocateValue(PGLOBAL, void *, short, short = 2); DllExport PVAL AllocateValue(PGLOBAL, PVAL, int = TYPE_VOID, int = 0); DllExport PVAL AllocateValue(PGLOBAL, int, int len = 0, int prec = 0, bool uns = false, PSZ fmt = NULL); @@ -114,6 +112,7 @@ class DllExport VALUE : public BLOCK { virtual char *ShowValue(char *buf, int len = 0) = 0; virtual char *GetCharString(char *p) = 0; virtual bool IsEqual(PVAL vp, bool chktype) = 0; + virtual bool Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op); virtual bool FormatValue(PVAL vp, char *fmt) = 0; protected: @@ -149,9 +148,9 @@ class DllExport TYPVAL : public VALUE { virtual bool IsZero(void) {return Tval == 0;} virtual void Reset(void) {Tval = 0;} virtual int GetValLen(void); - virtual int GetValPrec() {return 0;} + virtual int GetValPrec() {return Prec;} virtual int GetSize(void) {return sizeof(TYPE);} - virtual PSZ GetCharValue(void) {return VALUE::GetCharValue();} +//virtual PSZ GetCharValue(void) {return VALUE::GetCharValue();} virtual char GetTinyValue(void) {return (char)Tval;} virtual uchar GetUTinyValue(void) {return (uchar)Tval;} virtual short GetShortValue(void) {return (short)Tval;} @@ -184,12 +183,18 @@ class DllExport TYPVAL : public VALUE { virtual char *ShowValue(char *buf, int); virtual char *GetCharString(char *p); virtual bool IsEqual(PVAL vp, bool chktype); + virtual bool Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op); virtual bool SetConstFormat(PGLOBAL, FORMAT&); virtual bool FormatValue(PVAL vp, char *fmt); virtual void Print(PGLOBAL g, FILE *, uint); virtual void Print(PGLOBAL g, char *, uint); protected: +//static TYPE MinMaxVal(bool b); +// TYPE SafeAdd(TYPE n1, TYPE n2); +// TYPE SafeMult(TYPE n1, TYPE n2); + bool Compall(PGLOBAL g, PVAL *vp, int np, OPVAL op); + // Default constructor not to be used TYPVAL(void) : VALUE(TYPE_ERROR) {} @@ -253,6 +258,7 @@ class DllExport TYPVAL<PSZ>: public VALUE { virtual char *ShowValue(char *buf, int); virtual char *GetCharString(char *p); virtual bool IsEqual(PVAL vp, bool chktype); + virtual bool Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op); virtual bool FormatValue(PVAL vp, char *fmt); virtual bool SetConstFormat(PGLOBAL, FORMAT&); |