Added:
README.debug
Modified:
ChangeLog
README
connector-odbc3.vpj
myodbc3/results.c
test/dyn_cursor/my_dyn_cursor.c
test/keys/my_keys.c
Log:
- reverted back to v4.1.x
- still - some postbuild tests failing (working on them)
- created some debug doc
Modified: ChangeLog
===================================================================
--- ChangeLog 2006-03-03 12:19:55 UTC (rev 41)
+++ ChangeLog 2006-03-06 00:56:46 UTC (rev 42)
@@ -10,7 +10,7 @@
-- fixed the windows-specifie problem with GUI and SQL_DRIVER_PROMPT
-- fixed issue with numeric/decimal rounding
-- improved post-build/smoke tests
--- release made with MySQL 5.0.18
+-- release made with MySQL 4.1.18
-- added ODBC Browser
-- fixed issue with SQLDriverConnect
-- fixed memory leak in SQLDriverConnect()
Modified: README
===================================================================
--- README 2006-03-03 12:19:55 UTC (rev 41)
+++ README 2006-03-06 00:56:46 UTC (rev 42)
@@ -1,6 +1,6 @@
+-------------------------------------------------------------+
-| MySQL Connector/ODBC 3.51 |
-| (C) Copyright MySQL AB 1995-2006 |
+| Connector/ODBC |
+| README |
+-------------------------------------------------------------+
INTRODUCTION
Added: README.debug
===================================================================
--- README.debug 2006-03-03 12:19:55 UTC (rev 41)
+++ README.debug 2006-03-06 00:56:46 UTC (rev 42)
@@ -0,0 +1,142 @@
++-------------------------------------------------------------+
+| Connector/ODBC |
+| Debug |
++-------------------------------------------------------------+
+
+
+INTRODUCTION
+---------------------------------------------------------------
+
+This brief document describes some methods to debug a problem
+in the driver - it is hoped to be useful to experienced
+programmers - particularly driver developers.
+
+Debugging the driver can be done in a number of ways but is
+not usually done by stepping through the source code in debug
+mode of gdb or an IDE for example. The most common method is to
+get the driver manager, the driver (or both) to produce trace
+information showing the calls being made, the return codes and
+other useful information.
+
+
+COMPILER DEBUG INFORMATION
+---------------------------------------------------------------
+
+As usual; the driver can be built with or without compiler
+generated debugging information. In practice; this is not the
+most common method to debug problems with the driver.
+
+This is independent of any of the trace options listed here.
+
+
+ODBC TRACE
+---------------------------------------------------------------
+
+If you are using a Driver Manager (DM) - and most people do -
+then you can turn on ODBC Trace. An ODBC Trace will produce a
+file which shows all of the ODBC calls being made and some very
+useful details.
+
+ODBC Trace is particularly useful to see the interaction between
+the application and the DM. In some cases an application may be
+using software layered on top of ODBC (ADO for example) and in
+this case ODBC Trace is the best way to see how that intermediate
+layer is interacting with ODBC.
+
+ODBC Trace can be turned on/off using the ODBC Administrator.
+
+MS Windows
+----------
+
+Invoke the ODBC Administrator from the Start menu;
+
+Start -> Control Panel -> Administrative Tools -> ODBC Administrator
+
+Use the options on the Trace tab to turn tracing on/off.
+
+NOTE: You should close the ODBC Administrator program to ensure
+ that the changes have taken affect - Apply/Ok is not always
+ enough.
+
+unixODBC
+--------
+
+Invoke the ODBCConfig GUI. This can be done from the command-line
+in a shell. Turn ODBC Trace on/off and close the application.
+
+
+DRIVER TRACE
+---------------------------------------------------------------
+
+Connector/ODBC is capable of producing a trace of its own. This
+trace is similar to the ODBC Trace but reflects the requests
+actually being made to the driver. This may reveal unexpected
+mappings between the calls to the DM and the DM's calls to the
+driver. The driver trace is also most capapble of showing details
+about what the driver is doing to meet the requests made upon it.
+
+A driver trace can be used with or without the use of a DM. This
+is of particular interest to applications which link directly to
+the driver but is also very useful complement to the ODBC Trace.
+
+The following settings affect the behaviour of the driver trace;
+
+DBUG_OFF
+--------
+
+This compiler definition indicates whether or not we
+want to include trace options in the resulting binaries. This
+feature is turned on by default - passing/defining DBUG_OFF to
+the compiler turns this feature off. Turning it off may make the
+driver perform a little bit faster.
+
+FLAG_DEBUG
+----------
+
+This is a DSN config option which can be set to turn on trace
+output. This does nothing if DBUG_OFF has been set. The location
+of the trace output is dependent upon MYODBC_LOG.
+
+MYODBC_LOG
+----------
+
+This environment variable, if set, will be used to
+set format information and file location/name for the trace
+output. For example; "d:t:S:O,c::\\myodbc.log". The following
+defaults are used;
+
+ WIN : "d:t:S:O,c::\\myodbc.log"
+ UNIX: "d:t:S:O,/tmp/myodbc.log"
+
+FLAG_LOG_QUERY
+--------------
+
+This is a DSN config option which can be set to turn on feature
+to log queries to a file.
+
+This does nothing if DBUG_OFF has been set. The location
+of the trace output is dependent upon DRIVER_QUERY_LOGFILE.
+
+DRIVER_QUERY_LOGFILE
+--------------------
+
+This is a hardcoded file location/name for the query log.
+
+ WIN : "c:\\myodbc.sql"
+ UNIX: "/tmp/myodbc.sql"
+
+
+SUMMARY
+---------------------------------------------------------------
+
+Your priorities in generating useful information for debugging
+a problem using Connector/ODBC;
+
+1. ODBC Trace
+2. Driver Trace
+
+
++-------------------------------------------------------------+
+| Peter Harvey <pharvey@stripped |
++-------------------------------------------------------------+
+
Modified: connector-odbc3.vpj
===================================================================
--- connector-odbc3.vpj 2006-03-03 12:19:55 UTC (rev 41)
+++ connector-odbc3.vpj 2006-03-06 00:56:46 UTC (rev 42)
@@ -102,6 +102,7 @@
<F N="PostBuildTest.bat"/>
<F N="qt.m4"/>
<F N="README"/>
+ <F N="README.debug"/>
<F N="README.dist"/>
<F N="root.pro"/>
<F N="Uninstall.bat"/>
Modified: myodbc3/results.c
===================================================================
--- myodbc3/results.c 2006-03-03 12:19:55 UTC (rev 41)
+++ myodbc3/results.c 2006-03-06 00:56:46 UTC (rev 42)
@@ -1163,8 +1163,7 @@
break;
default:
- MYODBCDbgReturn(set_error(stmt,MYERR_S1106,"Fetch type out of range",
- 0));
+ MYODBCDbgReturn( set_error( stmt, MYERR_S1106, "Fetch type out of range", 0 )
);
}
if ( cur_row < 0 )
Modified: test/dyn_cursor/my_dyn_cursor.c
===================================================================
--- test/dyn_cursor/my_dyn_cursor.c 2006-03-03 12:19:55 UTC (rev 41)
+++ test/dyn_cursor/my_dyn_cursor.c 2006-03-06 00:56:46 UTC (rev 42)
@@ -310,6 +310,7 @@
SQLINTEGER nlen;
SQLCHAR szData[255]={0};
+ /* INIT */
SQLExecDirect(hstmt,"drop table setpos_delete_ignore",SQL_NTS);
rc = SQLExecDirect(hstmt,"create table setpos_delete_ignore(col1 int, col2
varchar(30))",SQL_NTS);
mystmt(hstmt,rc);
@@ -338,33 +339,43 @@
rc = SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_ARRAY_SIZE ,(SQLPOINTER)1 , 0);
mystmt(hstmt, rc);
+ /* DELETE ALL ROWS */
rc = SQLExecDirect(hstmt,"select col2 from setpos_delete_ignore",SQL_NTS);
mystmt(hstmt,rc);
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
rc = SQLBindCol(hstmt,1,SQL_C_CHAR,szData,100,&nlen);
mystmt(hstmt,rc);
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
rc = SQLExtendedFetch(hstmt,SQL_FETCH_ABSOLUTE,2,NULL,NULL);
mystmt(hstmt,rc);
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
strcpy(szData,"mysql2");
-
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
rc = SQLSetPos(hstmt,0,SQL_DELETE,SQL_LOCK_NO_CHANGE);
mystmt(hstmt,rc);
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
rc = SQLRowCount(hstmt,&nlen);
mystmt(hstmt,rc);
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
printMessage(" rows affected:%d\n",nlen);
+ /* FINI */
rc = SQLFreeStmt(hstmt,SQL_UNBIND);
mystmt(hstmt,rc);
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
rc = SQLFreeStmt(hstmt,SQL_CLOSE);
mystmt(hstmt,rc);
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
rc = SQLExecDirect(hstmt,"select * from setpos_delete_ignore",SQL_NTS);
mystmt(hstmt,rc);
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
myassert(3 == myresult(hstmt));
@@ -1030,16 +1041,27 @@
mydrvconnect(&henv,&hdbc,&hstmt,conn);
if (driver_supports_setpos(hdbc))
{
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
my_setpos_delete_ignore(hdbc,hstmt);
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
my_setpos_update_ignore(hdbc,hstmt);
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
my_setpos_update_ignore1(hdbc,hstmt);
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
my_position(hdbc,hstmt);
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
my_position1(hdbc,hstmt);
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
my_zero_irow_update(hdbc,hstmt);
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
my_zero_irow_delete(hdbc,hstmt);
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
my_dynamic_pos_cursor1(hdbc,hstmt);
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
my_dynamic_cursor(hdbc,hstmt);
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
my_dynamic_pos_cursor(hdbc,hstmt);
+printf( "\n[PAH][%s][%d]\n", __FILE__, __LINE__ );
}
mydisconnect(&henv,&hdbc,&hstmt);
Modified: test/keys/my_keys.c
===================================================================
--- test/keys/my_keys.c 2006-03-03 12:19:55 UTC (rev 41)
+++ test/keys/my_keys.c 2006-03-06 00:56:46 UTC (rev 42)
@@ -423,6 +423,7 @@
SQLRETURN rc;
SQLINTEGER nData,rowcount;
+ /* INIT */
SQLExecDirect(hstmt,"drop table my_no_keys",SQL_NTS);
rc = SQLExecDirect(hstmt,"create table my_no_keys(col1 int,\
col2 varchar(30),\
@@ -454,6 +455,7 @@
rc = SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_ARRAY_SIZE ,(SQLPOINTER)1 , 0);
mystmt(hstmt, rc);
+ /* UPDATE ROW[2]COL[4] */
rc = SQLExecDirect(hstmt,"select col4 from my_no_keys",SQL_NTS);
mystmt(hstmt,rc);
@@ -465,7 +467,7 @@
nData = 999;
- rc = SQLSetPos(hstmt,0,SQL_UPDATE,SQL_LOCK_NO_CHANGE);
+ rc = SQLSetPos(hstmt,2,SQL_UPDATE,SQL_LOCK_NO_CHANGE);
mystmt(hstmt,rc);
rc = SQLRowCount(hstmt,&rowcount);
@@ -800,7 +802,6 @@
NULL, SQL_NTS); /*FK TABLE*/
mystmt(hstmt,rc);
/* myassert(9 == myresult(hstmt)); */
-printf( "[PAH][%s][%d] %d\n", __FILE__, __LINE__, myresult(hstmt) );
printMessage("\n WITH ONLY FK OPTION");
rc = SQLForeignKeys(hstmt,
@@ -823,7 +824,6 @@
"test_fkey_c1", SQL_NTS);
mystmt(hstmt,rc);
/* myassert(15 == myresult(hstmt)); */
-printf( "[PAH][%s][%d] %d\n", __FILE__, __LINE__, myresult(hstmt) );
printMessage("\n WITH ONLY FK OPTION");
rc = SQLForeignKeys(hstmt,
@@ -835,7 +835,6 @@
"test_fkey2", SQL_NTS);
mystmt(hstmt,rc);
/* myassert(3 == myresult(hstmt)); */
-printf( "[PAH][%s][%d] %d\n", __FILE__, __LINE__, myresult(hstmt) );
printMessage("\n WITH ONLY PK OPTION");
rc = SQLForeignKeys(hstmt,
@@ -847,7 +846,6 @@
NULL, SQL_NTS);
mystmt(hstmt,rc);
/* myassert(11 == myresult(hstmt)); */
-printf( "[PAH][%s][%d] %d\n", __FILE__, __LINE__, myresult(hstmt) );
printMessage("\n WITH ONLY PK OPTION");
rc = SQLForeignKeys(hstmt,
| Thread |
|---|
| • Connector/ODBC 3.51 commit: r42 - / myodbc3 test/dyn_cursor test/keys | pharvey | 6 Mar |