summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test/expected/thread-thread_implicit.c
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2007-06-12 11:07:34 +0000
committerMagnus Hagander <magnus@hagander.net>2007-06-12 11:07:34 +0000
commit09922597c5f460ab02882716c371b2a5c47e742e (patch)
tree50c02e13bf202463570cf107fbcda70b42812bcc /src/interfaces/ecpg/test/expected/thread-thread_implicit.c
parente514740e699d306b744849e43bcd2ef9728d464b (diff)
Rewrite ECPG regression test driver in C, by splitting the standard
regression driver into two parts and reusing half of it. Required to run ECPG tests without a shell on MSVC builds. Fix ECPG thread tests for MSVC build (incl output files). Joachim Wieland and Magnus Hagander
Diffstat (limited to 'src/interfaces/ecpg/test/expected/thread-thread_implicit.c')
-rw-r--r--src/interfaces/ecpg/test/expected/thread-thread_implicit.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/interfaces/ecpg/test/expected/thread-thread_implicit.c b/src/interfaces/ecpg/test/expected/thread-thread_implicit.c
index f48db90559a..bf20c51bb56 100644
--- a/src/interfaces/ecpg/test/expected/thread-thread_implicit.c
+++ b/src/interfaces/ecpg/test/expected/thread-thread_implicit.c
@@ -154,15 +154,19 @@ void *test_thread(void *arg)
/* build up connection name, and connect to database */
+#ifndef WIN32_ONLY_COMPILER
snprintf(l_connection, sizeof(l_connection), "thread_%03ld", threadnum);
+#else
+ _snprintf(l_connection, sizeof(l_connection), "thread_%03ld", threadnum);
+#endif
/* exec sql whenever sqlerror sqlprint ; */
-#line 108 "thread_implicit.pgc"
+#line 112 "thread_implicit.pgc"
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , l_connection, 0);
-#line 109 "thread_implicit.pgc"
+#line 113 "thread_implicit.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 109 "thread_implicit.pgc"
+#line 113 "thread_implicit.pgc"
if( sqlca.sqlcode != 0 )
{
@@ -170,10 +174,10 @@ if (sqlca.sqlcode < 0) sqlprint();}
return( NULL );
}
{ ECPGtrans(__LINE__, NULL, "begin transaction ");
-#line 115 "thread_implicit.pgc"
+#line 119 "thread_implicit.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 115 "thread_implicit.pgc"
+#line 119 "thread_implicit.pgc"
/* insert into test_thread table */
@@ -184,10 +188,10 @@ if (sqlca.sqlcode < 0) sqlprint();}
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_int,&(l_i),(long)1,(long)1,sizeof(int),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
-#line 120 "thread_implicit.pgc"
+#line 124 "thread_implicit.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 120 "thread_implicit.pgc"
+#line 124 "thread_implicit.pgc"
if( sqlca.sqlcode != 0 )
printf("%s: ERROR: insert failed!\n", l_connection);
@@ -195,16 +199,16 @@ if (sqlca.sqlcode < 0) sqlprint();}
/* all done */
{ ECPGtrans(__LINE__, NULL, "commit");
-#line 126 "thread_implicit.pgc"
+#line 130 "thread_implicit.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 126 "thread_implicit.pgc"
+#line 130 "thread_implicit.pgc"
{ ECPGdisconnect(__LINE__, l_connection);
-#line 127 "thread_implicit.pgc"
+#line 131 "thread_implicit.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
-#line 127 "thread_implicit.pgc"
+#line 131 "thread_implicit.pgc"
return( NULL );
}