Beispiel #1
0
int main(int argc, char *argv[])
{
  sqlite3 *db;
  int64 count;

  parseArgs(argc, argv);
        
  db = openDatabase();
  if (rebuild) {
    dropGlueTables(db);
  }
  makeTables(db);
  fillGlueTables(db);
  count = writeEventsToSQL(db);
  evlog(LOG_ALWAYS, "Imported %llu events from %s to %s, serial %lu.",
        count, logFileName, databaseName, logSerial);

  if (runTests) {
    /* TODO: more unit tests in here */
    testTableExists(db);
  }

  closeDatabase(db);
  return 0;
}
Beispiel #2
0
int main(int argc, char *argv[])
/* Process command line. */
{
optionInit(&argc, argv, options);

if (argc != 8)
    usage();

existingMyIsamDb    = argv[2];
existingMyIsamTable = argv[3];

existingInnodbDb    = argv[4];
existingInnodbTable = argv[5];

nonExistingTableDb  = argv[6];
nonExistingTable    = argv[7];

testTableExists(argv[1]);

return 0;
}