Commit fe6d5f49 authored by Olivier Bertrand's avatar Olivier Bertrand

- Fix GetTypeID (to take care of supported features)

  and IsFileType functions (INI was missing)

modified:
  storage/connect/mycat.cc

- Update test result

modified:
  mysql-test/suite/connect/r/null.result
parent fff28085
...@@ -46,6 +46,8 @@ CREATE TABLE t1 ...@@ -46,6 +46,8 @@ CREATE TABLE t1
`sec` char(8) NOT NULL flag=1, `sec` char(8) NOT NULL flag=1,
`key` char(12) `key` char(12)
) ENGINE=CONNECT TABLE_TYPE=INI; ) ENGINE=CONNECT TABLE_TYPE=INI;
Warnings:
Warning 1105 No file name. Table will use t1.INI
INSERT INTO t1(sec) values('S1'); INSERT INTO t1(sec) values('S1');
SELECT * FROM t1; SELECT * FROM t1;
sec key sec key
......
...@@ -115,10 +115,14 @@ TABTYPE GetTypeID(const char *type) ...@@ -115,10 +115,14 @@ TABTYPE GetTypeID(const char *type)
#ifdef ODBC_SUPPORT #ifdef ODBC_SUPPORT
: (!stricmp(type, "ODBC")) ? TAB_ODBC : (!stricmp(type, "ODBC")) ? TAB_ODBC
#endif #endif
#ifdef MYSQL_SUPPORT
: (!stricmp(type, "MYSQL")) ? TAB_MYSQL : (!stricmp(type, "MYSQL")) ? TAB_MYSQL
#endif
: (!stricmp(type, "DIR")) ? TAB_DIR : (!stricmp(type, "DIR")) ? TAB_DIR
#ifdef WIN32
: (!stricmp(type, "MAC")) ? TAB_MAC : (!stricmp(type, "MAC")) ? TAB_MAC
: (!stricmp(type, "WMI")) ? TAB_WMI : (!stricmp(type, "WMI")) ? TAB_WMI
#endif
: (!stricmp(type, "TBL")) ? TAB_TBL : (!stricmp(type, "TBL")) ? TAB_TBL
: (!stricmp(type, "OEM")) ? TAB_OEM : TAB_NIY; : (!stricmp(type, "OEM")) ? TAB_OEM : TAB_NIY;
} // end of GetTypeID } // end of GetTypeID
...@@ -138,6 +142,7 @@ bool IsFileType(TABTYPE type) ...@@ -138,6 +142,7 @@ bool IsFileType(TABTYPE type)
case TAB_FMT: case TAB_FMT:
case TAB_DBF: case TAB_DBF:
case TAB_XML: case TAB_XML:
case TAB_INI:
case TAB_VEC: case TAB_VEC:
isfile= true; isfile= true;
break; break;
......
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