adding test scripts
[csql.git] / test / sqlapi / Csql / Connect / connecttwicewithoutclose.c
blob109cc235928fd7205e8318363b13082c18251f9f
1 /*
2 connect twice without closing the connection,
3 second conection should return "user already logged in".
4 */
6 #include"common.h"
8 int main()
10 DbRetVal rv = OK;
11 AbsSqlConnection *con = createConnection();
12 rv = con->connect("root","manager");
13 if(rv !=OK) {
14 delete con;
15 return 1;
17 printf("Connection opened\n");
18 rv = con->connect("root","manager");
19 if(rv==OK) {
20 printf("Testscript failed\n");
21 con->disconnect();
22 delete con;
23 return 2;
25 printf("Test script passed\n");
26 con->disconnect();
27 delete con;
28 return 0;