Merge set-pts-tx-mode-bug-869005.

This commit is contained in:
Daniel Nichter
2012-07-25 16:36:32 -06:00

View File

@@ -9393,14 +9393,15 @@ sub get_cxn {
}
}
if ( $o->get('transaction') ) {
my $sql = "SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ";
eval {
PTDEBUG && _d($dbh, $sql);
$dbh->do($sql);
};
die "Failed to $sql: $EVAL_ERROR" if $EVAL_ERROR;
}
# Set repeatable read for both explicit and auto_commit transactions
# as lower isolation levels will not play nice with binlog_format=STATEMENT
# https://bugs.launchpad.net/percona-toolkit/+bug/869005
$sql = "SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ";
eval {
PTDEBUG && _d($dbh, $sql);
$dbh->do($sql);
};
die "Failed to $sql: $EVAL_ERROR" if $EVAL_ERROR;
$dsn_for{$dbh} = $dsn;