summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2005-01-14 10:59:37 +0100
committerunknown <guilhem@mysql.com>2005-01-14 10:59:37 +0100
commit5f533a36821d434fdd7e5771077c38407d7f276e (patch)
tree233fb7cfe6505e68b912e4ab5fe1502e9ca78406 /client
parent653db58bee2755c80642549b4536832ddaa200eb (diff)
parent196d6f34665f49895f84cd7055d5792fe2af4280 (diff)
downloadmariadb-git-5f533a36821d434fdd7e5771077c38407d7f276e.tar.gz
Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/mysql_src/mysql-4.1-clean sql/log_event.cc: Auto merged
Diffstat (limited to 'client')
-rw-r--r--client/mysqldump.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c
index d511dc3bbde..14ebe9ea8f7 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -2200,8 +2200,15 @@ static int start_transaction(MYSQL *mysql_con, my_bool consistent_read_now)
We use BEGIN for old servers. --single-transaction --master-data will fail
on old servers, but that's ok as it was already silently broken (it didn't
do a consistent read, so better tell people frankly, with the error).
+
+ We want the first consistent read to be used for all tables to dump so we
+ need the REPEATABLE READ level (not anything lower, for example READ
+ COMMITTED would give one new consistent read per dumped table).
*/
return (mysql_query_with_error_report(mysql_con, 0,
+ "SET SESSION TRANSACTION ISOLATION "
+ "LEVEL REPEATABLE READ") ||
+ mysql_query_with_error_report(mysql_con, 0,
consistent_read_now ?
"START TRANSACTION "
"WITH CONSISTENT SNAPSHOT" :