Commit 70b4e6d3 authored by Olivier Bertrand's avatar Olivier Bertrand

- Add ConnectTimout and QueryTimout options for ODBC tables. Should

  fix MDEV-7415. (To be specified in option_list)
modified:
  storage/connect/ha_connect.cc
  storage/connect/odbccat.h
  storage/connect/odbconn.cpp
  storage/connect/odbconn.h
  storage/connect/tabodbc.cpp
  storage/connect/tabodbc.h
parent 85c65f4e
/* Copyright (C) Olivier Bertrand 2004 - 2014 /* Copyright (C) Olivier Bertrand 2004 - 2015
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
#define SZWMIN 4194304 // Minimum work area size 4M #define SZWMIN 4194304 // Minimum work area size 4M
extern "C" { extern "C" {
char version[]= "Version 1.03.0005 November 08, 2014"; char version[]= "Version 1.03.0005 January 13, 2015";
char compver[]= "Version 1.03.0005 " __DATE__ " " __TIME__; char compver[]= "Version 1.03.0005 " __DATE__ " " __TIME__;
#if defined(WIN32) #if defined(WIN32)
...@@ -4830,6 +4830,9 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, ...@@ -4830,6 +4830,9 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd,
#endif // WIN32 #endif // WIN32
int port= 0, hdr= 0, mxr __attribute__((unused))= 0, mxe= 0, rc= 0; int port= 0, hdr= 0, mxr __attribute__((unused))= 0, mxe= 0, rc= 0;
int cop __attribute__((unused)) = 0; int cop __attribute__((unused)) = 0;
#if defined(ODBC_SUPPORT)
int cto= -1, qto= -1;
#endif // ODBC_SUPPORT
uint tm, fnc= FNC_NO, supfnc= (FNC_NO | FNC_COL); uint tm, fnc= FNC_NO, supfnc= (FNC_NO | FNC_COL);
bool bif, ok= false, dbf= false; bool bif, ok= false, dbf= false;
TABTYPE ttp= TAB_UNDEF; TABTYPE ttp= TAB_UNDEF;
...@@ -4889,6 +4892,8 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, ...@@ -4889,6 +4892,8 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd,
port= atoi(GetListOption(g, "port", topt->oplist, "0")); port= atoi(GetListOption(g, "port", topt->oplist, "0"));
#if defined(ODBC_SUPPORT) #if defined(ODBC_SUPPORT)
mxr= atoi(GetListOption(g,"maxres", topt->oplist, "0")); mxr= atoi(GetListOption(g,"maxres", topt->oplist, "0"));
cto= atoi(GetListOption(g,"ConnectTimeout", topt->oplist, "-1"));
qto= atoi(GetListOption(g,"QueryTimeout", topt->oplist, "-1"));
#endif #endif
mxe= atoi(GetListOption(g,"maxerr", topt->oplist, "0")); mxe= atoi(GetListOption(g,"maxerr", topt->oplist, "0"));
#if defined(PROMPT_OK) #if defined(PROMPT_OK)
...@@ -5107,14 +5112,15 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, ...@@ -5107,14 +5112,15 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd,
case FNC_NO: case FNC_NO:
case FNC_COL: case FNC_COL:
if (src) { if (src) {
qrp= ODBCSrcCols(g, dsn, (char*)src); qrp= ODBCSrcCols(g, dsn, (char*)src, cto, qto);
src= NULL; // for next tests src= NULL; // for next tests
} else } else
qrp= ODBCColumns(g, dsn, shm, tab, NULL, mxr, fnc == FNC_COL); qrp= ODBCColumns(g, dsn, shm, tab, NULL,
mxr, cto, qto, fnc == FNC_COL);
break; break;
case FNC_TABLE: case FNC_TABLE:
qrp= ODBCTables(g, dsn, shm, tab, mxr, true); qrp= ODBCTables(g, dsn, shm, tab, mxr, cto, qto, true);
break; break;
case FNC_DSN: case FNC_DSN:
qrp= ODBCDataSources(g, mxr, true); qrp= ODBCDataSources(g, mxr, true);
......
// Timeout and net wait defaults
#define DEFAULT_LOGIN_TIMEOUT -1 // means do not set
#define DEFAULT_QUERY_TIMEOUT -1 // means do not set
/***********************************************************************/ /***********************************************************************/
/* ODBC catalog function prototypes. */ /* ODBC catalog function prototypes. */
/***********************************************************************/ /***********************************************************************/
...@@ -6,8 +10,8 @@ char *ODBCCheckConnection(PGLOBAL g, char *dsn, int cop); ...@@ -6,8 +10,8 @@ char *ODBCCheckConnection(PGLOBAL g, char *dsn, int cop);
#endif // PROMPT_OK #endif // PROMPT_OK
PQRYRES ODBCDataSources(PGLOBAL g, int maxres, bool info); PQRYRES ODBCDataSources(PGLOBAL g, int maxres, bool info);
PQRYRES ODBCColumns(PGLOBAL g, char *dsn, char *db, char *table, PQRYRES ODBCColumns(PGLOBAL g, char *dsn, char *db, char *table,
char *colpat, int maxres, bool info); char *colpat, int maxres, int cto, int qto, bool info);
PQRYRES ODBCSrcCols(PGLOBAL g, char *dsn, char *src); PQRYRES ODBCSrcCols(PGLOBAL g, char *dsn, char *src, int cto, int qto);
PQRYRES ODBCTables(PGLOBAL g, char *dsn, char *db, char *tabpat, PQRYRES ODBCTables(PGLOBAL g, char *dsn, char *db, char *tabpat,
int maxres, bool info); int maxres, int cto, int qto, bool info);
PQRYRES ODBCDrivers(PGLOBAL g, int maxres, bool info); PQRYRES ODBCDrivers(PGLOBAL g, int maxres, bool info);
/************ Odbconn C++ Functions Source Code File (.CPP) ************/ /************ Odbconn C++ Functions Source Code File (.CPP) ************/
/* Name: ODBCONN.CPP Version 2.0 */ /* Name: ODBCONN.CPP Version 2.1 */
/* */ /* */
/* (C) Copyright to the author Olivier BERTRAND 1998-2014 */ /* (C) Copyright to the author Olivier BERTRAND 1998-2015 */
/* */ /* */
/* This file contains the ODBC connection classes functions. */ /* This file contains the ODBC connection classes functions. */
/***********************************************************************/ /***********************************************************************/
...@@ -291,7 +291,7 @@ static void ResetNullValues(CATPARM *cap) ...@@ -291,7 +291,7 @@ static void ResetNullValues(CATPARM *cap)
/* of an ODBC table that will be retrieved by GetData commands. */ /* of an ODBC table that will be retrieved by GetData commands. */
/***********************************************************************/ /***********************************************************************/
PQRYRES ODBCColumns(PGLOBAL g, char *dsn, char *db, char *table, PQRYRES ODBCColumns(PGLOBAL g, char *dsn, char *db, char *table,
char *colpat, int maxres, bool info) char *colpat, int maxres, int cto, int qto, bool info)
{ {
int buftyp[] = {TYPE_STRING, TYPE_STRING, TYPE_STRING, TYPE_STRING, int buftyp[] = {TYPE_STRING, TYPE_STRING, TYPE_STRING, TYPE_STRING,
TYPE_SHORT, TYPE_STRING, TYPE_INT, TYPE_INT, TYPE_SHORT, TYPE_STRING, TYPE_INT, TYPE_INT,
...@@ -310,6 +310,8 @@ PQRYRES ODBCColumns(PGLOBAL g, char *dsn, char *db, char *table, ...@@ -310,6 +310,8 @@ PQRYRES ODBCColumns(PGLOBAL g, char *dsn, char *db, char *table,
/************************************************************************/ /************************************************************************/
if (!info) { if (!info) {
ocp = new(g) ODBConn(g, NULL); ocp = new(g) ODBConn(g, NULL);
ocp->SetLoginTimeout((DWORD)cto);
ocp->SetQueryTimeout((DWORD)qto);
if (ocp->Open(dsn, 10) < 1) // openReadOnly + noODBCdialog if (ocp->Open(dsn, 10) < 1) // openReadOnly + noODBCdialog
return NULL; return NULL;
...@@ -386,10 +388,12 @@ PQRYRES ODBCColumns(PGLOBAL g, char *dsn, char *db, char *table, ...@@ -386,10 +388,12 @@ PQRYRES ODBCColumns(PGLOBAL g, char *dsn, char *db, char *table,
/* ODBCSrcCols: constructs the result blocks containing the */ /* ODBCSrcCols: constructs the result blocks containing the */
/* description of all the columns of a Srcdef option. */ /* description of all the columns of a Srcdef option. */
/**************************************************************************/ /**************************************************************************/
PQRYRES ODBCSrcCols(PGLOBAL g, char *dsn, char *src) PQRYRES ODBCSrcCols(PGLOBAL g, char *dsn, char *src, int cto, int qto)
{ {
ODBConn *ocp = new(g) ODBConn(g, NULL); ODBConn *ocp = new(g) ODBConn(g, NULL);
ocp->SetLoginTimeout((DWORD)cto);
ocp->SetQueryTimeout((DWORD)qto);
return ocp->GetMetaData(g, dsn, src); return ocp->GetMetaData(g, dsn, src);
} // end of ODBCSrcCols } // end of ODBCSrcCols
...@@ -570,7 +574,7 @@ PQRYRES ODBCDataSources(PGLOBAL g, int maxres, bool info) ...@@ -570,7 +574,7 @@ PQRYRES ODBCDataSources(PGLOBAL g, int maxres, bool info)
/* an ODBC database that will be retrieved by GetData commands. */ /* an ODBC database that will be retrieved by GetData commands. */
/**************************************************************************/ /**************************************************************************/
PQRYRES ODBCTables(PGLOBAL g, char *dsn, char *db, char *tabpat, PQRYRES ODBCTables(PGLOBAL g, char *dsn, char *db, char *tabpat,
int maxres, bool info) int maxres, int cto, int qto, bool info)
{ {
int buftyp[] = {TYPE_STRING, TYPE_STRING, TYPE_STRING, int buftyp[] = {TYPE_STRING, TYPE_STRING, TYPE_STRING,
TYPE_STRING, TYPE_STRING}; TYPE_STRING, TYPE_STRING};
...@@ -590,6 +594,8 @@ PQRYRES ODBCTables(PGLOBAL g, char *dsn, char *db, char *tabpat, ...@@ -590,6 +594,8 @@ PQRYRES ODBCTables(PGLOBAL g, char *dsn, char *db, char *tabpat,
/* Open the connection with the ODBC data source. */ /* Open the connection with the ODBC data source. */
/**********************************************************************/ /**********************************************************************/
ocp = new(g) ODBConn(g, NULL); ocp = new(g) ODBConn(g, NULL);
ocp->SetLoginTimeout((DWORD)cto);
ocp->SetQueryTimeout((DWORD)qto);
if (ocp->Open(dsn, 2) < 1) // 2 is openReadOnly if (ocp->Open(dsn, 2) < 1) // 2 is openReadOnly
return NULL; return NULL;
...@@ -1134,10 +1140,13 @@ void ODBConn::AllocConnect(DWORD Options) ...@@ -1134,10 +1140,13 @@ void ODBConn::AllocConnect(DWORD Options)
} // endif } // endif
#endif // _DEBUG #endif // _DEBUG
rc = SQLSetConnectOption(m_hdbc, SQL_LOGIN_TIMEOUT, m_LoginTimeout); if ((signed)m_LoginTimeout >= 0) {
rc = SQLSetConnectOption(m_hdbc, SQL_LOGIN_TIMEOUT, m_LoginTimeout);
if (trace && rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) if (trace && rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO)
htrc("Warning: Failure setting login timeout\n"); htrc("Warning: Failure setting login timeout\n");
} // endif Timeout
if (!m_Updatable) { if (!m_Updatable) {
rc = SQLSetConnectOption(m_hdbc, SQL_ACCESS_MODE, SQL_MODE_READ_ONLY); rc = SQLSetConnectOption(m_hdbc, SQL_ACCESS_MODE, SQL_MODE_READ_ONLY);
......
...@@ -33,10 +33,6 @@ ...@@ -33,10 +33,6 @@
typedef unsigned char *PUCHAR; typedef unsigned char *PUCHAR;
#endif // !WIN32 #endif // !WIN32
// Timeout and net wait defaults
#define DEFAULT_LOGIN_TIMEOUT 15 // seconds to before fail on connect
#define DEFAULT_QUERY_TIMEOUT 15 // seconds to before fail waiting for results
// Field Flags, used to indicate status of fields // Field Flags, used to indicate status of fields
//efine SQL_FIELD_FLAG_DIRTY 0x1 //efine SQL_FIELD_FLAG_DIRTY 0x1
//efine SQL_FIELD_FLAG_NULL 0x2 //efine SQL_FIELD_FLAG_NULL 0x2
......
/************* Tabodbc C++ Program Source Code File (.CPP) *************/ /************* Tabodbc C++ Program Source Code File (.CPP) *************/
/* PROGRAM NAME: TABODBC */ /* PROGRAM NAME: TABODBC */
/* ------------- */ /* ------------- */
/* Version 2.8 */ /* Version 2.9 */
/* */ /* */
/* COPYRIGHT: */ /* COPYRIGHT: */
/* ---------- */ /* ---------- */
/* (C) Copyright to the author Olivier BERTRAND 2000-2014 */ /* (C) Copyright to the author Olivier BERTRAND 2000-2015 */
/* */ /* */
/* WHAT THIS PROGRAM DOES: */ /* WHAT THIS PROGRAM DOES: */
/* ----------------------- */ /* ----------------------- */
...@@ -94,7 +94,7 @@ bool ExactInfo(void); ...@@ -94,7 +94,7 @@ bool ExactInfo(void);
ODBCDEF::ODBCDEF(void) ODBCDEF::ODBCDEF(void)
{ {
Connect= Tabname= Tabschema= Tabcat= Srcdef= Qchar= Qrystr= Sep= NULL; Connect= Tabname= Tabschema= Tabcat= Srcdef= Qchar= Qrystr= Sep= NULL;
Catver = Options = Quoted = Maxerr = Maxres = 0; Catver = Options = Cto = Qto = Quoted = Maxerr = Maxres = 0;
Scrollable = Memory = Xsrc = false; Scrollable = Memory = Xsrc = false;
} // end of ODBCDEF constructor } // end of ODBCDEF constructor
...@@ -130,6 +130,8 @@ bool ODBCDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) ...@@ -130,6 +130,8 @@ bool ODBCDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
Quoted = GetIntCatInfo("Quoted", 0); Quoted = GetIntCatInfo("Quoted", 0);
Options = ODBConn::noOdbcDialog; Options = ODBConn::noOdbcDialog;
//Options = ODBConn::noOdbcDialog | ODBConn::useCursorLib; //Options = ODBConn::noOdbcDialog | ODBConn::useCursorLib;
Cto= GetIntCatInfo("ConnectTimeout", DEFAULT_LOGIN_TIMEOUT);
Qto= GetIntCatInfo("QueryTimeout", DEFAULT_QUERY_TIMEOUT);
Scrollable = GetBoolCatInfo("Scrollable", false); Scrollable = GetBoolCatInfo("Scrollable", false);
Memory = GetBoolCatInfo("Memory", false); Memory = GetBoolCatInfo("Memory", false);
Pseudo = 2; // FILID is Ok but not ROWID Pseudo = 2; // FILID is Ok but not ROWID
...@@ -193,6 +195,8 @@ TDBODBC::TDBODBC(PODEF tdp) : TDBASE(tdp) ...@@ -193,6 +195,8 @@ TDBODBC::TDBODBC(PODEF tdp) : TDBASE(tdp)
Qrystr = tdp->Qrystr; Qrystr = tdp->Qrystr;
Sep = tdp->GetSep(); Sep = tdp->GetSep();
Options = tdp->Options; Options = tdp->Options;
Cto = tdp->Cto;
Qto = tdp->Qto;
Quoted = MY_MAX(0, tdp->GetQuoted()); Quoted = MY_MAX(0, tdp->GetQuoted());
Rows = tdp->GetElemt(); Rows = tdp->GetElemt();
Catver = tdp->Catver; Catver = tdp->Catver;
...@@ -207,6 +211,8 @@ TDBODBC::TDBODBC(PODEF tdp) : TDBASE(tdp) ...@@ -207,6 +211,8 @@ TDBODBC::TDBODBC(PODEF tdp) : TDBASE(tdp)
Qrystr = NULL; Qrystr = NULL;
Sep = 0; Sep = 0;
Options = 0; Options = 0;
Cto = DEFAULT_LOGIN_TIMEOUT;
Qto = DEFAULT_QUERY_TIMEOUT;
Quoted = 0; Quoted = 0;
Rows = 0; Rows = 0;
Catver = 0; Catver = 0;
...@@ -248,6 +254,8 @@ TDBODBC::TDBODBC(PTDBODBC tdbp) : TDBASE(tdbp) ...@@ -248,6 +254,8 @@ TDBODBC::TDBODBC(PTDBODBC tdbp) : TDBASE(tdbp)
MulConn = tdbp->MulConn; MulConn = tdbp->MulConn;
DBQ = tdbp->DBQ; DBQ = tdbp->DBQ;
Options = tdbp->Options; Options = tdbp->Options;
Cto = tdbp->Cto;
Qto = tdbp->Qto;
Quoted = tdbp->Quoted; Quoted = tdbp->Quoted;
Rows = tdbp->Rows; Rows = tdbp->Rows;
Fpos = tdbp->Fpos; Fpos = tdbp->Fpos;
...@@ -690,6 +698,9 @@ int TDBODBC::Cardinality(PGLOBAL g) ...@@ -690,6 +698,9 @@ int TDBODBC::Cardinality(PGLOBAL g)
char qry[96], tbn[64]; char qry[96], tbn[64];
ODBConn *ocp = new(g) ODBConn(g, this); ODBConn *ocp = new(g) ODBConn(g, this);
ocp->SetLoginTimeout((DWORD)Cto);
ocp->SetQueryTimeout((DWORD)Qto);
if (ocp->Open(Connect, Options) < 1) if (ocp->Open(Connect, Options) < 1)
return -1; return -1;
...@@ -791,9 +802,11 @@ bool TDBODBC::OpenDB(PGLOBAL g) ...@@ -791,9 +802,11 @@ bool TDBODBC::OpenDB(PGLOBAL g)
/* and if so to allocate just a new result set. But this only for */ /* and if so to allocate just a new result set. But this only for */
/* drivers allowing concurency in getting results ??? */ /* drivers allowing concurency in getting results ??? */
/*********************************************************************/ /*********************************************************************/
if (!Ocp) if (!Ocp) {
Ocp = new(g) ODBConn(g, this); Ocp = new(g) ODBConn(g, this);
else if (Ocp->IsOpen()) Ocp->SetLoginTimeout((DWORD)Cto);
Ocp->SetQueryTimeout((DWORD)Qto);
} else if (Ocp->IsOpen())
Ocp->Close(); Ocp->Close();
if (Ocp->Open(Connect, Options) < 1) if (Ocp->Open(Connect, Options) < 1)
...@@ -1400,9 +1413,11 @@ bool TDBXDBC::OpenDB(PGLOBAL g) ...@@ -1400,9 +1413,11 @@ bool TDBXDBC::OpenDB(PGLOBAL g)
/* and if so to allocate just a new result set. But this only for */ /* and if so to allocate just a new result set. But this only for */
/* drivers allowing concurency in getting results ??? */ /* drivers allowing concurency in getting results ??? */
/*********************************************************************/ /*********************************************************************/
if (!Ocp) if (!Ocp) {
Ocp = new(g) ODBConn(g, this); Ocp = new(g) ODBConn(g, this);
else if (Ocp->IsOpen()) Ocp->SetLoginTimeout((DWORD)Cto);
Ocp->SetQueryTimeout((DWORD)Qto);
} else if (Ocp->IsOpen())
Ocp->Close(); Ocp->Close();
if (Ocp->Open(Connect, Options) < 1) if (Ocp->Open(Connect, Options) < 1)
...@@ -1539,6 +1554,8 @@ TDBOTB::TDBOTB(PODEF tdp) : TDBDRV(tdp) ...@@ -1539,6 +1554,8 @@ TDBOTB::TDBOTB(PODEF tdp) : TDBDRV(tdp)
Dsn = tdp->GetConnect(); Dsn = tdp->GetConnect();
Schema = tdp->GetTabschema(); Schema = tdp->GetTabschema();
Tab = tdp->GetTabname(); Tab = tdp->GetTabname();
Cto = tdp->Cto;
Qto = tdp->Qto;
} // end of TDBOTB constructor } // end of TDBOTB constructor
/***********************************************************************/ /***********************************************************************/
...@@ -1546,7 +1563,7 @@ TDBOTB::TDBOTB(PODEF tdp) : TDBDRV(tdp) ...@@ -1546,7 +1563,7 @@ TDBOTB::TDBOTB(PODEF tdp) : TDBDRV(tdp)
/***********************************************************************/ /***********************************************************************/
PQRYRES TDBOTB::GetResult(PGLOBAL g) PQRYRES TDBOTB::GetResult(PGLOBAL g)
{ {
return ODBCTables(g, Dsn, Schema, Tab, Maxres, false); return ODBCTables(g, Dsn, Schema, Tab, Maxres, Cto, Qto, false);
} // end of GetResult } // end of GetResult
/* ---------------------------TDBOCL class --------------------------- */ /* ---------------------------TDBOCL class --------------------------- */
...@@ -1556,7 +1573,7 @@ PQRYRES TDBOTB::GetResult(PGLOBAL g) ...@@ -1556,7 +1573,7 @@ PQRYRES TDBOTB::GetResult(PGLOBAL g)
/***********************************************************************/ /***********************************************************************/
PQRYRES TDBOCL::GetResult(PGLOBAL g) PQRYRES TDBOCL::GetResult(PGLOBAL g)
{ {
return ODBCColumns(g, Dsn, Schema, Tab, NULL, Maxres, false); return ODBCColumns(g, Dsn, Schema, Tab, NULL, Maxres, Cto, Qto, false);
} // end of GetResult } // end of GetResult
/* ------------------------ End of Tabodbc --------------------------- */ /* ------------------------ End of Tabodbc --------------------------- */
/*************** Tabodbc H Declares Source Code File (.H) **************/ /*************** Tabodbc H Declares Source Code File (.H) **************/
/* Name: TABODBC.H Version 1.7 */ /* Name: TABODBC.H Version 1.8 */
/* */ /* */
/* (C) Copyright to the author Olivier BERTRAND 2000-2014 */ /* (C) Copyright to the author Olivier BERTRAND 2000-2015 */
/* */ /* */
/* This file contains the TDBODBC classes declares. */ /* This file contains the TDBODBC classes declares. */
/***********************************************************************/ /***********************************************************************/
...@@ -24,6 +24,7 @@ class DllExport ODBCDEF : public TABDEF { /* Logical table description */ ...@@ -24,6 +24,7 @@ class DllExport ODBCDEF : public TABDEF { /* Logical table description */
friend class TDBODBC; friend class TDBODBC;
friend class TDBXDBC; friend class TDBXDBC;
friend class TDBDRV; friend class TDBDRV;
friend class TDBOTB;
public: public:
// Constructor // Constructor
ODBCDEF(void); ODBCDEF(void);
...@@ -56,6 +57,8 @@ class DllExport ODBCDEF : public TABDEF { /* Logical table description */ ...@@ -56,6 +57,8 @@ class DllExport ODBCDEF : public TABDEF { /* Logical table description */
PSZ Sep; /* Decimal separator */ PSZ Sep; /* Decimal separator */
int Catver; /* ODBC version for catalog functions */ int Catver; /* ODBC version for catalog functions */
int Options; /* Open connection options */ int Options; /* Open connection options */
int Cto; /* Open connection timeout */
int Qto; /* Query (command) timeout */
int Quoted; /* Identifier quoting level */ int Quoted; /* Identifier quoting level */
int Maxerr; /* Maxerr for an Exec table */ int Maxerr; /* Maxerr for an Exec table */
int Maxres; /* Maxres for a catalog table */ int Maxres; /* Maxres for a catalog table */
...@@ -135,6 +138,8 @@ class TDBODBC : public TDBASE { ...@@ -135,6 +138,8 @@ class TDBODBC : public TDBASE {
char *Qrystr; // The original query char *Qrystr; // The original query
char Sep; // The decimal separator char Sep; // The decimal separator
int Options; // Connect options int Options; // Connect options
int Cto; // Connect timeout
int Qto; // Query timeout
int Quoted; // The identifier quoting level int Quoted; // The identifier quoting level
int Fpos; // Position of last read record int Fpos; // Position of last read record
int AftRows; // The number of affected rows int AftRows; // The number of affected rows
...@@ -311,6 +316,8 @@ class TDBOTB : public TDBDRV { ...@@ -311,6 +316,8 @@ class TDBOTB : public TDBDRV {
char *Dsn; // Points to connection string char *Dsn; // Points to connection string
char *Schema; // Points to schema name or NULL char *Schema; // Points to schema name or NULL
char *Tab; // Points to ODBC table name or pattern char *Tab; // Points to ODBC table name or pattern
int Cto; // Connect timeout
int Qto; // Query timeout
}; // end of class TDBOTB }; // end of class TDBOTB
/***********************************************************************/ /***********************************************************************/
......
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