Commit df1dfcff authored by Olivier Bertrand's avatar Olivier Bertrand

Put trace in ODBC source files

modified:
  storage/connect/odbconn.cpp
  storage/connect/tabodbc.cpp
parent b8746ba9
This diff is collapsed.
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
#include "sql_string.h" #include "sql_string.h"
extern "C" char *GetMsgid(int id); extern "C" char *GetMsgid(int id);
extern "C" int trace;
/***********************************************************************/ /***********************************************************************/
/* DB static variables. */ /* DB static variables. */
...@@ -584,10 +585,9 @@ int TDBODBC::ReadDB(PGLOBAL g) ...@@ -584,10 +585,9 @@ int TDBODBC::ReadDB(PGLOBAL g)
{ {
int rc; int rc;
#ifdef DEBTRACE if (trace > 1)
htrc("ODBC ReadDB: R%d Mode=%d key=%p link=%p Kindex=%p\n", htrc("ODBC ReadDB: R%d Mode=%d key=%p link=%p Kindex=%p\n",
GetTdb_No(), Mode, To_Key_Col, To_Link, To_Kindex); GetTdb_No(), Mode, To_Key_Col, To_Link, To_Kindex);
#endif
if (To_Kindex) { if (To_Kindex) {
// Direct access of ODBC tables is not implemented yet // Direct access of ODBC tables is not implemented yet
...@@ -631,9 +631,9 @@ int TDBODBC::ReadDB(PGLOBAL g) ...@@ -631,9 +631,9 @@ int TDBODBC::ReadDB(PGLOBAL g)
rc = (Rbuf > 0) ? RC_OK : (Rbuf == 0) ? RC_EF : RC_FX; rc = (Rbuf > 0) ? RC_OK : (Rbuf == 0) ? RC_EF : RC_FX;
Fpos++; // Used for progress info Fpos++; // Used for progress info
#ifdef DEBTRACE if (trace > 1)
htrc(" Read: Rbuf=%d rc=%d\n", Rbuf, rc); htrc(" Read: Rbuf=%d rc=%d\n", Rbuf, rc);
#endif
return rc; return rc;
} // end of ReadDB } // end of ReadDB
...@@ -667,9 +667,9 @@ void TDBODBC::CloseDB(PGLOBAL g) ...@@ -667,9 +667,9 @@ void TDBODBC::CloseDB(PGLOBAL g)
Ocp->Close(); Ocp->Close();
#ifdef DEBTRACE if (trace)
htrc("ODBC CloseDB: closing %s\n", Name); htrc("ODBC CloseDB: closing %s\n", Name);
#endif
} // end of CloseDB } // end of CloseDB
/* --------------------------- ODBCCOL ------------------------------- */ /* --------------------------- ODBCCOL ------------------------------- */
...@@ -699,10 +699,9 @@ ODBCCOL::ODBCCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ am) ...@@ -699,10 +699,9 @@ ODBCCOL::ODBCCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ am)
Blkp = NULL; Blkp = NULL;
Rank = 0; // Not known yet Rank = 0; // Not known yet
#ifdef DEBTRACE if (trace)
htrc(" making new %sCOL C%d %s at %p\n", htrc(" making new %sCOL C%d %s at %p\n", am, Index, Name, this);
am, Index, Name, this);
#endif
} // end of ODBCCOL constructor } // end of ODBCCOL constructor
/***********************************************************************/ /***********************************************************************/
......
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