mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix to make Windows compilation smoother
This commit is contained in:
@ -79,6 +79,7 @@ static my_bool verbose=0,tFlag=0,cFlag=0,dFlag=0,quick=0, extended_insert = 0,
|
||||
opt_autocommit=0,opt_master_data,opt_disable_keys=0,opt_xml=0,
|
||||
opt_delete_master_logs=0, tty_password=0,
|
||||
opt_single_transaction=0, opt_comments= 0;
|
||||
static ulong opt_max_allowed_packet, opt_net_buffer_length;
|
||||
static MYSQL mysql_connection,*sock=0;
|
||||
static char insert_pat[12 * 1024],*opt_password=0,*current_user=0,
|
||||
*current_host=0,*path=0,*fields_terminated=0,
|
||||
@ -87,7 +88,6 @@ static char insert_pat[12 * 1024],*opt_password=0,*current_user=0,
|
||||
static uint opt_mysql_port=0;
|
||||
static my_string opt_mysql_unix_port=0;
|
||||
static int first_error=0;
|
||||
extern ulong net_buffer_length;
|
||||
static DYNAMIC_STRING extended_row;
|
||||
#include <sslopt-vars.h>
|
||||
FILE *md_result_file;
|
||||
@ -238,11 +238,11 @@ static struct my_option my_long_options[] =
|
||||
{"xml", 'X', "Dump a database as well formed XML.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"max_allowed_packet", OPT_MAX_ALLOWED_PACKET, "",
|
||||
(gptr*) &max_allowed_packet, (gptr*) &max_allowed_packet, 0,
|
||||
(gptr*) &opt_max_allowed_packet, (gptr*) &opt_max_allowed_packet, 0,
|
||||
GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096,
|
||||
(longlong) 2L*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
|
||||
{"net_buffer_length", OPT_NET_BUFFER_LENGTH, "",
|
||||
(gptr*) &net_buffer_length, (gptr*) &net_buffer_length, 0,
|
||||
(gptr*) &opt_net_buffer_length, (gptr*) &opt_net_buffer_length, 0,
|
||||
GET_ULONG, REQUIRED_ARG, 1024*1024L-1025, 4096, 16*1024L*1024L,
|
||||
MALLOC_OVERHEAD-1024, 1024, 0},
|
||||
{"comments", 'i', "Write additional information.",
|
||||
@ -405,6 +405,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
static int get_options(int *argc, char ***argv)
|
||||
{
|
||||
int ho_error;
|
||||
MYSQL_PARAMETERS *mysql_params= mysql_get_parameters();
|
||||
|
||||
opt_max_allowed_packet= *mysql_params->p_max_allowed_packet;
|
||||
opt_net_buffer_length= *mysql_params->p_net_buffer_length;
|
||||
|
||||
md_result_file= stdout;
|
||||
load_defaults("my",load_default_groups,argc,argv);
|
||||
@ -412,6 +416,9 @@ static int get_options(int *argc, char ***argv)
|
||||
if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
|
||||
exit(ho_error);
|
||||
|
||||
*mysql_params->p_max_allowed_packet= opt_max_allowed_packet;
|
||||
*mysql_params->p_net_buffer_length= opt_net_buffer_length;
|
||||
|
||||
if (opt_delayed)
|
||||
opt_lock=0; /* Can't have lock with delayed */
|
||||
if (!path && (enclosed || opt_enclosed || escaped || lines_terminated ||
|
||||
|
Reference in New Issue
Block a user