1 /**********************************************************
4 * create index if specified
6 * check lock statistics
8 * check lock statistics
11 #include <DatabaseManagerImpl.h>
15 DbRetVal rv
= conn
.open("root", "manager");
16 if (rv
!= OK
) return 1;
17 DatabaseManagerImpl
*dbMgr
= (DatabaseManagerImpl
*) conn
.getDatabaseManager();
18 if (dbMgr
== NULL
) { printf("Auth failed\n"); return 2;}
20 if (createTable(dbMgr
, "t1") != 0 ) { ret
= 3; }
22 if (createIndex(dbMgr
, "t1","f1", "idx1") != 0 ) { ret
= 4; }
24 rv
= conn
.startTransaction();
25 if (rv
!= OK
) ret
= 5;
26 rc
= insertTuple(dbMgr
, conn
, "t1", 10);
27 if (rc
!= 10) ret
= 6;
28 printf("Before commit\n");
29 dbMgr
->printDebugLockInfo();
31 printf("After commit\n");
32 dbMgr
->printDebugLockInfo();
33 dropTable(dbMgr
, "t1");