diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-02-25 16:04:35 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-02-25 16:04:35 +0100 |
commit | 0b9a0a3517ca2b75655f3af5c372cf333d3d5fe2 (patch) | |
tree | 5c67457ff8abbb89b203a7f55cda776b738c385b /client/mysqldump.c | |
parent | 6324c36bd703a0f55dcd49dd721af262f73cf7aa (diff) | |
parent | ff2e82f4a175b7b023cd167b2fa6e6fcd1bd192e (diff) | |
download | mariadb-git-0b9a0a3517ca2b75655f3af5c372cf333d3d5fe2.tar.gz |
5.5 merge
Diffstat (limited to 'client/mysqldump.c')
-rw-r--r-- | client/mysqldump.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c index dd3f767cbe1..cf42b161f8a 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -160,6 +160,8 @@ static void dynstr_set_checked(DYNAMIC_STRING *str, const char *init_str); static void dynstr_append_mem_checked(DYNAMIC_STRING *str, const char *append, uint length); static void dynstr_realloc_checked(DYNAMIC_STRING *str, ulong additional_size); + +static int do_start_slave_sql(MYSQL *mysql_con); /* Constant for detection of default value of default_charset. If default_charset is equal to mysql_universal_client_charset, then @@ -1494,6 +1496,8 @@ static void free_resources() static void maybe_exit(int error) { + if (opt_slave_data) + do_start_slave_sql(mysql); if (!first_error) first_error= error; if (ignore_errors) @@ -3642,7 +3646,8 @@ static void dump_table(char *table, char *db) field->type == MYSQL_TYPE_BLOB || field->type == MYSQL_TYPE_LONG_BLOB || field->type == MYSQL_TYPE_MEDIUM_BLOB || - field->type == MYSQL_TYPE_TINY_BLOB)) ? 1 : 0; + field->type == MYSQL_TYPE_TINY_BLOB || + field->type == MYSQL_TYPE_GEOMETRY)) ? 1 : 0; if (extended_insert && !opt_xml) { if (i == 0) @@ -5648,10 +5653,6 @@ int main(int argc, char **argv) dump_databases(argv); } - /* if --dump-slave , start the slave sql thread */ - if (opt_slave_data && do_start_slave_sql(mysql)) - goto err; - /* add 'START SLAVE' to end of dump */ if (opt_slave_apply && add_slave_statements()) goto err; @@ -5667,9 +5668,6 @@ int main(int argc, char **argv) if (opt_delete_master_logs && purge_bin_logs_to(mysql, bin_log_name)) goto err; -#ifdef HAVE_SMEM - my_free(shared_memory_base_name); -#endif /* No reason to explicitely COMMIT the transaction, neither to explicitely UNLOCK TABLES: these will be automatically be done by the server when we @@ -5677,6 +5675,14 @@ int main(int argc, char **argv) server. */ err: + /* if --dump-slave , start the slave sql thread */ + if (opt_slave_data && do_start_slave_sql(mysql)) + goto err; + +#ifdef HAVE_SMEM + my_free(shared_memory_base_name); +#endif + dbDisconnect(current_host); if (!path) write_footer(md_result_file); |