Modified:
trunk/MYODBCDbg/include/MYODBCDbg.h
trunk/myodbc3/info.c
trunk/myodbc3/options.c
Log:
ENH: more trace output
ENH: slightly more readable trace output
Modified: trunk/MYODBCDbg/include/MYODBCDbg.h
===================================================================
--- trunk/MYODBCDbg/include/MYODBCDbg.h 2006-10-07 21:07:10 UTC (rev 127)
+++ trunk/MYODBCDbg/include/MYODBCDbg.h 2006-10-07 22:27:40 UTC (rev 128)
@@ -91,7 +91,7 @@
{ \
fprintf( MYODBCDbgFile, "| " ); \
} \
- fprintf( MYODBCDbgFile, "[ENTER][%s][%s][%d]\n", __FILE__, __FUNCTION__, __LINE__
); \
+ fprintf( MYODBCDbgFile, "[ENTER][%s][%s][%d]\n", __FUNCTION__, __FILE__, __LINE__
); \
} \
MYODBCDbgNest++; \
}
@@ -99,15 +99,15 @@
#define MYODBCDbgReturn( A ) \
{ \
int nNest = 0; \
+ MYODBCDbgNest--; \
if ( MYODBCDbgOn && MYODBCDbgFile ) \
{ \
for ( nNest = 0; nNest < MYODBCDbgNest; nNest++ ) \
{ \
fprintf( MYODBCDbgFile, "| " ); \
} \
- fprintf( MYODBCDbgFile, "[RETURN][%s][%s][%d]\n", __FILE__, __FUNCTION__,
__LINE__ ); \
+ fprintf( MYODBCDbgFile, "[RETURN][%s][%s][%d]\n", __FUNCTION__, __FILE__,
__LINE__ ); \
} \
- MYODBCDbgNest--; \
return ( A ); \
}
@@ -115,30 +115,30 @@
{ \
int nNest = 0; \
SQLRETURN nReturn_ = A; \
+ MYODBCDbgNest--; \
if ( MYODBCDbgOn && MYODBCDbgFile ) \
{ \
for ( nNest = 0; nNest < MYODBCDbgNest; nNest++ ) \
{ \
fprintf( MYODBCDbgFile, "| " ); \
} \
- fprintf( MYODBCDbgFile, "[RETURN][%s][%s][%d] %s\n", __FILE__, __FUNCTION__,
__LINE__, MYODBCDbgReturnString( nReturn_ ) ); \
+ fprintf( MYODBCDbgFile, "[RETURN][%s][%s][%d] %s\n", __FUNCTION__, __FILE__,
__LINE__, MYODBCDbgReturnString( nReturn_ ) ); \
} \
- MYODBCDbgNest--; \
return ( nReturn_ ); \
}
#define MYODBCDbgReturnVoid \
{ \
int nNest = 0; \
+ MYODBCDbgNest--; \
if ( MYODBCDbgOn && MYODBCDbgFile ) \
{ \
for ( nNest = 0; nNest < MYODBCDbgNest; nNest++ ) \
{ \
fprintf( MYODBCDbgFile, "| " ); \
} \
- fprintf( MYODBCDbgFile, "[RETURN][%s][%s][%d]\n", __FILE__, __FUNCTION__,
__LINE__ ); \
+ fprintf( MYODBCDbgFile, "[RETURN][%s][%s][%d]\n", __FUNCTION__, __FILE__,
__LINE__ ); \
} \
- MYODBCDbgNest--; \
}
#define MYODBCDbgInfo( A, B ) \
@@ -150,7 +150,7 @@
{ \
fprintf( MYODBCDbgFile, "| " ); \
} \
- fprintf( MYODBCDbgFile, "[INFO][%s][%s][%d]" A "\n", __FILE__, __FUNCTION__,
__LINE__, B ); \
+ fprintf( MYODBCDbgFile, "[INFO][%s][%s][%d]" A "\n", __FUNCTION__, __FILE__,
__LINE__, B ); \
} \
}
@@ -163,7 +163,7 @@
{ \
fprintf( MYODBCDbgFile, "| " ); \
} \
- fprintf( MYODBCDbgFile, "[WARNING][%s][%s][%d]" A "\n", __FILE__, __FUNCTION__,
__LINE__, B ); \
+ fprintf( MYODBCDbgFile, "[WARNING][%s][%s][%d]" A "\n", __FUNCTION__, __FILE__,
__LINE__, B ); \
} \
}
@@ -176,7 +176,7 @@
{ \
fprintf( MYODBCDbgFile, "| " ); \
} \
- fprintf( MYODBCDbgFile, "[ERROR][%s][%s][%d]" A "\n", __FILE__, __FUNCTION__,
__LINE__, B ); \
+ fprintf( MYODBCDbgFile, "[ERROR][%s][%s][%d]" A "\n", __FUNCTION__, __FILE__,
__LINE__, B ); \
} \
}
@@ -406,5 +406,6 @@
*/
const char *MYODBCDbgTransactionTypeString( SQLSMALLINT nType );
+
#endif
Modified: trunk/myodbc3/info.c
===================================================================
--- trunk/myodbc3/info.c 2006-10-07 21:07:10 UTC (rev 127)
+++ trunk/myodbc3/info.c 2006-10-07 22:27:40 UTC (rev 128)
@@ -110,6 +110,7 @@
MYODBCDbgEnter;
+ MYODBCDbgInfo( "fInfoType: %s", MYODBCDbgInfoTypeString( fInfoType ) );
MYODBCDbgInfo( "fInfoType: %d", fInfoType );
MYODBCDbgInfo( "rgbInfoValue: 0x%x", rgbInfoValue );
MYODBCDbgInfo( "cbInfoValueMax :%d", cbInfoValueMax );
@@ -875,7 +876,7 @@
MYODBCDbgReturnReturn(set_conn_error(hdbc,MYERR_S1C00,buff,4000));
}
}/* end of switch */
- MYODBCDbgReturnReturn(SQL_SUCCESS);
+ MYODBCDbgReturnReturn( SQL_SUCCESS );
}
Modified: trunk/myodbc3/options.c
===================================================================
--- trunk/myodbc3/options.c 2006-10-07 21:07:10 UTC (rev 127)
+++ trunk/myodbc3/options.c 2006-10-07 22:27:40 UTC (rev 128)
@@ -773,6 +773,9 @@
SQLRETURN result= SQL_SUCCESS;
MYODBCDbgEnter;
+ MYODBCDbgInfo( "hdbc: %p", hdbc );
+ MYODBCDbgInfo( "fOption: %s", MYODBCDbgConnectOptionString( fOption ) );
+ MYODBCDbgInfo( "fOption: %d", fOption );
result= set_con_attr(hdbc,fOption,(SQLPOINTER)vParam,SQL_NTS);
@@ -791,6 +794,9 @@
SQLRETURN result= SQL_SUCCESS;
MYODBCDbgEnter;
+ MYODBCDbgInfo( "hdbc: %p", hdbc );
+ MYODBCDbgInfo( "fOption: %s", MYODBCDbgConnectOptionString( fOption ) );
+ MYODBCDbgInfo( "fOption: %d", fOption );
result= get_con_attr(hdbc,fOption,vParam,SQL_NTS,(SQLINTEGER *)NULL);
@@ -810,6 +816,9 @@
SQLRETURN result= SQL_SUCCESS;
MYODBCDbgEnter;
+ MYODBCDbgInfo( "hstmt: %p", hstmt );
+ MYODBCDbgInfo( "fOption: %s", MYODBCDbgStmtOptionString( fOption ) );
+ MYODBCDbgInfo( "fOption: %d", fOption );
result= set_stmt_attr(hstmt,fOption,(SQLPOINTER)vParam,SQL_NTS);
@@ -828,6 +837,9 @@
SQLRETURN result= SQL_SUCCESS;
MYODBCDbgEnter;
+ MYODBCDbgInfo( "hstmt: %p", hstmt );
+ MYODBCDbgInfo( "fOption: %s", MYODBCDbgStmtOptionString( fOption ) );
+ MYODBCDbgInfo( "fOption: %d", fOption );
result= get_stmt_attr(hstmt,fOption,vParam,SQL_NTS,(SQLINTEGER *)NULL);
@@ -847,6 +859,8 @@
SQLINTEGER StringLength __attribute__((unused)))
{
MYODBCDbgEnter;
+ MYODBCDbgInfo( "henv: %p", henv );
+ MYODBCDbgInfo( "Atrr: %s", MYODBCDbgEnvAttrString( Attribute ) );
MYODBCDbgInfo( "Atrr: %d", Attribute );
MYODBCDbgInfo( "ValuePtr: 0x%lx", ValuePtr );
@@ -884,6 +898,8 @@
SQLINTEGER *StringLengthPtr __attribute__((unused)))
{
MYODBCDbgEnter;
+ MYODBCDbgInfo( "henv: %p", henv );
+ MYODBCDbgInfo( "Atrr: %s", MYODBCDbgEnvAttrString( Attribute ) );
MYODBCDbgInfo( "Atrr: %d", Attribute );
switch ( Attribute )
@@ -917,7 +933,11 @@
SQLPOINTER ValuePtr,
SQLINTEGER StringLength)
{
- return set_con_attr(hdbc,Attribute, ValuePtr,StringLength);
+ MYODBCDbgEnter;
+ MYODBCDbgInfo( "hdbc: %p", hdbc );
+ MYODBCDbgInfo( "Attribute: %s", MYODBCDbgConnectAttrString( Attribute ) );
+ MYODBCDbgInfo( "Attribute: %d", Attribute );
+ MYODBCDbgReturnReturn( set_con_attr(hdbc,Attribute, ValuePtr,StringLength) );
}
/*
@@ -931,8 +951,11 @@
SQLINTEGER BufferLength,
SQLINTEGER *StringLengthPtr)
{
- return get_con_attr(hdbc,Attribute, ValuePtr,BufferLength,
- StringLengthPtr);
+ MYODBCDbgEnter;
+ MYODBCDbgInfo( "hdbc: %p", hdbc );
+ MYODBCDbgInfo( "Attribute: %s", MYODBCDbgConnectAttrString( Attribute ) );
+ MYODBCDbgInfo( "Attribute: %d", Attribute );
+ MYODBCDbgReturnReturn( get_con_attr( hdbc,Attribute, ValuePtr,BufferLength,
StringLengthPtr ) );
}
/*
@@ -945,7 +968,11 @@
SQLPOINTER ValuePtr,
SQLINTEGER StringLength)
{
- return set_stmt_attr(hstmt, Attribute, ValuePtr, StringLength);
+ MYODBCDbgEnter;
+ MYODBCDbgInfo( "hstmt: %p", hstmt );
+ MYODBCDbgInfo( "Attribute: %s", MYODBCDbgStmtAttrString( Attribute ) );
+ MYODBCDbgInfo( "Attribute: %d", Attribute );
+ MYODBCDbgReturnReturn( set_stmt_attr( hstmt, Attribute, ValuePtr, StringLength ) );
}
/*
@@ -958,6 +985,9 @@
SQLINTEGER BufferLength,
SQLINTEGER *StringLengthPtr)
{
- return get_stmt_attr(hstmt,Attribute, ValuePtr,BufferLength,
- StringLengthPtr);
+ MYODBCDbgEnter;
+ MYODBCDbgInfo( "hstmt: %p", hstmt );
+ MYODBCDbgInfo( "Attribute: %s", MYODBCDbgStmtAttrString( Attribute ) );
+ MYODBCDbgInfo( "Attribute: %d", Attribute );
+ MYODBCDbgReturnReturn( get_stmt_attr( hstmt,Attribute, ValuePtr,BufferLength,
StringLengthPtr ) );
}
| Thread |
|---|
| • Connector/ODBC 3.51 commit: r128 - in trunk: MYODBCDbg/include myodbc3 | pharvey | 8 Oct |