~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzledump.cc

  • Committer: Brian Aker
  • Date: 2009-07-01 06:47:35 UTC
  • mfrom: (1059.2.3 drizzle)
  • Revision ID: brian@gaz-20090701064735-bgg9n0oh7mjrysoe
mergeĀ kaleenĀ 

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
static void add_load_option(string &str, const char *option,
72
72
                            const char *option_value);
73
73
static uint32_t find_set(TYPELIB *lib, const char *x, uint32_t length,
74
 
                      char **err_pos, uint32_t *err_len);
 
74
                         char **err_pos, uint32_t *err_len);
75
75
 
76
76
static void field_escape(string &in, const char *from);
77
 
static bool  verbose= false, opt_no_create_info= false, opt_no_data= false,
78
 
                quick= true, extended_insert= true,
79
 
                ignore_errors= false, flush_logs= false,
80
 
                opt_drop= true, opt_keywords= false,
81
 
                opt_compress= false,
82
 
                opt_delayed= false, create_options= true, opt_quoted= false,
83
 
                opt_databases= false, opt_alldbs= false, opt_create_db= false,
84
 
                opt_lock_all_tables= false,
85
 
                opt_set_charset= false, opt_dump_date= true,
86
 
                opt_autocommit= false, opt_disable_keys= true, opt_xml= false,
87
 
                tty_password= false,
88
 
                opt_single_transaction= false, opt_comments= false,
89
 
                opt_compact= false, opt_hex_blob= false, 
90
 
                opt_order_by_primary=false, opt_ignore= false,
91
 
                opt_complete_insert= false, opt_drop_database= false,
92
 
                opt_replace_into= false,
93
 
                opt_routines= false,
94
 
                opt_alltspcs= false;
95
 
static bool debug_info_flag= false, debug_check_flag= false;
 
77
static bool  verbose= false;
 
78
static bool opt_no_create_info= false;
 
79
static bool opt_no_data= false;
 
80
static bool quick= true;
 
81
static bool extended_insert= true;
 
82
static bool ignore_errors= false;
 
83
static bool flush_logs= false;
 
84
static bool opt_drop= true; 
 
85
static bool opt_keywords= false;
 
86
static bool opt_compress= false;
 
87
static bool opt_delayed= false; 
 
88
static bool create_options= true; 
 
89
static bool opt_quoted= false;
 
90
static bool opt_databases= false; 
 
91
static bool opt_alldbs= false; 
 
92
static bool opt_create_db= false;
 
93
static bool opt_lock_all_tables= false;
 
94
static bool opt_set_charset= false; 
 
95
static bool opt_dump_date= true;
 
96
static bool opt_autocommit= false; 
 
97
static bool opt_disable_keys= true;
 
98
static bool opt_xml= false;
 
99
static bool tty_password= false;
 
100
static bool opt_single_transaction= false; 
 
101
static bool opt_comments= false;
 
102
static bool opt_compact= false;
 
103
static bool opt_hex_blob= false;
 
104
static bool opt_order_by_primary=false; 
 
105
static bool opt_ignore= false;
 
106
static bool opt_complete_insert= false;
 
107
static bool opt_drop_database= false;
 
108
static bool opt_replace_into= false;
 
109
static bool opt_routines= false;
 
110
static bool opt_alltspcs= false;
 
111
static bool debug_info_flag= false;
 
112
static bool debug_check_flag= false;
96
113
static uint32_t show_progress_size= 0;
97
114
static uint64_t total_rows= 0;
98
115
static drizzle_st drizzle;
99
116
static drizzle_con_st dcon;
100
117
static string insert_pat;
101
 
static char  *opt_password= NULL, *current_user= NULL,
102
 
             *current_host= NULL, *path= NULL, *fields_terminated= NULL,
103
 
             *lines_terminated= NULL, *enclosed= NULL, *opt_enclosed= NULL,
104
 
             *escaped= NULL,
105
 
             *where= NULL, *order_by= NULL,
106
 
             *opt_compatible_mode_str= NULL,
107
 
             *err_ptr= NULL;
 
118
static char  *opt_password= NULL;
 
119
static char *current_user= NULL;
 
120
static char  *current_host= NULL;
 
121
static char *path= NULL;
 
122
static char *fields_terminated= NULL;
 
123
static char *lines_terminated= NULL; 
 
124
static char *enclosed= NULL;
 
125
static char *opt_enclosed= NULL;
 
126
static char *escaped= NULL;
 
127
static char *where= NULL; 
 
128
static char *order_by= NULL;
 
129
static char *opt_compatible_mode_str= NULL;
 
130
static char *err_ptr= NULL;
108
131
static char **defaults_argv= NULL;
109
132
static char compatible_mode_normal_str[255];
110
133
static uint32_t opt_compatible_mode= 0;
371
394
  va_start(args, fmt);
372
395
  vfprintf(stderr, fmt, args);
373
396
  va_end(args);
374
 
 
375
 
  return;
376
397
}
377
398
 
378
399
/*
458
479
      fprintf(sql_file,
459
480
"\nSET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION;\n");
460
481
 
461
 
    if (!path)
 
482
    if (path == NULL)
462
483
    {
463
484
      fprintf(md_result_file,"\
464
485
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;\n\
477
498
    fputs("</drizzledump>\n", sql_file);
478
499
    check_io(sql_file);
479
500
  }
480
 
  else if (!opt_compact)
 
501
  else if (opt_compact == false)
481
502
  {
482
 
    if (!path)
 
503
    if (path == NULL)
483
504
    {
484
505
      fprintf(md_result_file,"\
485
506
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;\n\