1 //100 times addField f1 and dropField f1. getFieldCount() should return 0
2 //and table creation should fail saying no fields in tabledef
7 DbRetVal rv
= conn
.open("root", "manager");
8 if (rv
!= OK
) return 1;
9 DatabaseManager
*dbMgr
= conn
.getDatabaseManager();
10 if (dbMgr
== NULL
) { printf("Auth failed\n"); return 2;}
13 for (int i
=0;i
<100;i
++)
15 tabDef
.addField("f1", typeInt
);
16 tabDef
.dropField("f1");
18 int fieldcount
=tabDef
.getFieldCount();
19 printf("Number of Fields = %d\n",fieldcount
);
20 rv
=dbMgr
->createTable("t1", tabDef
);
23 printf("Table created without Fields\n");
24 printf("Test failed\n");
25 dbMgr
->dropTable("t1");
29 dbMgr
->dropTable("t1");