diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2013-03-11 16:52:59 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2013-03-11 16:52:59 +0100 |
commit | 17fb343a5cfa32c876e36989cb2b83ec3ab672e4 (patch) | |
tree | eecfe340fbcfddb9cd4353759e292ea852b8a73a /storage/connect/myutil.cpp | |
parent | ffc29ac31030c7a0bfec007440cb419b0f66dce9 (diff) | |
download | mariadb-git-17fb343a5cfa32c876e36989cb2b83ec3ab672e4.tar.gz |
- Add tiny integer as a supported type by CONNECT
modified:
storage/connect/global.h
storage/connect/ha_connect.cc
storage/connect/myutil.cpp
storage/connect/plgdbutl.cpp
storage/connect/tabdos.cpp
storage/connect/tabwmi.cpp
storage/connect/valblk.cpp
storage/connect/valblk.h
storage/connect/value.cpp
storage/connect/value.h
storage/connect/xobject.cpp
Diffstat (limited to 'storage/connect/myutil.cpp')
-rw-r--r-- | storage/connect/myutil.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/storage/connect/myutil.cpp b/storage/connect/myutil.cpp index 44a4ed8a165..0b97e8aa5a0 100644 --- a/storage/connect/myutil.cpp +++ b/storage/connect/myutil.cpp @@ -1,7 +1,7 @@ /************** MyUtil C++ Program Source Code File (.CPP) **************/ /* PROGRAM NAME: MYUTIL */ /* ------------- */ -/* Version 1.0 */ +/* Version 1.1 */ /* */ /* Author Olivier BERTRAND 2013 */ /* */ @@ -35,7 +35,7 @@ int MYSQLtoPLG(char *typname) if (!stricmp(typname, "int") || !stricmp(typname, "mediumint") || !stricmp(typname, "integer")) type = TYPE_INT; - else if (!stricmp(typname, "tinyint") || !stricmp(typname, "smallint")) + else if (!stricmp(typname, "smallint")) type = TYPE_SHORT; else if (!stricmp(typname, "char") || !stricmp(typname, "varchar") || !stricmp(typname, "text") || !stricmp(typname, "blob")) @@ -50,6 +50,8 @@ int MYSQLtoPLG(char *typname) type = TYPE_DATE; else if (!stricmp(typname, "bigint") || !stricmp(typname, "longlong")) type = TYPE_BIGINT; + else if (!stricmp(typname, "tinyint")) + type = TYPE_TINY; else type = TYPE_ERROR; @@ -82,6 +84,9 @@ enum enum_field_types PLGtoMYSQL(int type, bool dbf) case TYPE_BIGINT: mytype = MYSQL_TYPE_LONGLONG; break; + case TYPE_TINY: + mytype = MYSQL_TYPE_TINY; + break; default: mytype = MYSQL_TYPE_NULL; } // endswitch mytype @@ -97,7 +102,6 @@ int MYSQLtoPLG(int mytype) int type; switch (mytype) { - case MYSQL_TYPE_TINY: case MYSQL_TYPE_SHORT: type = TYPE_SHORT; break; @@ -109,6 +113,9 @@ int MYSQLtoPLG(int mytype) case MYSQL_TYPE_LONGLONG: type = TYPE_BIGINT; break; + case MYSQL_TYPE_TINY: + type = TYPE_TINY; + break; case MYSQL_TYPE_DECIMAL: #if !defined(ALPHA) case MYSQL_TYPE_NEWDECIMAL: |