Below is the list of changes that have just been committed into a local
5.1 repository of cmiller. When cmiller does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-04-14 17:43:08-04:00, cmiller@stripped +2 -0
Bug#35157: mysqldump should use FLUSH TABLES NO_WRITE_TO_BINLOG \
when --master-data is used
When using the --master-data option with mysqldump, mysqldump uses
a FLUSH TABLES command. However, this statement got replicated to
the slave(s), which caused the slave(s) to block unnecessarily while
the FLUSH tables command completed.
Now, if the master-data option is set to one of the two "on" modes,
then use the "LOCAL" qualifier to ensure that it's not replicated.
client/mysqldump.c@stripped, 2008-04-14 17:43:04-04:00, cmiller@stripped +4 -1
If master_data is set to one of the two modes, then insert "LOCAL"
to the command to FLUSH TABLES so that the slaves aren't told to
flush also.
mysql-test/r/mysqldump.result@stripped, 2008-04-14 17:43:04-04:00,
cmiller@stripped +2 -2
Output of mysqldump changed.
diff -Nrup a/client/mysqldump.c b/client/mysqldump.c
--- a/client/mysqldump.c 2008-03-12 04:13:18 -04:00
+++ b/client/mysqldump.c 2008-04-14 17:43:04 -04:00
@@ -4326,7 +4326,10 @@ static int do_flush_tables_read_lock(MYS
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 -Nrup a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
--- a/mysql-test/r/mysqldump.result 2008-02-22 05:30:29 -05:00
+++ b/mysql-test/r/mysqldump.result 2008-04-14 17:43:04 -04:00
@@ -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)
| Thread |
|---|
| • bk commit into 5.1 tree (cmiller:1.2562) BUG#35157 | Chad MILLER | 14 Apr |