Commit 83b7fb0f authored by Olivier Bertrand's avatar Olivier Bertrand

Fix a bug causing all tests to fail.

In mycat.cc line 308
+ correc typo in plgdbsem

Modified:
mycat.cc
plgdbsem.h
parent 88c76f3b
...@@ -3543,6 +3543,7 @@ int ha_connect::create(const char *name, TABLE *table_arg, ...@@ -3543,6 +3543,7 @@ int ha_connect::create(const char *name, TABLE *table_arg,
bool dbf; bool dbf;
Field* *field; Field* *field;
Field *fp; Field *fp;
TABTYPE ttp;
TABLE *st= table; // Probably unuseful TABLE *st= table; // Probably unuseful
PIXDEF xdp, pxd= NULL, toidx= NULL; PIXDEF xdp, pxd= NULL, toidx= NULL;
PGLOBAL g= GetPlug(table_arg->in_use); PGLOBAL g= GetPlug(table_arg->in_use);
...@@ -3559,7 +3560,11 @@ int ha_connect::create(const char *name, TABLE *table_arg, ...@@ -3559,7 +3560,11 @@ int ha_connect::create(const char *name, TABLE *table_arg,
} // endif g } // endif g
// Check column types // 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++) { for (field= table_arg->field; *field; field++) {
fp= *field; fp= *field;
......
...@@ -305,7 +305,7 @@ int MYCAT::GetColCatInfo(PGLOBAL g, PTABDEF defp) ...@@ -305,7 +305,7 @@ int MYCAT::GetColCatInfo(PGLOBAL g, PTABDEF defp)
PCOLINFO pcf= (PCOLINFO)PlugSubAlloc(g, NULL, sizeof(COLINFO)); PCOLINFO pcf= (PCOLINFO)PlugSubAlloc(g, NULL, sizeof(COLINFO));
// Get a unique char identifier for type // 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 // Take care of the column definitions
i= poff= nof= nlg= 0; i= poff= nof= nlg= 0;
......
...@@ -69,12 +69,12 @@ enum TABTYPE {TAB_UNDEF = 0, /* Table of undefined type */ ...@@ -69,12 +69,12 @@ enum TABTYPE {TAB_UNDEF = 0, /* Table of undefined type */
TAB_WMI = 14, /* WMI tables (Windows only) */ TAB_WMI = 14, /* WMI tables (Windows only) */
TAB_TBL = 15, /* Collection of CONNECT tables */ TAB_TBL = 15, /* Collection of CONNECT tables */
TAB_OEM = 16, /* OEM implemented table */ TAB_OEM = 16, /* OEM implemented table */
TAB_CATLG = 16, /* Catalog table */ TAB_CATLG = 17, /* Catalog table */
TAB_PLG = 17, /* PLG NIY */ TAB_PLG = 18, /* PLG NIY */
TAB_PIVOT = 18, /* PIVOT NIY */ TAB_PIVOT = 19, /* PIVOT NIY */
TAB_JCT = 19, /* Junction tables NIY */ TAB_JCT = 20, /* Junction tables NIY */
TAB_DMY = 20, /* DMY Dummy tables NIY */ TAB_DMY = 21, /* DMY Dummy tables NIY */
TAB_NIY = 21}; /* Table not implemented yet */ TAB_NIY = 22}; /* Table not implemented yet */
enum AMT {TYPE_AM_ERROR = 0, /* Type not defined */ enum AMT {TYPE_AM_ERROR = 0, /* Type not defined */
TYPE_AM_ROWID = 1, /* ROWID type (special column) */ TYPE_AM_ROWID = 1, /* ROWID type (special column) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment