Removed:
test/include/my_utility.h
Modified:
test/basics/basics.pro
test/blob/blob.pro
test/bulk/bulk.pro
test/catalog/catalog.pro
test/col_length/col_length.pro
test/connect/connect.pro
test/curext/curext.pro
test/cursor/cursor.pro
test/dyn_cursor/dyn_cursor.pro
test/error/error.pro
test/include/mytest3.h
test/keys/keys.pro
test/param/param.pro
test/position/position.pro
test/relative/relative.pro
test/result/result.pro
test/scroll/scroll.pro
test/test.vpj
test/test32/test32.pro
test/timestamp/timestamp.pro
test/tran/tran.pro
test/tran_ext/tran_ext.pro
test/unixodbc/unixodbc.pro
test/use_result/use_result.pro
Log:
work to improve post-build tests
Modified: test/basics/basics.pro
===================================================================
--- test/basics/basics.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/basics/basics.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/blob/blob.pro
===================================================================
--- test/blob/blob.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/blob/blob.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/bulk/bulk.pro
===================================================================
--- test/bulk/bulk.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/bulk/bulk.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/catalog/catalog.pro
===================================================================
--- test/catalog/catalog.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/catalog/catalog.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/col_length/col_length.pro
===================================================================
--- test/col_length/col_length.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/col_length/col_length.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/connect/connect.pro
===================================================================
--- test/connect/connect.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/connect/connect.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/curext/curext.pro
===================================================================
--- test/curext/curext.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/curext/curext.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/cursor/cursor.pro
===================================================================
--- test/cursor/cursor.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/cursor/cursor.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/dyn_cursor/dyn_cursor.pro
===================================================================
--- test/dyn_cursor/dyn_cursor.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/dyn_cursor/dyn_cursor.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/error/error.pro
===================================================================
--- test/error/error.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/error/error.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Deleted: test/include/my_utility.h
===================================================================
--- test/include/my_utility.h 2006-03-01 06:46:29 UTC (rev 38)
+++ test/include/my_utility.h 2006-03-03 09:30:12 UTC (rev 39)
@@ -1,179 +0,0 @@
-/***************************************************************************
- my_utility.h - description
- -------------------
- begin : Fri Nov 2 2001
- copyright : (C) MySQL AB 1995-2002, www.mysql.com
- author : venu ( venu@stripped )
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * MySQL ODBC 3.51 Driver - samples utility header *
- * *
- ***************************************************************************/
-
-#ifndef __TMYODBC_UTILITY_H__
-#define __TMYODBC_UTILITY_H__
-
-#ifdef HAVE_CONFIG_H
- #include <myconf.h>
-#endif
-
-#ifdef WIN32
- #include <windows.h>
-#endif
-
-/* STANDARD C HEADERS */
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-
-/* ODBC HEADERS */
-#include <sql.h>
-#include <sqlext.h>
-
-#ifndef NULL
- #define NULL 0
-#endif
-
-#ifndef ushort
- #define ushort unsigned short
-#endif
-
-#ifndef bool
- #define bool unsigned char
-#endif
-
-#ifndef true
- #define true 1
-#endif
-
-#ifndef false
- #define false 0
-#endif
-
-#define MAX_NAME_LEN 95
-#define MAX_COLUMNS 255
-#define MAX_ROW_DATA_LEN 255
-
-SQLCHAR *mydsn = "myodbc3";
-SQLCHAR *myuid = "root";
-SQLCHAR *mypwd = "";
-
-/* PROTOTYPE */
-void myerror(SQLRETURN rc,SQLSMALLINT htype, SQLHANDLE handle);
-
-/* UTILITY MACROS */
-#define myenv(henv,r) \
- if ( ((r) != SQL_SUCCESS) ) \
- myerror(r, 1,henv); \
- assert( ((r) == SQL_SUCCESS) || ((r) == SQL_SUCCESS_WITH_INFO) )
-
-#define myenv_err(henv,r,rc) \
- if ( rc == SQL_ERROR || rc == SQL_SUCCESS_WITH_INFO ) \
- myerror(rc, 1, henv); \
- assert( r )
-
-#define mycon(hdbc,r) \
- if ( ((r) != SQL_SUCCESS) ) \
- myerror(r, 2, hdbc); \
- assert( ((r) == SQL_SUCCESS) || ((r) == SQL_SUCCESS_WITH_INFO) )
-
-#define mycon_err(hdbc,r,rc) \
- if ( rc == SQL_ERROR || rc == SQL_SUCCESS_WITH_INFO ) \
- myerror(rc, 2, hdbc); \
- assert( r )
-
-#define mystmt(hstmt,r) \
- if ( ((r) != SQL_SUCCESS) ) \
- myerror(r, 3, hstmt); \
- assert( ((r) == SQL_SUCCESS) || ((r) == SQL_SUCCESS_WITH_INFO) )
-
-#define mystmt_err(hstmt,r,rc) \
- if ( rc == SQL_ERROR || rc == SQL_SUCCESS_WITH_INFO ) \
- myerror(rc, 3, hstmt); \
- assert( r )
-
-/********************************************************
-* MyODBC 3.51 error handler *
-*********************************************************/
-void myerror(SQLRETURN rc, SQLSMALLINT htype, SQLHANDLE handle)
-{
- SQLRETURN lrc;
-
- if ( rc == SQL_ERROR || rc == SQL_SUCCESS_WITH_INFO )
- {
- SQLCHAR szSqlState[6],szErrorMsg[SQL_MAX_MESSAGE_LENGTH];
- SQLINTEGER pfNativeError;
- SQLSMALLINT pcbErrorMsg;
-
- lrc = SQLGetDiagRec(htype, handle,1,
- (SQLCHAR *)&szSqlState,
- (SQLINTEGER *)&pfNativeError,
- (SQLCHAR *)&szErrorMsg,
- SQL_MAX_MESSAGE_LENGTH-1,
- (SQLSMALLINT *)&pcbErrorMsg);
- if (lrc == SQL_SUCCESS || lrc == SQL_SUCCESS_WITH_INFO)
- printf("\n [%s][%d:%s]\n",szSqlState,pfNativeError,szErrorMsg);
- }
-}
-
-/********************************************************
-* MyODBC 3.51 connection handler *
-*********************************************************/
-void myconnect(SQLHENV *henv,SQLHDBC *hdbc, SQLHSTMT *hstmt)
-{
- SQLRETURN rc;
-
- rc = SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,henv);
- myenv(*henv,rc);
-
- rc = SQLSetEnvAttr(*henv,SQL_ATTR_ODBC_VERSION,(SQLPOINTER)SQL_OV_ODBC3,0);
- myenv(*henv,rc);
-
- rc = SQLAllocHandle(SQL_HANDLE_DBC,*henv, hdbc);
- myenv(*henv,rc);
-
- printMessage(" connecting to '%s' with user name '%s'...\n",mydsn,myuid);
- rc = SQLConnect(*hdbc, mydsn, SQL_NTS, myuid, SQL_NTS, mypwd, SQL_NTS);
- mycon(*hdbc,rc);
-
- rc = SQLSetConnectAttr(*hdbc,SQL_ATTR_AUTOCOMMIT,(SQLPOINTER)SQL_AUTOCOMMIT_ON,0);
- mycon(*hdbc,rc);
-
- rc = SQLAllocHandle(SQL_HANDLE_STMT,*hdbc,hstmt);
- mycon(*hdbc,rc);
-}
-
-/********************************************************
-* MyODBC 3.51 closes the connection *
-*********************************************************/
-void mydisconnect(SQLHENV *henv,SQLHDBC *hdbc, SQLHSTMT *hstmt)
-{
- SQLRETURN rc;
-
- rc = SQLFreeStmt(*hstmt, SQL_DROP);
- mystmt(*hstmt,rc);
-
- rc = SQLDisconnect(*hdbc);
- mycon(*hdbc,rc);
-
- rc = SQLFreeConnect(*hdbc);
- mycon(*hdbc,rc);
-
- rc = SQLFreeEnv(*henv);
- myenv(*henv,rc);
-}
-
-#endif /* __TMYODBC_UTILITY_H__ */
-
-
Modified: test/include/mytest3.h
===================================================================
--- test/include/mytest3.h 2006-03-01 06:46:29 UTC (rev 38)
+++ test/include/mytest3.h 2006-03-03 09:30:12 UTC (rev 39)
@@ -99,7 +99,7 @@
};
/* PROTOTYPE */
-void myerror(SQLRETURN rc,SQLSMALLINT htype, SQLHANDLE handle);
+void myerror( SQLRETURN rc, SQLSMALLINT htype, SQLHANDLE handle, const char *szFile, int
nLine );
#define my_error() fprintf(stdout," ERROR occured at %d@%s\n",__LINE__,__FILE__)
@@ -108,47 +108,47 @@
/* UTILITY MACROS */
#define myenv(henv,r) \
if ( ((r) != SQL_SUCCESS) ) \
- myerror(r, 1,henv); \
+ myerror( r, 1, henv, __FILE__, __LINE__ ); \
my_assert( ((r) == SQL_SUCCESS) || ((r) == SQL_SUCCESS_WITH_INFO) )
#define myenv_r(henv,r) \
if ( r == SQL_ERROR ) \
- myerror(r, 1, henv); \
+ myerror( r, 1, henv, __FILE__, __LINE__ ); \
my_assert( r == SQL_ERROR )
#define myenv_err(henv,r,rc) \
if ( rc == SQL_ERROR || rc == SQL_SUCCESS_WITH_INFO ) \
- myerror(rc, 1, henv); \
+ myerror( rc, 1, henv, __FILE__, __LINE__ ); \
my_assert( r )
#define mycon(hdbc,r) \
if ( ((r) != SQL_SUCCESS) ) \
- myerror(r, 2, hdbc); \
+ myerror( r, 2, hdbc, __FILE__, __LINE__ ); \
my_assert( ((r) == SQL_SUCCESS) || ((r) == SQL_SUCCESS_WITH_INFO) )
#define mycon_r(hdbc,r) \
if ( r == SQL_ERROR ) \
- myerror(r, 2, hdbc); \
+ myerror( r, 2, hdbc, __FILE__, __LINE__ ); \
my_assert(rc==SQL_ERROR)
#define mycon_err(hdbc,r,rc) \
if ( rc == SQL_ERROR || rc == SQL_SUCCESS_WITH_INFO ) \
- myerror(rc, 2, hdbc); \
+ myerror( rc, 2, hdbc, __FILE__, __LINE__ ); \
my_assert( r )
#define mystmt(hstmt,r) \
if ( ((r) != SQL_SUCCESS) ) \
- myerror(r, 3, hstmt); \
+ myerror( r, 3, hstmt, __FILE__, __LINE__ ); \
my_assert( ((r) == SQL_SUCCESS) || ((r) == SQL_SUCCESS_WITH_INFO) )
#define mystmt_r(hstmt,r) \
if ( r == SQL_ERROR ) \
- myerror(r, 3, hstmt); \
+ myerror( r, 3, hstmt, __FILE__, __LINE__ ); \
my_assert( r == SQL_ERROR )
#define mystmt_err(hstmt,r,rc) \
if ( rc == SQL_ERROR || rc == SQL_SUCCESS_WITH_INFO ) \
- myerror(rc, 3, hstmt); \
+ myerror( rc, 3, hstmt, __FILE__, __LINE__ ); \
my_assert( r )
#define printMessageHeader()\
@@ -177,7 +177,7 @@
/**
ERROR HANDLER
*/
-void myerror(SQLRETURN rc, SQLSMALLINT htype, SQLHANDLE handle)
+void myerror( SQLRETURN rc, SQLSMALLINT htype, SQLHANDLE handle, const char *szFile, int
nLine )
{
RETCODE lrc;
@@ -194,9 +194,9 @@
SQL_MAX_MESSAGE_LENGTH-1,
(SQLSMALLINT *)&pcbErrorMsg);
if ( SQL_SUCCEEDED( lrc ) )
- fprintf(stdout,"\n\n[%s]%s\n\n",szSqlState,szErrorMsg);
+ fprintf( stdout, "\n\n[%s][%d][%s]%s\n\n", szFile, nLine, szSqlState,
szErrorMsg );
else
- fprintf(stdout,"\n\nSQLError returned :%d, but rc = %d\n\n",lrc,rc);
+ fprintf( stdout, "\n\[%s][%d] SQLGetDiagRec returned :%d, but rc = %d\n\n",
szFile, nLine, lrc, rc );
g_nCursor = 0;
}
Modified: test/keys/keys.pro
===================================================================
--- test/keys/keys.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/keys/keys.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/param/param.pro
===================================================================
--- test/param/param.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/param/param.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -24,7 +24,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/position/position.pro
===================================================================
--- test/position/position.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/position/position.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/relative/relative.pro
===================================================================
--- test/relative/relative.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/relative/relative.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/result/result.pro
===================================================================
--- test/result/result.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/result/result.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/scroll/scroll.pro
===================================================================
--- test/scroll/scroll.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/scroll/scroll.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/test.vpj
===================================================================
--- test/test.vpj 2006-03-01 06:46:29 UTC (rev 38)
+++ test/test.vpj 2006-03-03 09:30:12 UTC (rev 39)
@@ -78,7 +78,6 @@
<Folder
Name="Header Files"
Filters="*.h;*.H;*.hh;*.hpp;*.hxx;*.inc;*.sh;*.cpy;*.if">
- <F N="include/my_utility.h"/>
<F N="include/mytest3.h"/>
</Folder>
<Folder
Modified: test/test32/test32.pro
===================================================================
--- test/test32/test32.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/test32/test32.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/timestamp/timestamp.pro
===================================================================
--- test/timestamp/timestamp.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/timestamp/timestamp.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/tran/tran.pro
===================================================================
--- test/tran/tran.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/tran/tran.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/tran_ext/tran_ext.pro
===================================================================
--- test/tran_ext/tran_ext.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/tran_ext/tran_ext.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/unixodbc/unixodbc.pro
===================================================================
--- test/unixodbc/unixodbc.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/unixodbc/unixodbc.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
Modified: test/use_result/use_result.pro
===================================================================
--- test/use_result/use_result.pro 2006-03-01 06:46:29 UTC (rev 38)
+++ test/use_result/use_result.pro 2006-03-03 09:30:12 UTC (rev 39)
@@ -23,7 +23,7 @@
# FILES
# #########################################################
HEADERS += \
- ..\include\my_utility.h \
+ \
..\include\mytest3.h
SOURCES += \
| Thread |
|---|
| • Connector/ODBC 3.51 commit: r39 - in test: . basics blob bulk catalog col_length connect curext cursor dyn_cursor error include keys param position re... | pharvey | 3 Mar |