~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/mysqldump.c

  • Committer: Brian Aker
  • Date: 2008-07-13 06:35:46 UTC
  • Revision ID: brian@tangent.org-20080713063546-w1fzi89wzvf6o517
Bool cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
                      char **err_pos, uint *err_len);
81
81
 
82
82
static void field_escape(DYNAMIC_STRING* in, const char *from);
83
 
static my_bool  verbose= 0, opt_no_create_info= 0, opt_no_data= 0,
 
83
static bool  verbose= 0, opt_no_create_info= 0, opt_no_data= 0,
84
84
                quick= 1, extended_insert= 1,
85
85
                lock_tables=1,ignore_errors=0,flush_logs=0,flush_privileges=0,
86
86
                opt_drop=1,opt_keywords=0,opt_lock=1,opt_compress=0,
98
98
                opt_include_master_host_port= 0,
99
99
                opt_events= 0,
100
100
                opt_alltspcs=0, opt_notspcs= 0;
101
 
static my_bool insert_pat_inited= 0, debug_info_flag= 0, debug_check_flag= 0;
 
101
static bool insert_pat_inited= 0, debug_info_flag= 0, debug_check_flag= 0;
102
102
static ulong opt_max_allowed_packet, opt_net_buffer_length;
103
103
static MYSQL mysql_connection,*mysql=0;
104
104
static DYNAMIC_STRING insert_pat;
112
112
static char **defaults_argv= 0;
113
113
static char compatible_mode_normal_str[255];
114
114
/* Server supports character_set_results session variable? */
115
 
static my_bool server_supports_switching_charsets= TRUE;
 
115
static bool server_supports_switching_charsets= TRUE;
116
116
static ulong opt_compatible_mode= 0;
117
117
#define MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL 1
118
118
#define MYSQL_OPT_MASTER_DATA_COMMENTED_SQL 2
154
154
static CHARSET_INFO *charset_info= &my_charset_latin1;
155
155
const char *default_dbug_option="d:t:o,/tmp/mysqldump.trace";
156
156
/* have we seen any VIEWs during table scanning? */
157
 
my_bool seen_views= 0;
 
157
bool seen_views= 0;
158
158
const char *compatible_mode_names[]=
159
159
{
160
160
  "MYSQL323", "MYSQL40", "POSTGRESQL", "ORACLE", "MSSQL", "DB2",
487
487
static int init_dumping(char *, int init_func(char*));
488
488
static int dump_databases(char **);
489
489
static int dump_all_databases(void);
490
 
static char *quote_name(const char *name, char *buff, my_bool force);
 
490
static char *quote_name(const char *name, char *buff, bool force);
491
491
char check_if_ignore_table(const char *table_name, char *table_type);
492
492
static char *primary_key_fields(const char *table_name);
493
493
 
674
674
 
675
675
 
676
676
static uchar* get_table_key(const char *entry, size_t *length,
677
 
                            my_bool not_used __attribute__((unused)))
 
677
                            bool not_used __attribute__((unused)))
678
678
{
679
679
  *length= strlen(entry);
680
680
  return (uchar*) entry;
681
681
}
682
682
 
683
683
 
684
 
static my_bool
 
684
static bool
685
685
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
686
686
               char *argument)
687
687
{
1191
1191
} /* unescape */
1192
1192
 
1193
1193
 
1194
 
static my_bool test_if_special_chars(const char *str)
 
1194
static bool test_if_special_chars(const char *str)
1195
1195
{
1196
1196
#if MYSQL_VERSION_ID >= 32300
1197
1197
  for ( ; *str ; str++)
1219
1219
  buff                 quoted string
1220
1220
 
1221
1221
*/
1222
 
static char *quote_name(const char *name, char *buff, my_bool force)
 
1222
static char *quote_name(const char *name, char *buff, bool force)
1223
1223
{
1224
1224
  char *to= buff;
1225
1225
  char qtype= (opt_compatible_mode & MASK_ANSI_QUOTES) ? '\"' : '`';
1506
1506
static uint get_table_structure(char *table, char *db, char *table_type,
1507
1507
                                char *ignore_flag)
1508
1508
{
1509
 
  my_bool    init=0, delayed, write_data, complete_insert;
 
1509
  bool    init=0, delayed, write_data, complete_insert;
1510
1510
  my_ulonglong num_fields;
1511
1511
  char       *result_table, *opt_quoted_table;
1512
1512
  const char *insert_option;
2710
2710
 
2711
2711
/* Return 1 if we should copy the table */
2712
2712
 
2713
 
static my_bool include_table(const uchar *hash_key, size_t len)
 
2713
static bool include_table(const uchar *hash_key, size_t len)
2714
2714
{
2715
2715
  return !hash_search(&ignore_table, hash_key, len);
2716
2716
}