20 #include <ndb_global.h>
31 int main(
int argc,
const char** argv){
34 const char * _database =
"BANK";
39 {
"database",
'd', arg_string, &_database,
"Database name",
""},
40 {
"disk", 0, arg_flag, &disk,
"Use disk tables",
"" },
41 {
"skip-create", 0, arg_flag, &skip_create,
"Skip create",
"" },
42 {
"usage",
'?', arg_flag, &_help,
"Print help",
"" }
44 int num_args =
sizeof(args) /
sizeof(args[0]);
47 "This program will create and load the tables for bank\n";
49 if(getarg(args, num_args, argc, argv, &optind) || _help) {
50 arg_printusage(args, num_args, argv[0], desc);
51 return NDBT_ProgramExit(NDBT_WRONGARGS);
57 return NDBT_ProgramExit(NDBT_FAILED);
60 Bank bank(con,_database);
61 int overWriteExisting =
true;
62 bank.setSkipCreate(skip_create);
63 if (bank.createAndLoadBank(overWriteExisting, disk) != NDBT_OK)
64 return NDBT_ProgramExit(NDBT_FAILED);
65 return NDBT_ProgramExit(NDBT_OK);