*** empty log message ***
[csql.git] / test / tools / catalog / create.c
blob27c59d97914aea8143e41753e63d971f16947d09
2 #include "common.h"
3 int main()
5 Connection conn;
6 DbRetVal rv = conn.open("root", "manager");
7 if (rv != OK) return 1;
8 DatabaseManager *dbMgr = conn.getDatabaseManager();
9 if (dbMgr == NULL) { printf("Auth failed\n"); return 2;}
10 int ret =0;
11 if ( createTable(dbMgr, "t1") != 0 ) { ret = 3; }
12 if ( createTable(dbMgr, "t2") != 0 ) { ret = 3; }
13 if ( createIndex(dbMgr, "t1", "f1", "t1idx1") != 0 ) { ret= 3; }
14 if ( createIndex(dbMgr, "t1", "f2", "t1idx2") != 0 ) { ret = 3; }
15 if ( createIndex(dbMgr, "t2", "f1", "t2idx1") != 0 ) { ret = 3; }
17 conn.close();
18 return ret;