Modified:
trunk/test/Makefile.am
trunk/test/catalog/my_catalog.c
trunk/test/dyn_cursor/my_dyn_cursor.c
trunk/test/test/mytest.c
Log:
Clean up some more test problems, and make running the tests depend on building
the tests.
Modified: trunk/test/Makefile.am
===================================================================
--- trunk/test/Makefile.am 2006-09-19 13:58:02 UTC (rev 106)
+++ trunk/test/Makefile.am 2006-09-19 23:11:57 UTC (rev 107)
@@ -92,7 +92,7 @@
# Pass DSN UID PASSWORD as the command line arguments to each sample
# ----------------------------------------------------------------------
-run: make-test-ini
+run: make-test-ini $(plain_tests) my_use_result
for test in $(plain_tests); do \
echo ODBCINI=$(TEST_ODBCINI) \
./$$test "$(TEST_DSN)" "$(TEST_UID)" "$(TEST_PASSWORD)" "$(TEST_SOCKET)" || exit 1;
\
@@ -101,7 +101,7 @@
done
ODBCINI=$(TEST_ODBCINI) ./my_use_result 1000 "$(TEST_DSN)" "$(TEST_UID)"
"$(TEST_PASSWORD)"
-trun: make-test-ini
+trun: make-test-ini $(fancy_tests)
for test in $(fancy_tests); do \
echo ODBCINI=$(TEST_ODBCINI) \
./$$test -1 "$(TEST_DSN)" "$(TEST_UID)" "$(TEST_PASSWORD)" || exit 1; \
Modified: trunk/test/catalog/my_catalog.c
===================================================================
--- trunk/test/catalog/my_catalog.c 2006-09-19 13:58:02 UTC (rev 106)
+++ trunk/test/catalog/my_catalog.c 2006-09-19 23:11:57 UTC (rev 107)
@@ -720,7 +720,7 @@
mypwd = argv[3];
}
- sprintf(conn,"DSN=%s;UID=%s;PWD=%s;OPTION=3;",mydsn,myuid,mypwd);
+ sprintf(conn,"DRIVER=MyODBC;DSN=%s;UID=%s;PWD=%s;OPTION=3;",mydsn,myuid,mypwd);
mydrvconnect(&henv,&hdbc,&hstmt,conn);
my_columns_null(hdbc,hstmt);
Modified: trunk/test/dyn_cursor/my_dyn_cursor.c
===================================================================
--- trunk/test/dyn_cursor/my_dyn_cursor.c 2006-09-19 13:58:02 UTC (rev 106)
+++ trunk/test/dyn_cursor/my_dyn_cursor.c 2006-09-19 23:11:57 UTC (rev 107)
@@ -22,9 +22,9 @@
void my_dynamic_pos_cursor(SQLHDBC hdbc, SQLHSTMT hstmt)
{
SQLRETURN rc;
- SQLINTEGER nRowCount;
+ SQLLEN nRowCount;
SQLHSTMT hstmt_pos;
- SQLINTEGER nData = 500;
+ long nData = 500;
SQLCHAR szData[255]={0};
/* initialize data */
@@ -155,10 +155,10 @@
void my_dynamic_pos_cursor1(SQLHDBC hdbc, SQLHSTMT hstmt)
{
SQLRETURN rc;
- SQLINTEGER nRowCount;
+ SQLLEN nRowCount;
SQLHSTMT hstmt_pos;
- SQLINTEGER i,nData[15];
- SQLCHAR data[30],szData[15][10]={0};
+ long i,nData[15];
+ char data[30],szData[15][10]={0};
/* initialize data */
SQLExecDirect(hstmt,"drop table my_dynamic_cursor",SQL_NTS);
@@ -307,8 +307,8 @@
void my_setpos_delete_ignore(SQLHDBC hdbc, SQLHSTMT hstmt)
{
SQLRETURN rc;
- SQLINTEGER nlen;
- SQLCHAR szData[255]={0};
+ SQLLEN nlen;
+ char szData[255]={0};
/* INIT */
SQLExecDirect(hstmt,"drop table setpos_delete_ignore",SQL_NTS);
@@ -382,8 +382,8 @@
void my_setpos_update_ignore(SQLHDBC hdbc, SQLHSTMT hstmt)
{
SQLRETURN rc;
- SQLINTEGER nlen;
- SQLCHAR szData[255]={0};
+ SQLLEN nlen;
+ char szData[255]={0};
SQLExecDirect(hstmt,"drop table setpos_update_ignore",SQL_NTS);
rc = SQLExecDirect(hstmt,"create table setpos_update_ignore(col1 int, col2
varchar(30))",SQL_NTS);
@@ -453,8 +453,8 @@
void my_setpos_update_ignore1(SQLHDBC hdbc, SQLHSTMT hstmt)
{
SQLRETURN rc;
- SQLINTEGER nlen;
- SQLCHAR szData[255]={0};
+ SQLLEN nlen;
+ char szData[255]={0};
SQLExecDirect(hstmt,"drop table setpos_update_ignore",SQL_NTS);
rc = SQLExecDirect(hstmt,"create table setpos_update_ignore(col1 int, col2
varchar(30))",SQL_NTS);
@@ -524,10 +524,10 @@
void my_position(SQLHDBC hdbc, SQLHSTMT hstmt)
{
SQLRETURN rc;
- SQLINTEGER nlen;
- SQLCHAR szData[255]={0};
- SQLUINTEGER nData;
- SQLINTEGER nrow;
+ SQLLEN nlen;
+ char szData[255]={0};
+ long nData;
+ SQLLEN nrow;
SQLExecDirect(hstmt,"drop table my_position",SQL_NTS);
rc = SQLExecDirect(hstmt,"create table my_position(col1 int, col2
varchar(30))",SQL_NTS);
@@ -629,9 +629,9 @@
void my_position1(SQLHDBC hdbc, SQLHSTMT hstmt)
{
SQLRETURN rc;
- SQLINTEGER nlen[15];
- SQLCHAR szData[15][15]={0};
- SQLINTEGER nData[15], nrow[15];
+ SQLLEN nlen[15];
+ char szData[15][15]={0};
+ long nData[15], nrow[15];
SQLExecDirect(hstmt,"drop table my_position",SQL_NTS);
rc = SQLExecDirect(hstmt,"create table my_position(col1 int, col2
varchar(30))",SQL_NTS);
@@ -735,9 +735,9 @@
void my_zero_irow_update(SQLHDBC hdbc, SQLHSTMT hstmt)
{
SQLRETURN rc;
- SQLINTEGER nlen[15];
- SQLCHAR szData[15][15]={0};
- SQLUINTEGER nData[15], nrow[15];
+ SQLLEN nlen[15];
+ char szData[15][15]={0};
+ long nData[15], nrow[15];
SQLExecDirect(hstmt,"drop table my_zero_irow",SQL_NTS);
rc = SQLExecDirect(hstmt,"create table my_zero_irow(col1 int, col2
varchar(30))",SQL_NTS);
@@ -825,9 +825,9 @@
void my_zero_irow_delete(SQLHDBC hdbc, SQLHSTMT hstmt)
{
SQLRETURN rc;
- SQLINTEGER nlen[15];
- SQLCHAR szData[15][15]={0};
- SQLUINTEGER nData[15], nrow[15];
+ SQLLEN nlen[15];
+ char szData[15][15]={0};
+ long nData[15], nrow[15];
SQLExecDirect(hstmt,"drop table my_zero_irow",SQL_NTS);
rc = SQLExecDirect(hstmt,"create table my_zero_irow(col1 int, col2
varchar(30))",SQL_NTS);
@@ -864,7 +864,7 @@
rc = SQLExecDirect(hstmt,"select * from my_zero_irow",SQL_NTS);
mystmt(hstmt,rc);
- rc = SQLBindCol(hstmt,1,SQL_C_LONG,&nData,0,(long *)&nrow);
+ rc = SQLBindCol(hstmt,1,SQL_C_LONG,&nData,0,&nrow);
mystmt(hstmt,rc);
rc = SQLBindCol(hstmt,2,SQL_C_CHAR,szData,sizeof(szData[0]),(long *)&nlen);
@@ -1031,7 +1031,7 @@
mypwd = argv[3];
}
- sprintf(conn,"DSN=%s;USER=%s;PASSWORD=%s;OPTION=35",mydsn,myuid,mypwd);
+ sprintf(conn,"DRIVER=MyODBC;DSN=%s;USER=%s;PASSWORD=%s;OPTION=35",mydsn,myuid,mypwd);
mydrvconnect(&henv,&hdbc,&hstmt,conn);
if (driver_supports_setpos(hdbc))
{
Modified: trunk/test/test/mytest.c
===================================================================
--- trunk/test/test/mytest.c 2006-09-19 13:58:02 UTC (rev 106)
+++ trunk/test/test/mytest.c 2006-09-19 23:11:57 UTC (rev 107)
@@ -4030,7 +4030,7 @@
SQLHENV henv;
SQLHDBC hdbc;
SQLHSTMT hstmt;
- SQLINTEGER narg, tno = -1;
+ SQLINTEGER narg, tno = -1;
/*
* show the usage string when the user asks for this
| Thread |
|---|
| • Connector/ODBC 3.51 commit: r107 - in trunk/test: . catalog dyn_cursor test | jwinstead | 20 Sep |