148
147
typedef enum enum_info_type INFO_TYPE;
150
149
static DRIZZLE drizzle; /* The connection */
151
static bool ignore_errors=0,quick=0,
152
connected=0,opt_raw_data=0,unbuffered=0,output_tables=0,
153
opt_rehash=1,skip_updates=0,safe_updates=0,one_database=0,
154
opt_compress=0, using_opt_local_infile=0,
155
vertical=0, line_numbers=1, column_names=1,
156
opt_nopager=1, opt_outfile=0, named_cmds= 0,
157
tty_password= 0, opt_nobeep=0, opt_reconnect=1,
158
default_charset_used= 0, opt_secure_auth= 0,
159
default_pager_set= 0, opt_sigint_ignore= 0,
160
auto_vertical_output= 0,
161
show_warnings= 0, executing_query= 0, interrupted_query= 0;
150
static bool ignore_errors= false, quick= false,
151
connected= false, opt_raw_data= false, unbuffered= false,
152
output_tables= false, opt_rehash= true, skip_updates= false,
153
safe_updates= false, one_database= false,
154
opt_compress= false, using_opt_local_infile= false,
155
vertical= false, line_numbers= true, column_names= true,
156
opt_nopager= true, opt_outfile= false, named_cmds= false,
157
tty_password= false, opt_nobeep= false, opt_reconnect= true,
158
default_charset_used= false, opt_secure_auth= false,
159
default_pager_set= false, opt_sigint_ignore= false,
160
auto_vertical_output= false,
161
show_warnings= false, executing_query= false, interrupted_query= false;
162
162
static uint32_t show_progress_size= 0;
163
163
static bool debug_info_flag, debug_check_flag;
164
164
static bool column_types_flag;
165
static bool preserve_comments= 0;
165
static bool preserve_comments= false;
166
166
static uint32_t opt_max_allowed_packet, opt_net_buffer_length;
167
static int verbose=0,opt_silent=0,opt_drizzle_port=0, opt_local_infile=0;
167
static int verbose= 0, opt_drizzle_port= 0, opt_silent= 0, opt_local_infile= 0;
168
168
static uint my_end_arg;
169
static char * opt_drizzle_unix_port=0;
170
static int connect_flag=CLIENT_INTERACTIVE;
171
static char *current_host,*current_db,*current_user=0,*opt_password=0,
172
*delimiter_str= 0,* current_prompt= 0;
169
static char * opt_drizzle_unix_port= NULL;
170
static int connect_flag= CLIENT_INTERACTIVE;
171
static char *current_host, *current_db, *current_user= NULL,
172
*opt_password= NULL, *delimiter_str= NULL, *current_prompt= NULL;
173
173
static char *histfile;
174
174
static char *histfile_tmp;
175
175
static string *glob_buffer;
176
176
static string *processed_prompt= NULL;
177
177
static char *default_prompt= NULL;
178
static char *full_username=0,*part_username=0;
178
static char *full_username= NULL,*part_username= NULL;
179
179
static STATUS status;
180
180
static uint32_t select_limit;
181
181
static uint32_t max_join_size;
182
182
static uint32_t opt_connect_timeout= 0;
183
183
static char drizzle_charsets_dir[FN_REFLEN+1];
184
184
// TODO: Need to i18n these
185
static const char *day_names[]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
186
static const char *month_names[]={"Jan","Feb","Mar","Apr","May","Jun","Jul",
185
static const char *day_names[]= {"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
186
static const char *month_names[]= {"Jan","Feb","Mar","Apr","May","Jun","Jul",
187
187
"Aug","Sep","Oct","Nov","Dec"};
188
188
static char default_pager[FN_REFLEN];
189
189
static char pager[FN_REFLEN], outfile[FN_REFLEN];
1364
1364
{"no-pager", OPT_NOPAGER,
1365
1365
N_("Disable pager and print to stdout. See interactive help (\\h) also. WARNING: option deprecated; use --disable-pager instead."),
1366
1366
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
1368
1368
N_("Password to use when connecting to server. If password is not given it's asked from the tty."),
1369
1369
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
1370
{"port", 'P', N_("Port number to use for connection or 0 for default to, in order of preference, drizzle.cnf, $DRIZZLE_TCP_PORT, ")
1370
{"port", 'p', N_("Port number to use for connection or 0 for default to, in order of preference, drizzle.cnf, $DRIZZLE_TCP_PORT, ")
1371
1371
N_("built-in default") " (" STRINGIFY_ARG(DRIZZLE_PORT) ").",
1372
(char**) &opt_drizzle_port,
1373
(char**) &opt_drizzle_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1372
0, 0, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1374
1373
{"prompt", OPT_PROMPT, N_("Set the drizzle prompt to this value."),
1375
1374
(char**) ¤t_prompt, (char**) ¤t_prompt, 0, GET_STR_ALLOC,
1376
1375
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},