summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <lars@mysql.com>2005-07-01 12:01:00 +0200
committerunknown <lars@mysql.com>2005-07-01 12:01:00 +0200
commitf20c899892d8b8a453a3d54c5b29c93235804a01 (patch)
tree7a683fffb94a6ff2bc8bb34148e490492f7895dd /client
parent0ff72e6019d8f9deec9159db87cf7947142539b3 (diff)
downloadmariadb-git-f20c899892d8b8a453a3d54c5b29c93235804a01.tar.gz
BUG#11678: mysqldump --master-data should fail if master binlog disabled
client/mysqldump.c: Add error message in case master does not have binlogging enabled
Diffstat (limited to 'client')
-rw-r--r--client/mysqldump.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c
index fb5270c3222..4d340cb4051 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -2356,6 +2356,7 @@ static int do_show_master_status(MYSQL *mysql_con)
row = mysql_fetch_row(master);
if (row && row[0] && row[1])
{
+ /* SHOW MASTER STATUS reports file and position */
if (opt_comments)
fprintf(md_result_file,
"\n--\n-- Position to start replication or point-in-time "
@@ -2365,6 +2366,14 @@ static int do_show_master_status(MYSQL *mysql_con)
comment_prefix, row[0], row[1]);
check_io(md_result_file);
}
+ else if (!ignore_errors)
+ {
+ /* SHOW MASTER STATUS reports nothing and --force is not enabled */
+ my_printf_error(0, "Error: Binlogging on server not active",
+ MYF(0), mysql_error(mysql_con));
+ mysql_free_result(master);
+ return 1;
+ }
mysql_free_result(master);
}
return 0;