diff options
Diffstat (limited to 'client/mysqldump.c')
-rw-r--r-- | client/mysqldump.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c index 3b03b0c6751..1f8e7937c90 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -115,7 +115,7 @@ static char compatible_mode_normal_str[255]; static ulong opt_compatible_mode= 0; #define MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL 1 #define MYSQL_OPT_MASTER_DATA_COMMENTED_SQL 2 -static uint opt_mysql_port= 0, err_len= 0, opt_master_data; +static uint opt_mysql_port= 0, opt_master_data; static my_string opt_mysql_unix_port=0; static int first_error=0; static DYNAMIC_STRING extended_row; @@ -746,6 +746,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), char *end= compatible_mode_normal_str; int i; ulong mode; + uint err_len; opt_quoted= 1; opt_set_charset= 0; @@ -883,11 +884,11 @@ static int get_options(int *argc, char ***argv) /* ** DB_error -- prints mysql error message and exits the program. */ -static void DB_error(MYSQL *mysql, const char *when) +static void DB_error(MYSQL *mysql_arg, const char *when) { DBUG_ENTER("DB_error"); fprintf(stderr, "%s: Got error: %d: %s %s\n", my_progname, - mysql_errno(mysql), mysql_error(mysql), when); + mysql_errno(mysql_arg), mysql_error(mysql_arg), when); fflush(stderr); safe_exit(EX_MYSQLERR); DBUG_VOID_RETURN; @@ -1215,7 +1216,7 @@ static void print_quoted_xml(FILE *xml_file, const char *str, ulong len) ..., attribute_name_n, attribute_value_n, NullS) xml_file - output file sbeg - line beginning - send - line ending + line_end - line ending tag_name - XML tag name. first_attribute_name - tag and first attribute first_attribute_value - (Implied) value of first attribute @@ -1235,7 +1236,8 @@ static void print_quoted_xml(FILE *xml_file, const char *str, ulong len) All attribute_value arguments will be quoted before output. */ -static void print_xml_tag(FILE * xml_file, const char* sbeg, const char* send, +static void print_xml_tag(FILE * xml_file, const char* sbeg, + const char* line_end, const char* tag_name, const char* first_attribute_name, ...) { @@ -1265,7 +1267,7 @@ static void print_xml_tag(FILE * xml_file, const char* sbeg, const char* send, va_end(arg_list); fputc('>', xml_file); - fputs(send, xml_file); + fputs(line_end, xml_file); check_io(xml_file); } @@ -1279,7 +1281,7 @@ static void print_xml_tag(FILE * xml_file, const char* sbeg, const char* send, sbeg - line beginning stag_atr - tag and attribute sval - value of attribute - send - line ending + line_end - line ending DESCRIPTION Print tag with one attribute to the xml_file. Format is: @@ -1291,7 +1293,7 @@ static void print_xml_tag(FILE * xml_file, const char* sbeg, const char* send, static void print_xml_null_tag(FILE * xml_file, const char* sbeg, const char* stag_atr, const char* sval, - const char* send) + const char* line_end) { fputs(sbeg, xml_file); fputs("<", xml_file); @@ -1299,7 +1301,7 @@ static void print_xml_null_tag(FILE * xml_file, const char* sbeg, fputs("\"", xml_file); print_quoted_xml(xml_file, sval, strlen(sval)); fputs("\" xsi:nil=\"true\" />", xml_file); - fputs(send, xml_file); + fputs(line_end, xml_file); check_io(xml_file); } @@ -2876,7 +2878,7 @@ static int dump_tablespaces_for_tables(char *db, char **table_names, int tables) dynstr_trunc(&where, 1); dynstr_append(&where,"))"); - DBUG_PRINT("info",("Dump TS for Tables where: %s",where)); + DBUG_PRINT("info",("Dump TS for Tables where: %s",where.str)); r= dump_tablespaces(where.str); dynstr_free(&where); return r; @@ -2906,7 +2908,7 @@ static int dump_tablespaces_for_databases(char** databases) dynstr_trunc(&where, 1); dynstr_append(&where,"))"); - DBUG_PRINT("info",("Dump TS for DBs where: %s",where)); + DBUG_PRINT("info",("Dump TS for DBs where: %s",where.str)); r= dump_tablespaces(where.str); dynstr_free(&where); return r; @@ -2918,7 +2920,7 @@ static int dump_tablespaces(char* ts_where) MYSQL_RES *tableres; char buf[FN_REFLEN]; DYNAMIC_STRING sqlbuf; - int first; + int first= 0; /* The following are used for parsing the EXTRA field */ |