19 #include <ndb_global.h>
29 int main(
int argc,
const char** argv){
36 {
"temp",
't', arg_flag, &_temp,
"Temporary table",
"temp" },
37 {
"usage",
'?', arg_flag, &_help,
"Print help",
"" }
39 int num_args =
sizeof(args) /
sizeof(args[0]);
42 "This program will create all standard tables in Ndb.\n"\
43 "The tables is selected from a fixed list of tables\n"\
44 "defined in NDBT_Tables class\n";
46 if(getarg(args, num_args, argc, argv, &optind) || _help) {
47 arg_printusage(args, num_args, argv[0], desc);
48 return NDBT_ProgramExit(NDBT_WRONGARGS);
55 return NDBT_ProgramExit(NDBT_FAILED);
57 Ndb MyNdb(&con,
"TEST_DB" );
59 if(MyNdb.init() != 0){
60 ERR(MyNdb.getNdbError());
61 return NDBT_ProgramExit(NDBT_FAILED);
64 while(MyNdb.waitUntilReady() != 0)
65 ndbout <<
"Waiting for ndb to become ready..." << endl;
67 return NDBT_Tables::createAllTables(&MyNdb, _temp);