diff options
author | unknown <tomas@poseidon.mysql.com> | 2007-03-08 10:39:35 +0700 |
---|---|---|
committer | unknown <tomas@poseidon.mysql.com> | 2007-03-08 10:39:35 +0700 |
commit | 1fb285db3a28c3fc19c5f61c29e58b46a6893546 (patch) | |
tree | 06df5ec2a3c35eedf74eb7af05f000d5e31f1430 /ndb/tools | |
parent | 6928f535325fe81d6bda70b5320b91c56d2e2064 (diff) | |
download | mariadb-git-1fb285db3a28c3fc19c5f61c29e58b46a6893546.tar.gz |
changed ndb_restore defaults handeling for structured printout
extended ndb_restore_print test with tests
mysql-test/r/ndb_restore_print.result:
extended ndb_restore_print test with tests
mysql-test/t/ndb_restore_print.test:
extended ndb_restore_print test with tests
ndb/tools/restore/restore_main.cpp:
changed ndb_restore defaults handeling for structured printout
Diffstat (limited to 'ndb/tools')
-rw-r--r-- | ndb/tools/restore/restore_main.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/ndb/tools/restore/restore_main.cpp b/ndb/tools/restore/restore_main.cpp index 5f31a86e270..bf06ef69781 100644 --- a/ndb/tools/restore/restore_main.cpp +++ b/ndb/tools/restore/restore_main.cpp @@ -79,14 +79,10 @@ enum ndb_restore_options { OPT_APPEND, OPT_VERBOSE }; -/* - the below formatting options follow the formatting from mysqldump - do not change unless to adopt to changes in mysqldump -*/ -static const char *opt_fields_enclosed_by= ""; -static const char *opt_fields_terminated_by= ";"; -static const char *opt_fields_optionally_enclosed_by= ""; -static const char *opt_lines_terminated_by= "\n"; +static const char *opt_fields_enclosed_by= NULL; +static const char *opt_fields_terminated_by= NULL; +static const char *opt_fields_optionally_enclosed_by= NULL; +static const char *opt_lines_terminated_by= NULL; static const char *tab_path= NULL; static int opt_append; @@ -321,13 +317,13 @@ readArguments(int *pargc, char*** pargv) do not change unless to adopt to changes in mysqldump */ g_ndbrecord_print_format.fields_enclosed_by= - opt_fields_enclosed_by; + opt_fields_enclosed_by ? opt_fields_enclosed_by : ""; g_ndbrecord_print_format.fields_terminated_by= - opt_fields_terminated_by; + opt_fields_terminated_by ? opt_fields_terminated_by : "\t"; g_ndbrecord_print_format.fields_optionally_enclosed_by= - opt_fields_optionally_enclosed_by; + opt_fields_optionally_enclosed_by ? opt_fields_optionally_enclosed_by : ""; g_ndbrecord_print_format.lines_terminated_by= - opt_lines_terminated_by; + opt_lines_terminated_by ? opt_lines_terminated_by : "\n"; if (g_ndbrecord_print_format.fields_optionally_enclosed_by[0] == '\0') g_ndbrecord_print_format.null_string= "\\N"; else |