diff options
Diffstat (limited to 'client/mysqldump.c')
-rw-r--r-- | client/mysqldump.c | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c index fa456320028..21358272109 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -36,7 +36,7 @@ ** Added --single-transaction option 06/06/2002 by Peter Zaitsev */ -#define DUMP_VERSION "9.06" +#define DUMP_VERSION "9.07" #include <my_global.h> #include <my_sys.h> @@ -88,7 +88,7 @@ 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" +#include <sslopt-vars.h> FILE *md_result_file; static struct my_option my_long_options[] = @@ -211,7 +211,7 @@ static struct my_option my_long_options[] = {"socket", 'S', "Socket file to use for connection.", (gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, -#include "sslopt-longopts.h" +#include <sslopt-longopts.h> {"tab",'T', "Creates tab separated textfile for each table to given path. (creates .sql and .txt files). NOTE: This only works if mysqldump is run on the same machine as the mysqld daemon.", (gptr*) &path, (gptr*) &path, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -232,7 +232,7 @@ static struct my_option my_long_options[] = NO_ARG, 0, 0, 0, 0, 0, 0}, {"max_allowed_packet", OPT_MAX_ALLOWED_PACKET, "", (gptr*) &max_allowed_packet, (gptr*) &max_allowed_packet, 0, - GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096, 512*1024L*1024L, + GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096, 1024*1024L*1024L, MALLOC_OVERHEAD, 1024, 0}, {"net_buffer_length", OPT_NET_BUFFER_LENGTH, "", (gptr*) &net_buffer_length, (gptr*) &net_buffer_length, 0, @@ -263,22 +263,34 @@ static void print_version(void) } /* print_version */ +static void short_usage_sub(void) +{ + printf("Usage: %s [OPTIONS] database [tables]\n", my_progname); + printf("OR %s [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]\n", + my_progname); + printf("OR %s [OPTIONS] --all-databases [OPTIONS]\n", my_progname); +} + static void usage(void) { print_version(); puts("By Igor Romanenko, Monty, Jani & Sinisa"); puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n"); puts("Dumping definition and data mysql database or table"); - printf("Usage: %s [OPTIONS] database [tables]\n", my_progname); - printf("OR %s [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]\n", - my_progname); - printf("OR %s [OPTIONS] --all-databases [OPTIONS]\n", my_progname); + short_usage_sub(); print_defaults("my",load_default_groups); my_print_help(my_long_options); my_print_variables(my_long_options); } /* usage */ +static void short_usage(void) +{ + short_usage_sub(); + printf("For more options, use %s --help\n", my_progname); +} + + static void write_header(FILE *sql_file, char *db_name) { if (opt_xml) @@ -335,6 +347,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case '#': DBUG_PUSH(argument ? argument : "d:t:o"); break; +#include <sslopt-case.h> case 'V': print_version(); exit(0); case 'X': opt_xml = 1; @@ -407,7 +420,7 @@ static int get_options(int *argc, char ***argv) } if ((*argc < 1 && !opt_alldbs) || (*argc > 0 && opt_alldbs)) { - usage(); + short_usage(); return 1; } if (tty_password) @@ -457,9 +470,6 @@ static int dbConnect(char *host, char *user,char *passwd) if (opt_compress) mysql_options(&mysql_connection,MYSQL_OPT_COMPRESS,NullS); #ifdef HAVE_OPENSSL - if (opt_ssl_key || opt_ssl_cert || opt_ssl_ca || opt_ssl_capath || - opt_ssl_cipher) - opt_use_ssl= 1; if (opt_use_ssl) mysql_ssl_set(&mysql_connection, opt_ssl_key, opt_ssl_cert, opt_ssl_ca, opt_ssl_capath, opt_ssl_cipher); |