summaryrefslogtreecommitdiff
path: root/storage/connect
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2013-02-12 18:39:29 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2013-02-12 18:39:29 +0100
commit83b7fb0f47d48a90dff7ba148b7a47653652763b (patch)
tree416ec79512be3c44c52887a557d85466537ce76a /storage/connect
parent88c76f3b70def1a26f15c7ea23759369ba28392d (diff)
downloadmariadb-git-83b7fb0f47d48a90dff7ba148b7a47653652763b.tar.gz
Fix a bug causing all tests to fail.
In mycat.cc line 308 + correc typo in plgdbsem Modified: mycat.cc plgdbsem.h
Diffstat (limited to 'storage/connect')
-rw-r--r--storage/connect/ha_connect.cc7
-rw-r--r--storage/connect/mycat.cc2
-rw-r--r--storage/connect/plgdbsem.h12
3 files changed, 13 insertions, 8 deletions
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index 9493c7cc12e..c0fc26ad942 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -3543,6 +3543,7 @@ int ha_connect::create(const char *name, TABLE *table_arg,
bool dbf;
Field* *field;
Field *fp;
+ TABTYPE ttp;
TABLE *st= table; // Probably unuseful
PIXDEF xdp, pxd= NULL, toidx= NULL;
PGLOBAL g= GetPlug(table_arg->in_use);
@@ -3559,7 +3560,11 @@ int ha_connect::create(const char *name, TABLE *table_arg,
} // endif g
// Check column types
- dbf= (options->type && !stricmp(options->type, "DBF"));
+ ttp= GetTypeID(options->type);
+
+ if (ttp == TAB_UNDEF || ttp == TAB_NIY) ;
+
+ dbf= ttp == TAB_DBF;
for (field= table_arg->field; *field; field++) {
fp= *field;
diff --git a/storage/connect/mycat.cc b/storage/connect/mycat.cc
index 48a26428426..9146cbec48d 100644
--- a/storage/connect/mycat.cc
+++ b/storage/connect/mycat.cc
@@ -305,7 +305,7 @@ int MYCAT::GetColCatInfo(PGLOBAL g, PTABDEF defp)
PCOLINFO pcf= (PCOLINFO)PlugSubAlloc(g, NULL, sizeof(COLINFO));
// Get a unique char identifier for type
- tc= (!defp->Catfunc) ? GetTypeID(type) : TAB_CATLG;
+ tc= (defp->Catfunc == FNC_NO) ? GetTypeID(type) : TAB_CATLG;
// Take care of the column definitions
i= poff= nof= nlg= 0;
diff --git a/storage/connect/plgdbsem.h b/storage/connect/plgdbsem.h
index ff0a5bc7497..0aa7f796639 100644
--- a/storage/connect/plgdbsem.h
+++ b/storage/connect/plgdbsem.h
@@ -69,12 +69,12 @@ enum TABTYPE {TAB_UNDEF = 0, /* Table of undefined type */
TAB_WMI = 14, /* WMI tables (Windows only) */
TAB_TBL = 15, /* Collection of CONNECT tables */
TAB_OEM = 16, /* OEM implemented table */
- TAB_CATLG = 16, /* Catalog table */
- TAB_PLG = 17, /* PLG NIY */
- TAB_PIVOT = 18, /* PIVOT NIY */
- TAB_JCT = 19, /* Junction tables NIY */
- TAB_DMY = 20, /* DMY Dummy tables NIY */
- TAB_NIY = 21}; /* Table not implemented yet */
+ TAB_CATLG = 17, /* Catalog table */
+ TAB_PLG = 18, /* PLG NIY */
+ TAB_PIVOT = 19, /* PIVOT NIY */
+ TAB_JCT = 20, /* Junction tables NIY */
+ TAB_DMY = 21, /* DMY Dummy tables NIY */
+ TAB_NIY = 22}; /* Table not implemented yet */
enum AMT {TYPE_AM_ERROR = 0, /* Type not defined */
TYPE_AM_ROWID = 1, /* ROWID type (special column) */