summaryrefslogtreecommitdiff
path: root/storage/connect
diff options
context:
space:
mode:
Diffstat (limited to 'storage/connect')
-rw-r--r--storage/connect/CMakeLists.txt9
-rw-r--r--storage/connect/connect.cc2
-rw-r--r--storage/connect/global.h4
-rw-r--r--storage/connect/ha_connect.cc104
-rw-r--r--storage/connect/ha_connect.h6
-rw-r--r--storage/connect/mysql-test/connect/disabled.def23
-rw-r--r--storage/connect/mysql-test/connect/r/mysql_exec.result6
-rw-r--r--storage/connect/mysql-test/connect/r/odbc_postgresql.result18
-rw-r--r--storage/connect/odbconn.cpp10
-rw-r--r--storage/connect/tabext.cpp6
-rw-r--r--storage/connect/tabjdbc.cpp9
-rw-r--r--storage/connect/tabmysql.cpp11
-rw-r--r--storage/connect/tabodbc.cpp13
13 files changed, 155 insertions, 66 deletions
diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt
index 86f44edc7c9..c8747f889c6 100644
--- a/storage/connect/CMakeLists.txt
+++ b/storage/connect/CMakeLists.txt
@@ -109,6 +109,7 @@ IF(CONNECT_WITH_LIBXML2)
FIND_PACKAGE(LibXml2)
IF (LIBXML2_FOUND)
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
+ SET(ZLIB_LIBRARY "z") # see ZLIB_INCLUDE_DIR below
SET(XML_LIBRARY ${LIBXML2_LIBRARIES})
SET(CONNECT_SOURCES ${CONNECT_SOURCES} libdoc.cpp libdoc.h)
add_definitions(-DLIBXML2_SUPPORT)
@@ -325,6 +326,14 @@ IF(NOT TARGET connect)
RETURN()
ENDIF()
+# Don't link with bundled zlib and systel libxml2 at the same time.
+# System libxml2 uses system zlib, might conflict with the bundled one.
+IF (XML_LIBRARY AND BUILD_BUNDLED_ZLIB)
+ GET_PROPERTY(INCS TARGET connect PROPERTY INCLUDE_DIRECTORIES)
+ LIST(REMOVE_ITEM INCS ${ZLIB_INCLUDE_DIR})
+ SET_PROPERTY(TARGET connect PROPERTY INCLUDE_DIRECTORIES ${INCS})
+ENDIF()
+
IF(WIN32)
IF (libmongoc-1.0_FOUND)
SET_TARGET_PROPERTIES(connect PROPERTIES LINK_FLAGS
diff --git a/storage/connect/connect.cc b/storage/connect/connect.cc
index 39123b18c59..21bca637eab 100644
--- a/storage/connect/connect.cc
+++ b/storage/connect/connect.cc
@@ -254,7 +254,7 @@ bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE mode, char *c1, char *c2,
try {
if (!c1) {
- if (mode == MODE_INSERT)
+// if (mode == MODE_INSERT) or CHECK TABLE
// Allocate all column blocks for that table
tdbp->ColDB(g, NULL, 0);
diff --git a/storage/connect/global.h b/storage/connect/global.h
index 472d09408c3..36e8a311124 100644
--- a/storage/connect/global.h
+++ b/storage/connect/global.h
@@ -1,7 +1,7 @@
/***********************************************************************/
/* GLOBAL.H: Declaration file used by all CONNECT implementations. */
/* (C) Copyright MariaDB Corporation Ab */
-/* Author Olivier Bertrand 1993-2017 */
+/* Author Olivier Bertrand 1993-2018 */
/***********************************************************************/
/***********************************************************************/
@@ -192,7 +192,7 @@ typedef struct _global { /* Global structure */
PACTIVITY Activityp;
char Message[MAX_STR];
ulong More; /* Used by jsonudf */
- int Createas; /* To pass info to created table */
+ int Createas; /* To pass multi to ext tables */
void *Xchk; /* indexes in create/alter */
short Alchecked; /* Checked for ALTER */
short Mrr; /* True when doing mrr */
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index 7530163fba5..7e2cad77d8d 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -170,9 +170,9 @@
#define JSONMAX 10 // JSON Default max grp size
extern "C" {
- char version[]= "Version 1.06.0007 August 06, 2018";
+ char version[]= "Version 1.06.0008 October 06, 2018";
#if defined(__WIN__)
- char compver[]= "Version 1.06.0007 " __DATE__ " " __TIME__;
+ char compver[]= "Version 1.06.0008 " __DATE__ " " __TIME__;
char slash= '\\';
#else // !__WIN__
char slash= '/';
@@ -1778,13 +1778,13 @@ bool ha_connect::CheckVirtualIndex(TABLE_SHARE *s)
bool ha_connect::IsPartitioned(void)
{
#ifdef WITH_PARTITION_STORAGE_ENGINE
- if (tshp)
+ if (tshp)
return tshp->partition_info_str_len > 0;
else if (table && table->part_info)
return true;
else
#endif
- return false;
+ return false;
} // end of IsPartitioned
@@ -3290,6 +3290,58 @@ ha_rows ha_connect::records()
} // end of records
+int ha_connect::check(THD* thd, HA_CHECK_OPT* check_opt)
+{
+ int rc = HA_ADMIN_OK;
+ PGLOBAL g = ((table && table->in_use) ? GetPlug(table->in_use, xp) :
+ (xp) ? xp->g : NULL);
+ DBUG_ENTER("ha_connect::check");
+
+ if (!g || !table || xmod != MODE_READ)
+ DBUG_RETURN(HA_ADMIN_INTERNAL_ERROR);
+
+ // Do not close the table if it was opened yet (possible?)
+ if (IsOpened()) {
+ if (IsPartitioned() && CheckColumnList(g)) // map can have been changed
+ rc = HA_ADMIN_CORRUPT;
+ else if (tdbp->OpenDB(g)) // Rewind table
+ rc = HA_ADMIN_CORRUPT;
+
+ } else if (xp->CheckQuery(valid_query_id)) {
+ tdbp = NULL; // Not valid anymore
+
+ if (OpenTable(g, false))
+ rc = HA_ADMIN_CORRUPT;
+
+ } else // possible?
+ DBUG_RETURN(HA_ADMIN_INTERNAL_ERROR);
+
+ if (rc == HA_ADMIN_OK) {
+ TABTYPE type = GetTypeID(GetStringOption("Type", "*"));
+
+ if (IsFileType(type)) {
+ if (check_opt->flags & T_MEDIUM) {
+ // TO DO
+ do {
+ if ((rc = CntReadNext(g, tdbp)) == RC_FX)
+ break;
+
+ } while (rc != RC_EF);
+
+ rc = (rc == RC_EF) ? HA_ADMIN_OK : HA_ADMIN_CORRUPT;
+ } else if (check_opt->flags & T_EXTEND) {
+ // TO DO
+ } // endif's flags
+
+ } // endif file type
+
+ } else
+ PushWarning(g, thd, 1);
+
+ DBUG_RETURN(rc);
+} // end of check
+
+
/**
Return an error message specific to this handler.
@@ -3309,7 +3361,8 @@ bool ha_connect::get_error_message(int error, String* buf)
if (trace(1))
htrc("GEM(%d): %s\n", error, g->Message);
- buf->append(g->Message);
+ buf->append(ErrConvString(g->Message, strlen(g->Message),
+ &my_charset_latin1).ptr());
} else
buf->append("Cannot retrieve error message");
@@ -3424,7 +3477,7 @@ int ha_connect::optimize(THD* thd, HA_CHECK_OPT*)
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0, g->Message);
rc = 0;
} else
- rc = HA_ERR_INTERNAL_ERROR;
+ rc = HA_ERR_CRASHED_ON_USAGE; // Table must be repaired
} // endif rc
@@ -3440,6 +3493,9 @@ int ha_connect::optimize(THD* thd, HA_CHECK_OPT*)
rc = HA_ERR_INTERNAL_ERROR;
} // end catch
+ if (rc)
+ my_message(ER_WARN_DATA_OUT_OF_RANGE, g->Message, MYF(0));
+
return rc;
} // end of optimize
@@ -4501,14 +4557,16 @@ MODE ha_connect::CheckMode(PGLOBAL g, THD *thd,
// case SQLCOM_REPLACE_SELECT:
// newmode= MODE_UPDATE; // To be checked
// break;
- case SQLCOM_DELETE:
- case SQLCOM_DELETE_MULTI:
+ case SQLCOM_DELETE_MULTI:
+ *cras = true;
+ case SQLCOM_DELETE:
case SQLCOM_TRUNCATE:
newmode= MODE_DELETE;
break;
- case SQLCOM_UPDATE:
case SQLCOM_UPDATE_MULTI:
- newmode= MODE_UPDATE;
+ *cras = true;
+ case SQLCOM_UPDATE:
+ newmode= MODE_UPDATE;
break;
case SQLCOM_SELECT:
case SQLCOM_OPTIMIZE:
@@ -4533,8 +4591,10 @@ MODE ha_connect::CheckMode(PGLOBAL g, THD *thd,
newmode= MODE_ANY;
break;
// } // endif partitioned
-
- default:
+ case SQLCOM_REPAIR: // TODO implement it
+ newmode = MODE_UPDATE;
+ break;
+ default:
htrc("Unsupported sql_command=%d\n", thd_sql_command(thd));
strcpy(g->Message, "CONNECT Unsupported command");
my_message(ER_NOT_ALLOWED_COMMAND, g->Message, MYF(0));
@@ -4546,17 +4606,18 @@ MODE ha_connect::CheckMode(PGLOBAL g, THD *thd,
switch (thd_sql_command(thd)) {
case SQLCOM_CREATE_TABLE:
*chk= true;
- *cras= true;
+ break;
+ case SQLCOM_UPDATE_MULTI:
+ case SQLCOM_DELETE_MULTI:
+ *cras= true;
case SQLCOM_INSERT:
case SQLCOM_LOAD:
case SQLCOM_INSERT_SELECT:
// case SQLCOM_REPLACE:
// case SQLCOM_REPLACE_SELECT:
case SQLCOM_DELETE:
- case SQLCOM_DELETE_MULTI:
case SQLCOM_TRUNCATE:
case SQLCOM_UPDATE:
- case SQLCOM_UPDATE_MULTI:
case SQLCOM_SELECT:
case SQLCOM_OPTIMIZE:
case SQLCOM_SET_OPTION:
@@ -4584,8 +4645,9 @@ MODE ha_connect::CheckMode(PGLOBAL g, THD *thd,
break;
// } // endif partitioned
- case SQLCOM_CHECK: // TODO implement it
- case SQLCOM_END: // Met in procedures: IF(EXISTS(SELECT...
+ case SQLCOM_CHECK: // TODO implement it
+ case SQLCOM_ANALYZE: // TODO implement it
+ case SQLCOM_END: // Met in procedures: IF(EXISTS(SELECT...
newmode= MODE_READ;
break;
default:
@@ -4867,7 +4929,7 @@ int ha_connect::external_lock(THD *thd, int lock_type)
#endif // 0
if (cras)
- g->Createas= 1; // To tell created table to ignore FLAG
+ g->Createas= 1; // To tell external tables of a multi-table command
if (trace(1)) {
#if 0
@@ -6190,9 +6252,9 @@ int ha_connect::create(const char *name, TABLE *table_arg,
LEX_STRING cnc = table_arg->s->connect_string;
#ifdef WITH_PARTITION_STORAGE_ENGINE
partition_info *part_info= table_arg->part_info;
-#else
+#else // !WITH_PARTITION_STORAGE_ENGINE
#define part_info 0
-#endif // WITH_PARTITION_STORAGE_ENGINE
+#endif // !WITH_PARTITION_STORAGE_ENGINE
xp= GetUser(thd, xp);
PGLOBAL g= xp->g;
@@ -7248,7 +7310,7 @@ maria_declare_plugin(connect)
0x0107, /* version number (1.05) */
NULL, /* status variables */
connect_system_variables, /* system variables */
- "1.06.0007", /* string version */
+ "1.06.0008", /* string version */
MariaDB_PLUGIN_MATURITY_STABLE /* maturity */
}
maria_declare_plugin_end;
diff --git a/storage/connect/ha_connect.h b/storage/connect/ha_connect.h
index 4c5bf5856cc..07b1c2d2e7d 100644
--- a/storage/connect/ha_connect.h
+++ b/storage/connect/ha_connect.h
@@ -347,11 +347,7 @@ PFIL CondFilter(PGLOBAL g, Item *cond);
//PFIL CheckFilter(PGLOBAL g);
/** admin commands - called from mysql_admin_table */
-virtual int check(THD* thd, HA_CHECK_OPT* check_opt)
-{
- // TODO: implement it
- return HA_ADMIN_OK; // Just to avoid error message with checktables
-} // end of check
+virtual int check(THD* thd, HA_CHECK_OPT* check_opt);
/**
Number of rows in table. It will only be called if
diff --git a/storage/connect/mysql-test/connect/disabled.def b/storage/connect/mysql-test/connect/disabled.def
index 0dcf030613d..827ed58b835 100644
--- a/storage/connect/mysql-test/connect/disabled.def
+++ b/storage/connect/mysql-test/connect/disabled.def
@@ -9,14 +9,15 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################
-jdbc : Variable settings depend on machine configuration
-jdbc_new : Variable settings depend on machine configuration
-jdbc_oracle : Variable settings depend on machine configuration
-jdbc_postgresql : Variable settings depend on machine configuration
-json_mongo_c : Need MongoDB running and its C Driver installed
-json_java_2 : Need MongoDB running and its Java Driver installed
-json_java_3 : Need MongoDB running and its Java Driver installed
-mongo_c : Need MongoDB running and its C Driver installed
-mongo_java_2 : Need MongoDB running and its Java Driver installed
-mongo_java_3 : Need MongoDB running and its Java Driver installed
-tbl_thread : Bug MDEV-9844,10179,14214 03/01/2018 OB Option THREAD removed
+infoschema-9739 : Crashes with MariaDB 10.0
+jdbc : Variable settings depend on machine configuration
+jdbc_new : Variable settings depend on machine configuration
+jdbc_oracle : Variable settings depend on machine configuration
+jdbc_postgresql : Variable settings depend on machine configuration
+json_mongo_c : Need MongoDB running and its C Driver installed
+json_java_2 : Need MongoDB running and its Java Driver installed
+json_java_3 : Need MongoDB running and its Java Driver installed
+mongo_c : Need MongoDB running and its C Driver installed
+mongo_java_2 : Need MongoDB running and its Java Driver installed
+mongo_java_3 : Need MongoDB running and its Java Driver installed
+tbl_thread : Bug MDEV-9844,10179,14214 03/01/2018 OB Option THREAD removed
diff --git a/storage/connect/mysql-test/connect/r/mysql_exec.result b/storage/connect/mysql-test/connect/r/mysql_exec.result
index c0400bc82e7..cc77240503b 100644
--- a/storage/connect/mysql-test/connect/r/mysql_exec.result
+++ b/storage/connect/mysql-test/connect/r/mysql_exec.result
@@ -35,6 +35,8 @@ insert ignore into t1(id) values(NULL) 1 1 Affected rows
Warning 0 1364 Field 'msg' doesn't have a default value
update t1 set msg = 'Four' where id = 4 0 1 Affected rows
select * from t1 0 2 Result set columns
+Warnings:
+Warning 1105 Result set columns
#
# Checking Using Procedure
#
@@ -48,9 +50,13 @@ CALL p1('insert ignore into t1(id) values(NULL)');
command warnings number message
insert ignore into t1(id) values(NULL) 1 1 Affected rows
Warning 0 1364 Field 'msg' doesn't have a default value
+Warnings:
+Warning 1105 Affected rows
CALL p1('update t1 set msg = "Five" where id = 5');
command warnings number message
update t1 set msg = "Five" where id = 5 0 1 Affected rows
+Warnings:
+Warning 1105 Affected rows
DROP PROCEDURE p1;
DROP TABLE t1;
connection slave;
diff --git a/storage/connect/mysql-test/connect/r/odbc_postgresql.result b/storage/connect/mysql-test/connect/r/odbc_postgresql.result
index 3426d23e29c..dc23dbdb990 100644
--- a/storage/connect/mysql-test/connect/r/odbc_postgresql.result
+++ b/storage/connect/mysql-test/connect/r/odbc_postgresql.result
@@ -99,9 +99,9 @@ Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Bu
mtr public t1 a 4 int4 10 4 0 10 0
mtr public t2 a 4 int4 10 4 0 10 0
mtr public v1 a 4 int4 10 4 0 10 1
-mtr schema1 t1 a 1 bpchar 10 60 NULL NULL 0
-mtr schema1 t2 a 1 bpchar 10 60 NULL NULL 0
-mtr schema1 v1 a 1 bpchar 10 60 NULL NULL 1
+mtr schema1 t1 a 1 bpchar 10 40 NULL NULL 0
+mtr schema1 t2 a 1 bpchar 10 40 NULL NULL 0
+mtr schema1 v1 a 1 bpchar 10 40 NULL NULL 1
DROP TABLE t1;
# All columns in the schemas "public" and "schema1"
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr' CATFUNC=Columns TABNAME='%.%.%';
@@ -110,16 +110,16 @@ Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Bu
mtr public t1 a 4 int4 10 4 0 10 0
mtr public t2 a 4 int4 10 4 0 10 0
mtr public v1 a 4 int4 10 4 0 10 1
-mtr schema1 t1 a 1 bpchar 10 60 NULL NULL 0
-mtr schema1 t2 a 1 bpchar 10 60 NULL NULL 0
-mtr schema1 v1 a 1 bpchar 10 60 NULL NULL 1
+mtr schema1 t1 a 1 bpchar 10 40 NULL NULL 0
+mtr schema1 t2 a 1 bpchar 10 40 NULL NULL 0
+mtr schema1 v1 a 1 bpchar 10 40 NULL NULL 1
DROP TABLE t1;
# All tables "t1" in all schemas
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr' CATFUNC=Columns TABNAME='%.%.t1';
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
mtr public t1 a 4 int4 10 4 0 10 0
-mtr schema1 t1 a 1 bpchar 10 60 NULL NULL 0
+mtr schema1 t1 a 1 bpchar 10 40 NULL NULL 0
DROP TABLE t1;
# Table "t1" in the schema "public"
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr' CATFUNC=Columns TABNAME='%.public.t1';
@@ -131,14 +131,14 @@ DROP TABLE t1;
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr' CATFUNC=Columns TABNAME='%.schema1.t1';
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
-mtr schema1 t1 a 1 bpchar 10 60 NULL NULL 0
+mtr schema1 t1 a 1 bpchar 10 40 NULL NULL 0
DROP TABLE t1;
# All tables "t1" in all schemas (Catalog name is ignored by PostgreSQL)
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr' CATFUNC=Columns TABNAME='xxx.%.t1';
SELECT * FROM t1 ORDER BY Table_Schema, Table_Name;
Table_Cat Table_Schema Table_Name Column_Name Data_Type Type_Name Column_Size Buffer_Length Decimal_Digits Radix Nullable Remarks
mtr public t1 a 4 int4 10 4 0 10 0
-mtr schema1 t1 a 1 bpchar 10 60 NULL NULL 0
+mtr schema1 t1 a 1 bpchar 10 40 NULL NULL 0
DROP TABLE t1;
#
# Checking tables
diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp
index f7b1a43a95d..6687513fa6c 100644
--- a/storage/connect/odbconn.cpp
+++ b/storage/connect/odbconn.cpp
@@ -2354,11 +2354,11 @@ int ODBConn::GetCatInfo(CATPARM *cap)
if (!Check(rc))
ThrowDBX(rc, fnc, hstmt);
- rc = SQLNumResultCols(hstmt, &ncol);
-
- // n because we no more ignore the first column
- if ((n = (UWORD)qrp->Nbcol) > (UWORD)ncol)
- ThrowDBX(MSG(COL_NUM_MISM));
+ // Some data source do not implement SQLNumResultCols
+ if (Check(SQLNumResultCols(hstmt, &ncol)))
+ // n because we no more ignore the first column
+ if ((n = (UWORD)qrp->Nbcol) > (UWORD)ncol)
+ ThrowDBX(MSG(COL_NUM_MISM));
// Unconditional to handle STRBLK's
pval = (PVAL *)PlugSubAlloc(g, NULL, n * sizeof(PVAL));
diff --git a/storage/connect/tabext.cpp b/storage/connect/tabext.cpp
index 139e4199ed9..f2d5eb0e69d 100644
--- a/storage/connect/tabext.cpp
+++ b/storage/connect/tabext.cpp
@@ -125,6 +125,12 @@ EXTDEF::EXTDEF(void)
/***********************************************************************/
bool EXTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
{
+ if (g->Createas) {
+ strcpy(g->Message,
+ "Multiple-table UPDATE/DELETE commands are not supported");
+ return true;
+ } // endif multi
+
Desc = NULL;
Tabname = GetStringCatInfo(g, "Name",
(Catfunc & (FNC_TABLE | FNC_COL)) ? NULL : Name);
diff --git a/storage/connect/tabjdbc.cpp b/storage/connect/tabjdbc.cpp
index 275b5edaeae..adb3fc4fb51 100644
--- a/storage/connect/tabjdbc.cpp
+++ b/storage/connect/tabjdbc.cpp
@@ -1157,8 +1157,9 @@ bool TDBXJDC::OpenDB(PGLOBAL g)
/* Get the command to execute. */
/*********************************************************************/
if (!(Cmdlist = MakeCMD(g))) {
- Jcp->Close();
- return true;
+ // Next lines commented out because of CHECK TABLE
+ //Jcp->Close();
+ //return true;
} // endif Query
Rows = 1;
@@ -1189,8 +1190,10 @@ int TDBXJDC::ReadDB(PGLOBAL g)
Fpos++; // Used for progress info
Cmdlist = (Nerr > Mxr) ? NULL : Cmdlist->Next;
return RC_OK;
- } else
+ } else {
+ PushWarning(g, this, 1);
return RC_EF;
+ } // endif Cmdlist
} // end of ReadDB
diff --git a/storage/connect/tabmysql.cpp b/storage/connect/tabmysql.cpp
index 605b3822430..ceffafac02c 100644
--- a/storage/connect/tabmysql.cpp
+++ b/storage/connect/tabmysql.cpp
@@ -1587,8 +1587,9 @@ bool TDBMYEXC::OpenDB(PGLOBAL g)
/* Get the command to execute. */
/*********************************************************************/
if (!(Cmdlist = MakeCMD(g))) {
- Myc.Close();
- return true;
+ // Next lines commented out because of CHECK TABLE
+ //Myc.Close();
+ //return true;
} // endif Cmdlist
return false;
@@ -1647,8 +1648,10 @@ int TDBMYEXC::ReadDB(PGLOBAL g)
++N;
return RC_OK;
- } else
- return RC_EF;
+ } else {
+ PushWarning(g, this, 1);
+ return RC_EF;
+ } // endif Cmdlist
} // end of ReadDB
diff --git a/storage/connect/tabodbc.cpp b/storage/connect/tabodbc.cpp
index f7bc3934fbd..fddfb0c0420 100644
--- a/storage/connect/tabodbc.cpp
+++ b/storage/connect/tabodbc.cpp
@@ -1249,9 +1249,10 @@ bool TDBXDBC::OpenDB(PGLOBAL g)
/* Get the command to execute. */
/*********************************************************************/
if (!(Cmdlist = MakeCMD(g))) {
- Ocp->Close();
- return true;
- } // endif Query
+ // Next lines commented out because of CHECK TABLE
+ //Ocp->Close();
+ //return true;
+ } // endif Cmdlist
Rows = 1;
return false;
@@ -1274,8 +1275,10 @@ int TDBXDBC::ReadDB(PGLOBAL g)
Fpos++; // Used for progress info
Cmdlist = (Nerr > Mxr) ? NULL : Cmdlist->Next;
return RC_OK;
- } else
- return RC_EF;
+ } else {
+ PushWarning(g, this, 1);
+ return RC_EF;
+ } // endif Cmdlist
} // end of ReadDB