diff options
-rw-r--r-- | client/mysqldump.c | 5 | ||||
-rw-r--r-- | mysql-test/r/mysqldump.result | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c index 49f3d3ad71b..0cc8916fac4 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -4326,7 +4326,10 @@ static int do_flush_tables_read_lock(MYSQL *mysql_con) update starts between the two FLUSHes, we have that bad stall. */ return - ( mysql_query_with_error_report(mysql_con, 0, "FLUSH TABLES") || + ( mysql_query_with_error_report(mysql_con, 0, + ((opt_master_data != 0) ? + "FLUSH /*!40101 LOCAL */ TABLES" : + "FLUSH TABLES")) || mysql_query_with_error_report(mysql_con, 0, "FLUSH TABLES WITH READ LOCK") ); } diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index a1b8eaa52f8..032bc844824 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -3565,8 +3565,8 @@ use test; create user mysqltest_1@localhost; create table t1(a int, b varchar(34)); reset master; -mysqldump: Couldn't execute 'FLUSH TABLES': Access denied; you need the RELOAD privilege for this operation (1227) -mysqldump: Couldn't execute 'FLUSH TABLES': Access denied; you need the RELOAD privilege for this operation (1227) +mysqldump: Couldn't execute 'FLUSH /*!40101 LOCAL */ TABLES': Access denied; you need the RELOAD privilege for this operation (1227) +mysqldump: Couldn't execute 'FLUSH /*!40101 LOCAL */ TABLES': Access denied; you need the RELOAD privilege for this operation (1227) grant RELOAD on *.* to mysqltest_1@localhost; mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need the SUPER,REPLICATION CLIENT privilege for this operation (1227) mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need the SUPER,REPLICATION CLIENT privilege for this operation (1227) |