Merge pull request #297 from moritz/replication-only-when-needed

PT-1509 Only set binlog_format when necessary
This commit is contained in:
Carlos Salguero
2018-03-26 09:54:45 -03:00
committed by GitHub

View File

@@ -11023,7 +11023,8 @@ sub get_cxn {
# instead, it should check if it's already set to STATEMENT.
# This is becase starting with MySQL 5.1.29, changing the format
# requires a SUPER user.
if ( VersionParser->new($dbh) >= '5.1.29' ) {
if ( VersionParser->new($dbh) >= '5.1.29'
&& ($o->get('replicate') || $o->get('sync-to-master'))) {
$sql = 'SELECT @@binlog_format';
PTDEBUG && _d($dbh, $sql);
my ($original_binlog_format) = $dbh->selectrow_array($sql);