~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzledump.cc

  • Committer: Andrew Hutchings
  • Date: 2010-09-29 11:24:25 UTC
  • mto: (1808.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1809.
  • Revision ID: andrew@linuxjedi.co.uk-20100929112425-r0anfuii1oyf24y9
Fix up some more options and the docs

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
 
81
81
bool  verbose= false;
82
82
static bool use_drizzle_protocol= false;
83
 
static bool ignore_errors= false;
 
83
bool ignore_errors= false;
84
84
bool opt_compress= false;
85
85
static bool create_options= true; 
86
86
static bool opt_quoted= false;
92
92
static bool opt_single_transaction= false; 
93
93
static bool opt_compact;
94
94
bool opt_ignore= false;
95
 
static bool opt_complete_insert= false;
96
95
bool opt_drop_database;
97
96
bool opt_no_create_info;
98
97
bool opt_no_data= false;
157
156
  std::vector<DrizzleDumpDatabase*>::iterator i;
158
157
  for (i= database_store.begin(); i != database_store.end(); ++i)
159
158
  {
160
 
    if (not (*i)->populateTables())
 
159
    if ((not (*i)->populateTables()) && (not ignore_errors))
161
160
      maybe_exit(EX_DRIZZLEERR);
162
161
  }
163
162
}
406
405
  if (not database->populateTables(table_names))
407
406
  {
408
407
    delete database;
409
 
    maybe_exit(EX_DRIZZLEERR);
 
408
    if (not ignore_errors)
 
409
      maybe_exit(EX_DRIZZLEERR);
410
410
  }
411
411
 
412
412
  database_store.push_back(database); 
454
454
  commandline_options.add_options()
455
455
  ("all-databases,A", po::value<bool>(&opt_alldbs)->default_value(false)->zero_tokens(),
456
456
  N_("Dump all the databases. This will be same as --databases with all databases selected."))
457
 
  ("complete-insert,c", po::value<bool>(&opt_complete_insert)->default_value(false)->zero_tokens(),
458
 
  N_("Use complete insert statements."))
459
457
  ("compress,C", po::value<bool>(&opt_compress)->default_value(false)->zero_tokens(),
460
458
  N_("Use compression in server/client protocol."))
461
459
  ("force,f", po::value<bool>(&ignore_errors)->default_value(false)->zero_tokens(),
462
460
  N_("Continue even if we get an sql-error."))
463
461
  ("help,?", N_("Display this help message and exit."))
464
462
  ("lock-all-tables,x", po::value<bool>(&opt_lock_all_tables)->default_value(false)->zero_tokens(),
465
 
  N_("Locks all tables across all databases. This is achieved by taking a global read lock for the duration of the whole dump. Automatically turns --single-transaction and --lock-tables off."))
 
463
  N_("Locks all tables across all databases. This is achieved by taking a global read lock for the duration of the whole dump. Automatically turns --single-transaction off."))
466
464
  ("single-transaction", po::value<bool>(&opt_single_transaction)->default_value(false)->zero_tokens(),
467
 
  N_("Creates a consistent snapshot by dumping all tables in a single transaction. Works ONLY for tables stored in storage engines which support multiversioning (currently only InnoDB does); the dump is NOT guaranteed to be consistent for other storage engines. While a --single-transaction dump is in process, to ensure a valid dump file (correct table contents), no other connection should use the following statements: ALTER TABLE, DROP TABLE, RENAME TABLE, TRUNCATE TABLE, as consistent snapshot is not isolated from them. Option automatically turns off --lock-tables."))
 
465
  N_("Creates a consistent snapshot by dumping all tables in a single transaction. Works ONLY for tables stored in storage engines which support multiversioning (currently only InnoDB does); the dump is NOT guaranteed to be consistent for other storage engines. While a --single-transaction dump is in process, to ensure a valid dump file (correct table contents), no other connection should use the following statements: ALTER TABLE, DROP TABLE, RENAME TABLE, TRUNCATE TABLE, as consistent snapshot is not isolated from them."))
468
466
  ("skip-opt", 
469
 
  N_("Disable --opt. Disables --add-drop-table, --add-locks, --create-options, ---extended-insert, --lock-tables, and --disable-keys."))    
 
467
  N_("Disable --opt. Disables --add-drop-table, --add-locks, --create-options, ---extended-insert and --disable-keys."))    
470
468
  ("tables", N_("Overrides option --databases (-B)."))
471
469
  ("show-progress-size", po::value<uint32_t>(&show_progress_size)->default_value(10000),
472
470
  N_("Number of rows before each output progress report (requires --verbose)."))