start only if sql server if turned on in csql.conf file
[csql.git] / test / dbapi / Connection / conntest9.c
blobd2c00c5a501e47f94da5379598d2b303e5434626
1 //Create a transaction and abort it for one million times
2 //it should succeed
4 #include<CSql.h>
5 int main()
7 Connection conn;
8 DbRetVal rv=conn.open("root","manager");
9 if(rv!=OK)
11 return 1;
13 if(rv!=OK)
15 printf("unable to start transaction");
16 return 2;
18 for(int i=0;i<1000000;i++)
20 rv=conn.startTransaction();
21 if(rv!=OK) return 3;
22 rv=conn.rollback();
23 if(rv!=OK)
25 printf("Test script failed return value %d\n",rv);
26 return 4;
29 printf("test script passed return value %d\n",rv);
30 return 0;