Modified:
MYODBCDbg/MYODBCDbgLib/MYODBCDbgConnectAttrString.c
MYODBCDbg/include/MYODBCDbg.h
Makefile.am
myodbc3/execute.c
myodbc3S/MYODBCSetup.h
myodbc3u/MYODBCUtilReadConnectStr.c
Log:
- Changed to Unix EOL for two more files.
- Removed C++ "//" comments.
- Removed include of C++ "qglobal.h" from C,
not needed and breaks on some platforms.
- Added new files "MYODBC_CONF.h", "MYODBC_MYSQL.h"
and "MYODBC_ODBC.h" to the source distribution.
Modified: MYODBCDbg/MYODBCDbgLib/MYODBCDbgConnectAttrString.c
===================================================================
--- MYODBCDbg/MYODBCDbgLib/MYODBCDbgConnectAttrString.c 2006-09-02 17:11:14 UTC (rev 68)
+++ MYODBCDbg/MYODBCDbgLib/MYODBCDbgConnectAttrString.c 2006-09-02 23:54:51 UTC (rev 69)
@@ -1,74 +1,74 @@
-/*!
- \file MYODBCDbgConnectAttrString.c
- \author Peter Harvey <pharvey@stripped>
- Copyright (C) MySQL AB 2004-2005, Released under GPL.
- \version Connector/ODBC v3
- \date 2005
- \brief Code to provide debug information.
-
- \license Copyright (C) 2000-2005 MySQL AB
-
- 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
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- There are special exceptions to the terms and conditions of the GPL as it
- is applied to this software. View the full text of the exception in file
- EXCEPTIONS in the directory of this software distribution.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-#include "../include/MYODBCDbg.h"
-
-const char *MYODBCDbgConnectAttrString( SQLINTEGER nAttribute )
-{
-
- switch ( nAttribute )
- {
- case SQL_ATTR_ACCESS_MODE:
- return "SQL_ATTR_ACCESS_MODE";
- case SQL_ATTR_ASYNC_ENABLE:
- return "SQL_ATTR_ASYNC_ENABLE";
- case SQL_ATTR_AUTO_IPD:
- return "SQL_ATTR_AUTO_IPD";
- case SQL_ATTR_AUTOCOMMIT:
- return "SQL_ATTR_AUTOCOMMIT";
- case SQL_ATTR_CONNECTION_DEAD:
- return "SQL_ATTR_CONNECTION_DEAD";
- case SQL_ATTR_CONNECTION_TIMEOUT:
- return "SQL_ATTR_CONNECTION_TIMEOUT";
- case SQL_ATTR_CURRENT_CATALOG:
- return "SQL_ATTR_CURRENT_CATALOG";
- case SQL_ATTR_LOGIN_TIMEOUT:
- return "SQL_ATTR_LOGIN_TIMEOUT";
- case SQL_ATTR_METADATA_ID:
- return "SQL_ATTR_METADATA_ID";
- case SQL_ATTR_ODBC_CURSORS:
- return "SQL_ATTR_ODBC_CURSORS";
- case SQL_ATTR_PACKET_SIZE:
- return "SQL_ATTR_PACKET_SIZE";
- case SQL_ATTR_QUIET_MODE:
- return "SQL_ATTR_QUIET_MODE";
- case SQL_ATTR_TRACE:
- return "SQL_ATTR_TRACE";
- case SQL_ATTR_TRACEFILE:
- return "SQL_ATTR_TRACEFILE";
- case SQL_ATTR_TRANSLATE_LIB:
- return "SQL_ATTR_TRANSLATE_LIB";
- case SQL_ATTR_TRANSLATE_OPTION:
- return "SQL_ATTR_TRANSLATE_OPTION";
- case SQL_ATTR_TXN_ISOLATION:
- return "SQL_ATTR_TXN_ISOLATION";
- }
-
- return "unknown";
-}
-
+/*!
+ \file MYODBCDbgConnectAttrString.c
+ \author Peter Harvey <pharvey@stripped>
+ Copyright (C) MySQL AB 2004-2005, Released under GPL.
+ \version Connector/ODBC v3
+ \date 2005
+ \brief Code to provide debug information.
+
+ \license Copyright (C) 2000-2005 MySQL AB
+
+ 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
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ There are special exceptions to the terms and conditions of the GPL as it
+ is applied to this software. View the full text of the exception in file
+ EXCEPTIONS in the directory of this software distribution.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+#include "../include/MYODBCDbg.h"
+
+const char *MYODBCDbgConnectAttrString( SQLINTEGER nAttribute )
+{
+
+ switch ( nAttribute )
+ {
+ case SQL_ATTR_ACCESS_MODE:
+ return "SQL_ATTR_ACCESS_MODE";
+ case SQL_ATTR_ASYNC_ENABLE:
+ return "SQL_ATTR_ASYNC_ENABLE";
+ case SQL_ATTR_AUTO_IPD:
+ return "SQL_ATTR_AUTO_IPD";
+ case SQL_ATTR_AUTOCOMMIT:
+ return "SQL_ATTR_AUTOCOMMIT";
+ case SQL_ATTR_CONNECTION_DEAD:
+ return "SQL_ATTR_CONNECTION_DEAD";
+ case SQL_ATTR_CONNECTION_TIMEOUT:
+ return "SQL_ATTR_CONNECTION_TIMEOUT";
+ case SQL_ATTR_CURRENT_CATALOG:
+ return "SQL_ATTR_CURRENT_CATALOG";
+ case SQL_ATTR_LOGIN_TIMEOUT:
+ return "SQL_ATTR_LOGIN_TIMEOUT";
+ case SQL_ATTR_METADATA_ID:
+ return "SQL_ATTR_METADATA_ID";
+ case SQL_ATTR_ODBC_CURSORS:
+ return "SQL_ATTR_ODBC_CURSORS";
+ case SQL_ATTR_PACKET_SIZE:
+ return "SQL_ATTR_PACKET_SIZE";
+ case SQL_ATTR_QUIET_MODE:
+ return "SQL_ATTR_QUIET_MODE";
+ case SQL_ATTR_TRACE:
+ return "SQL_ATTR_TRACE";
+ case SQL_ATTR_TRACEFILE:
+ return "SQL_ATTR_TRACEFILE";
+ case SQL_ATTR_TRANSLATE_LIB:
+ return "SQL_ATTR_TRANSLATE_LIB";
+ case SQL_ATTR_TRANSLATE_OPTION:
+ return "SQL_ATTR_TRANSLATE_OPTION";
+ case SQL_ATTR_TXN_ISOLATION:
+ return "SQL_ATTR_TXN_ISOLATION";
+ }
+
+ return "unknown";
+}
+
Modified: MYODBCDbg/include/MYODBCDbg.h
===================================================================
--- MYODBCDbg/include/MYODBCDbg.h 2006-09-02 17:11:14 UTC (rev 68)
+++ MYODBCDbg/include/MYODBCDbg.h 2006-09-02 23:54:51 UTC (rev 69)
@@ -1,380 +1,380 @@
-/*!
- \file MYODBCDbg.h
- \author Peter Harvey <pharvey@stripped>
- Copyright (C) MySQL AB 2004-2005, Released under GPL.
- \version Connector/ODBC v3
- \date 2005
- \brief Code to provide debug information.
-
- \license Copyright (C) 2000-2005 MySQL AB
-
- 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
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- There are special exceptions to the terms and conditions of the GPL as it
- is applied to this software. View the full text of the exception in file
- EXCEPTIONS in the directory of this software distribution.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-#ifndef MYODBC_DBG_H
-#define MYODBC_DBG_H
-
-#include "../../MYODBC_MYSQL.h"
-#include "../../MYODBC_CONF.h"
-#include "../../MYODBC_ODBC.h"
-
-/*!
- \brief Returns a string version of a connection attribute.
-
- Returns a string version of a connection attribute. This is great for
- returning more readable debug output.
-
- \param nAttribute An connection attribute.
-
- \return A string constant describing nAttribute.
-
- \sa MYODBCDbgPrint
-*/
-const char *MYODBCDbgConnectAttrString( SQLINTEGER nAttribute );
-
-/*!
- \brief Returns a string version of a connection option.
-
- Returns a string version of a connection option (or statement attribute).
- This is great for returning more readable debug output.
-
- \param nOption A connection option.
-
- \return A string constant describing nOption.
-
- \sa MYODBCDbgPrint
-*/
-const char *MYODBCDbgConnectOptionString( SQLUSMALLINT nOption );
-
-/*!
- \brief Returns a string version of a diag field identifier.
-
- Returns a string version of a diag field identifier. This is great for
- returning more readable debug output.
-
- \param nDiagField A diag field identifier.
-
- \return A string constant describing nDiagField.
-
- \sa MYODBCDbgPrint
-*/
-const char *MYODBCDbgDiagFieldString( SQLSMALLINT nDiagField );
-
-/*!
- \brief Returns a string version of a environment attribute.
-
- Returns a string version of a environment attribute. This is great for
- returning more readable debug output.
-
- \param nAttribute An environment attribute.
-
- \return A string constant describing nAttribute.
-
- \sa MYODBCDbgPrint
-*/
-const char *MYODBCDbgEnvAttrString( SQLINTEGER nAttribute );
-
-
-/*!
- \brief Returns a string version of a function id.
-
- Returns a string version of a function id. This is great for
- returning more readable debug output.
-
- \param nFunction A function ID or SQL_API_ALL_FUNCTIONS, or
- SQL_API_ODBC3_ALL_FUNCTIONS.
-
- \return A string of the function ID.
-
- \sa MYODBCDbgPrint
-*/
-const char *MYODBCDbgFunctionsString( SQLUSMALLINT nFunction );
-
-/*!
- \brief Returns a string version of a handle type identifier.
-
- Returns a string version of a handle type identifier. This is great for
- returning more readable debug output.
-
- \param nHandleType A handle type identifier.
-
- \return A string constant describing nHandleType.
-
- \sa MYODBCDbgPrint
-*/
-const char *MYODBCDbgHandleTypeString( SQLSMALLINT nHandleType );
-
-/*!
- \brief Returns a string version of a info type identifier.
-
- Returns a string version of a info type identifier. This is great for
- returning more readable debug output.
-
- \param nInfoType A info type identifier.
-
- \return A string constant describing nInfoType.
-
- \sa MYODBCDbgPrint
-*/
-const char *MYODBCDbgInfoTypeString( SQLUSMALLINT nInfoType );
-
-/*!
- \brief Initializes debug output.
-
- Call this before using any of the MYODBCDbg functions.
-
- \sa MYODBCDbgPrint
- MYODBCDbgSetFile
-*/
-#ifdef DBUG_OFF
-#define MYODBCDbgInit
-#else
-#define MYODBCDbgInit \
-{ \
- char *psz = getenv( "MYODBC_LOG" ); \
- if ( psz && *psz ) \
- MYODBCDbgSetFile( psz ) \
-}
-#endif
-
-/*!
- \brief Returns a string version of the position type as found in SQLSetPos.
-
- Returns a string version of position type. This is great for
- returning more readable debug output.
-
- \param nType Position type as used by SQLSetPos.
-
- \return A string constant describing nType.
-
- \sa MYODBCDbgReturn
-*/
-const char *MYODBCDbgPosTypeString( SQLUSMALLINT nType );
-
-/*!
- \brief Returns a string version of SQLRETURN.
-
- Returns a string version of SQLRETURN. This is great for
- returning more readable debug output.
-
- \param ret A SQLRETURN value.
-
- \return A string constant describing ret.
-
- \sa MYODBCDbgReturn
-*/
-const char *MYODBCDbgReturnString( SQLRETURN nReturn );
-
-/*!
- \brief Returns a string version of a statement attribute.
-
- Returns a string version of a statement attribute. This is great for
- returning more readable debug output.
-
- \param nAttribute An statement attribute.
-
- \return A string constant describing nAttribute.
-
- \sa MYODBCDbgPrint
-*/
-const char *MYODBCDbgStmtAttrString( SQLINTEGER nAttribute );
-
-/*!
- \brief Returns a string version of a statement option.
-
- Returns a string version of a statement option. This is great for
- returning more readable debug output.
-
- \param nOption An statement option.
-
- \return A string constant describing nOption.
-
- \sa MYODBCDbgPrint
-*/
-const char *MYODBCDbgStmtOptionString( SQLUSMALLINT nOption );
-
-/*!
- \brief Returns a string version of a statement type as used by SQLFreeStmt.
-
- Returns a string version of a statement type. This is great for
- returning more readable debug output.
-
- \param nType A statement type as used for SQLFreeStmt.
-
- \return A string constant describing nType.
-
- \sa MYODBCDbgPrint
-*/
-const char *MYODBCDbgStmtTypeString( SQLUSMALLINT nType );
-
-/*!
- \brief Returns a string version of a transaction type as used by SQLEndTran.
-
- Returns a string version of a transaction type. This is great for
- returning more readable debug output.
-
- \param nType A transaction type as used for SQLEndTran.
-
- \return A string constant describing nType.
-
- \sa MYODBCDbgPrint
-*/
-const char *MYODBCDbgTransactionTypeString( SQLSMALLINT nType );
-
-/*!
- \brief Sets debug control information.
-
- Sets debug control information including filename for output.
-
- \note This has not effect if DBUG_OFF is set.
-
- \param pszControl This is a "const char *" which indicates the control
- information. Example;
-
- "d:t:S:O,/tmp/myodbc.log"
-
- \return void
-
- \sa MYODBCDbgInit
- MYODBCDbgFini
- MYODBCDbgPrint
-*/
-#define MYODBCDbgSetFile(A) \
-{ \
- DBUG_PUSH(A); \
- DBUG_PROCESS( "MYODBC" ); \
- MYODBCDbgPrint( "start", ( "Driver name: Connector/ODBC Version: %s", VERSION ) ); \
-}
-
-/*!
- \brief Inits debug for a function.
-
- This declares some working vars for dbg interface and logs that
- we have entered the function.
-
- \note This has not effect if DBUG_OFF is set.
-
- \param pszMsg This is a "const char *" which can be any message.
-
- \return void
-
- \sa MYODBCDbgInit
- MYODBCDbgFini
- MYODBCDbgPrint
- MYODBCDbgReturn
-*/
-#define MYODBCDbgEnter DBUG_ENTER
-
-/*!
- \brief Prints useful debug information.
-
- This processes the given keyword & argslist and prints the result
according
- to the debug control information.
-
- \note This has not effect if DBUG_OFF is set.
-
- \param keyword
- \param arglist
-
- \return void
-
- \sa MYODBCDbgInit
- MYODBCDbgFini
-*/
-#define MYODBCDbgPrint DBUG_PRINT
-
-/*!
- \brief Stops the debug.
-
- Stops the debug and frees resources allocated in MYODBCDbgInit.
-
- \note This has not effect if DBUG_OFF is set.
-
- \return void
-
- \sa MYODBCDbgInit
- MYODBCDbgFini
-*/
-#define MYODBCDbgFini {}
-
-/*!
- \brief Returns from a function.
-
- Prints that we are leaving a function and what the retval is.
-
- \note This has not effect if DBUG_OFF is set.
-
- \param SQLRETURN
-
- \return SQLRETURN
-
- \sa MYODBCDbgInit
- MYODBCDbgFini
- MYODBCDbgEnter
- MYODBCDbgReturn2
- MYODBCDbgReturn3
-*/
-#ifdef DBUG_OFF
-#define MYODBCDbgReturn(A) return (A);
-#else
-#define MYODBCDbgReturn(A) \
-{ \
- SQLRETURN rc= (A); \
- MYODBCDbgPrint("exit", ("%s", MYODBCDbgReturnString( rc )) ); \
- DBUG_RETURN( rc ); \
-}
-#endif
-
-const char *MYODBCDbgGetFileDefault();
-
-/*!
- \brief Returns from a function.
-
- Prints that we are leaving a function and what the retval is.
-
- \note This has not effect if DBUG_OFF is set.
-
- \param SQLRETURN
-
- \return SQLRETURN
-
- \sa MYODBCDbgInit
- MYODBCDbgFini
- MYODBCDbgEnter
- MYODBCDbgReturn
- MYODBCDbgReturn3
-*/
-#define MYODBCDbgReturn2 DBUG_RETURN
-
-/*!
- \brief Returns from a function.
-
- Prints that we are leaving a function.
-
- \note This has not effect if DBUG_OFF is set.
-
- \sa MYODBCDbgInit
- MYODBCDbgFini
- MYODBCDbgEnter
- MYODBCDbgReturn2
- MYODBCDbgReturn
-*/
-#define MYODBCDbgReturn3 DBUG_VOID_RETURN
-
-#endif
-
+/*!
+ \file MYODBCDbg.h
+ \author Peter Harvey <pharvey@stripped>
+ Copyright (C) MySQL AB 2004-2005, Released under GPL.
+ \version Connector/ODBC v3
+ \date 2005
+ \brief Code to provide debug information.
+
+ \license Copyright (C) 2000-2005 MySQL AB
+
+ 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
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ There are special exceptions to the terms and conditions of the GPL as it
+ is applied to this software. View the full text of the exception in file
+ EXCEPTIONS in the directory of this software distribution.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+#ifndef MYODBC_DBG_H
+#define MYODBC_DBG_H
+
+#include "../../MYODBC_MYSQL.h"
+#include "../../MYODBC_CONF.h"
+#include "../../MYODBC_ODBC.h"
+
+/*!
+ \brief Returns a string version of a connection attribute.
+
+ Returns a string version of a connection attribute. This is great for
+ returning more readable debug output.
+
+ \param nAttribute An connection attribute.
+
+ \return A string constant describing nAttribute.
+
+ \sa MYODBCDbgPrint
+*/
+const char *MYODBCDbgConnectAttrString( SQLINTEGER nAttribute );
+
+/*!
+ \brief Returns a string version of a connection option.
+
+ Returns a string version of a connection option (or statement attribute).
+ This is great for returning more readable debug output.
+
+ \param nOption A connection option.
+
+ \return A string constant describing nOption.
+
+ \sa MYODBCDbgPrint
+*/
+const char *MYODBCDbgConnectOptionString( SQLUSMALLINT nOption );
+
+/*!
+ \brief Returns a string version of a diag field identifier.
+
+ Returns a string version of a diag field identifier. This is great for
+ returning more readable debug output.
+
+ \param nDiagField A diag field identifier.
+
+ \return A string constant describing nDiagField.
+
+ \sa MYODBCDbgPrint
+*/
+const char *MYODBCDbgDiagFieldString( SQLSMALLINT nDiagField );
+
+/*!
+ \brief Returns a string version of a environment attribute.
+
+ Returns a string version of a environment attribute. This is great for
+ returning more readable debug output.
+
+ \param nAttribute An environment attribute.
+
+ \return A string constant describing nAttribute.
+
+ \sa MYODBCDbgPrint
+*/
+const char *MYODBCDbgEnvAttrString( SQLINTEGER nAttribute );
+
+
+/*!
+ \brief Returns a string version of a function id.
+
+ Returns a string version of a function id. This is great for
+ returning more readable debug output.
+
+ \param nFunction A function ID or SQL_API_ALL_FUNCTIONS, or
+ SQL_API_ODBC3_ALL_FUNCTIONS.
+
+ \return A string of the function ID.
+
+ \sa MYODBCDbgPrint
+*/
+const char *MYODBCDbgFunctionsString( SQLUSMALLINT nFunction );
+
+/*!
+ \brief Returns a string version of a handle type identifier.
+
+ Returns a string version of a handle type identifier. This is great for
+ returning more readable debug output.
+
+ \param nHandleType A handle type identifier.
+
+ \return A string constant describing nHandleType.
+
+ \sa MYODBCDbgPrint
+*/
+const char *MYODBCDbgHandleTypeString( SQLSMALLINT nHandleType );
+
+/*!
+ \brief Returns a string version of a info type identifier.
+
+ Returns a string version of a info type identifier. This is great for
+ returning more readable debug output.
+
+ \param nInfoType A info type identifier.
+
+ \return A string constant describing nInfoType.
+
+ \sa MYODBCDbgPrint
+*/
+const char *MYODBCDbgInfoTypeString( SQLUSMALLINT nInfoType );
+
+/*!
+ \brief Initializes debug output.
+
+ Call this before using any of the MYODBCDbg functions.
+
+ \sa MYODBCDbgPrint
+ MYODBCDbgSetFile
+*/
+#ifdef DBUG_OFF
+#define MYODBCDbgInit
+#else
+#define MYODBCDbgInit \
+{ \
+ char *psz = getenv( "MYODBC_LOG" ); \
+ if ( psz && *psz ) \
+ MYODBCDbgSetFile( psz ) \
+}
+#endif
+
+/*!
+ \brief Returns a string version of the position type as found in SQLSetPos.
+
+ Returns a string version of position type. This is great for
+ returning more readable debug output.
+
+ \param nType Position type as used by SQLSetPos.
+
+ \return A string constant describing nType.
+
+ \sa MYODBCDbgReturn
+*/
+const char *MYODBCDbgPosTypeString( SQLUSMALLINT nType );
+
+/*!
+ \brief Returns a string version of SQLRETURN.
+
+ Returns a string version of SQLRETURN. This is great for
+ returning more readable debug output.
+
+ \param ret A SQLRETURN value.
+
+ \return A string constant describing ret.
+
+ \sa MYODBCDbgReturn
+*/
+const char *MYODBCDbgReturnString( SQLRETURN nReturn );
+
+/*!
+ \brief Returns a string version of a statement attribute.
+
+ Returns a string version of a statement attribute. This is great for
+ returning more readable debug output.
+
+ \param nAttribute An statement attribute.
+
+ \return A string constant describing nAttribute.
+
+ \sa MYODBCDbgPrint
+*/
+const char *MYODBCDbgStmtAttrString( SQLINTEGER nAttribute );
+
+/*!
+ \brief Returns a string version of a statement option.
+
+ Returns a string version of a statement option. This is great for
+ returning more readable debug output.
+
+ \param nOption An statement option.
+
+ \return A string constant describing nOption.
+
+ \sa MYODBCDbgPrint
+*/
+const char *MYODBCDbgStmtOptionString( SQLUSMALLINT nOption );
+
+/*!
+ \brief Returns a string version of a statement type as used by SQLFreeStmt.
+
+ Returns a string version of a statement type. This is great for
+ returning more readable debug output.
+
+ \param nType A statement type as used for SQLFreeStmt.
+
+ \return A string constant describing nType.
+
+ \sa MYODBCDbgPrint
+*/
+const char *MYODBCDbgStmtTypeString( SQLUSMALLINT nType );
+
+/*!
+ \brief Returns a string version of a transaction type as used by SQLEndTran.
+
+ Returns a string version of a transaction type. This is great for
+ returning more readable debug output.
+
+ \param nType A transaction type as used for SQLEndTran.
+
+ \return A string constant describing nType.
+
+ \sa MYODBCDbgPrint
+*/
+const char *MYODBCDbgTransactionTypeString( SQLSMALLINT nType );
+
+/*!
+ \brief Sets debug control information.
+
+ Sets debug control information including filename for output.
+
+ \note This has not effect if DBUG_OFF is set.
+
+ \param pszControl This is a "const char *" which indicates the control
+ information. Example;
+
+ "d:t:S:O,/tmp/myodbc.log"
+
+ \return void
+
+ \sa MYODBCDbgInit
+ MYODBCDbgFini
+ MYODBCDbgPrint
+*/
+#define MYODBCDbgSetFile(A) \
+{ \
+ DBUG_PUSH(A); \
+ DBUG_PROCESS( "MYODBC" ); \
+ MYODBCDbgPrint( "start", ( "Driver name: Connector/ODBC Version: %s", VERSION ) ); \
+}
+
+/*!
+ \brief Inits debug for a function.
+
+ This declares some working vars for dbg interface and logs that
+ we have entered the function.
+
+ \note This has not effect if DBUG_OFF is set.
+
+ \param pszMsg This is a "const char *" which can be any message.
+
+ \return void
+
+ \sa MYODBCDbgInit
+ MYODBCDbgFini
+ MYODBCDbgPrint
+ MYODBCDbgReturn
+*/
+#define MYODBCDbgEnter DBUG_ENTER
+
+/*!
+ \brief Prints useful debug information.
+
+ This processes the given keyword & argslist and prints the result
according
+ to the debug control information.
+
+ \note This has not effect if DBUG_OFF is set.
+
+ \param keyword
+ \param arglist
+
+ \return void
+
+ \sa MYODBCDbgInit
+ MYODBCDbgFini
+*/
+#define MYODBCDbgPrint DBUG_PRINT
+
+/*!
+ \brief Stops the debug.
+
+ Stops the debug and frees resources allocated in MYODBCDbgInit.
+
+ \note This has not effect if DBUG_OFF is set.
+
+ \return void
+
+ \sa MYODBCDbgInit
+ MYODBCDbgFini
+*/
+#define MYODBCDbgFini {}
+
+/*!
+ \brief Returns from a function.
+
+ Prints that we are leaving a function and what the retval is.
+
+ \note This has not effect if DBUG_OFF is set.
+
+ \param SQLRETURN
+
+ \return SQLRETURN
+
+ \sa MYODBCDbgInit
+ MYODBCDbgFini
+ MYODBCDbgEnter
+ MYODBCDbgReturn2
+ MYODBCDbgReturn3
+*/
+#ifdef DBUG_OFF
+#define MYODBCDbgReturn(A) return (A);
+#else
+#define MYODBCDbgReturn(A) \
+{ \
+ SQLRETURN rc= (A); \
+ MYODBCDbgPrint("exit", ("%s", MYODBCDbgReturnString( rc )) ); \
+ DBUG_RETURN( rc ); \
+}
+#endif
+
+const char *MYODBCDbgGetFileDefault();
+
+/*!
+ \brief Returns from a function.
+
+ Prints that we are leaving a function and what the retval is.
+
+ \note This has not effect if DBUG_OFF is set.
+
+ \param SQLRETURN
+
+ \return SQLRETURN
+
+ \sa MYODBCDbgInit
+ MYODBCDbgFini
+ MYODBCDbgEnter
+ MYODBCDbgReturn
+ MYODBCDbgReturn3
+*/
+#define MYODBCDbgReturn2 DBUG_RETURN
+
+/*!
+ \brief Returns from a function.
+
+ Prints that we are leaving a function.
+
+ \note This has not effect if DBUG_OFF is set.
+
+ \sa MYODBCDbgInit
+ MYODBCDbgFini
+ MYODBCDbgEnter
+ MYODBCDbgReturn2
+ MYODBCDbgReturn
+*/
+#define MYODBCDbgReturn3 DBUG_VOID_RETURN
+
+#endif
+
Modified: Makefile.am
===================================================================
--- Makefile.am 2006-09-02 17:11:14 UTC (rev 68)
+++ Makefile.am 2006-09-02 23:54:51 UTC (rev 69)
@@ -117,6 +117,9 @@
odbc.pri \
resource.h \
VersionInfo.h \
+ MYODBC_CONF.h \
+ MYODBC_MYSQL.h \
+ MYODBC_ODBC.h \
mysql.bmp \
Build.sh \
Build.bat \
Modified: myodbc3/execute.c
===================================================================
--- myodbc3/execute.c 2006-09-02 17:11:14 UTC (rev 68)
+++ myodbc3/execute.c 2006-09-02 23:54:51 UTC (rev 69)
@@ -397,7 +397,7 @@
if ( param->SqlType != SQL_NUMERIC && param->SqlType !=
SQL_DECIMAL )
sprintf(buff,"%.17e",*((float*) data));
else
- // We should perpare this data for string comparison
+ /* We should perpare this data for string comparison */
sprintf(buff,"%.15e",*((float*) data));
length= strlen(data= buff);
break;
@@ -405,7 +405,7 @@
if ( param->SqlType != SQL_NUMERIC && param->SqlType !=
SQL_DECIMAL )
sprintf(buff,"%.17e",*((double*) data));
else
- // We should perpare this data for string comparison
+ /* We should perpare this data for string comparison */
sprintf(buff,"%.15e",*((double*) data));
length= strlen(data= buff);
break;
Modified: myodbc3S/MYODBCSetup.h
===================================================================
--- myodbc3S/MYODBCSetup.h 2006-09-02 17:11:14 UTC (rev 68)
+++ myodbc3S/MYODBCSetup.h 2006-09-02 23:54:51 UTC (rev 69)
@@ -21,8 +21,6 @@
#ifndef MYODBCSETUP_H
#define MYODBCSETUP_H
-#include <qglobal.h>
-
#include "../myodbc3u/MYODBCUtil.h"
#ifdef __cplusplus
Modified: myodbc3u/MYODBCUtilReadConnectStr.c
===================================================================
--- myodbc3u/MYODBCUtilReadConnectStr.c 2006-09-02 17:11:14 UTC (rev 68)
+++ myodbc3u/MYODBCUtilReadConnectStr.c 2006-09-02 23:54:51 UTC (rev 69)
@@ -61,7 +61,7 @@
{
if ( (!isalpha( *pScanChar ) && !isdigit( *pScanChar )
&& *pScanChar != '}') || *pScanChar == '=' )
{
- // To prevent a memory leak when use such connection strings
UID=root;PWD=;SERVER=localhost;...
+ /* To prevent a memory leak when use such connection strings
UID=root;PWD=;SERVER=localhost;... */
if( pszName )
free( pszName );
pszName = (char *)strndup( pAnchorChar, pScanChar - pAnchorChar
);
| Thread |
|---|
| • Connector/ODBC 3.51 commit: r69 - / MYODBCDbg/MYODBCDbgLib MYODBCDbg/include myodbc3 myodbc3S myodbc3u | mysqldev | 3 Sep |