mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-03-30 02:00:12 +08:00
Merge set-pts-tx-mode-bug-869005.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user