mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 21:19:59 +00:00
Wrap check for binlog_format in version directive to avoid error on MySQL 5.0.
This commit is contained in:
@@ -5887,11 +5887,12 @@ sub main {
|
|||||||
# instead, it should check if it's already set to STATEMENT.
|
# instead, it should check if it's already set to STATEMENT.
|
||||||
# This is becase starting with MySQL 5.1.29, changing the format
|
# This is becase starting with MySQL 5.1.29, changing the format
|
||||||
# requires a SUPER user.
|
# requires a SUPER user.
|
||||||
my $sql = 'SELECT @@binlog_format';
|
my $sql = '/*!50108 SELECT @@binlog_format */';
|
||||||
PTDEBUG && _d($dbh, $sql);
|
PTDEBUG && _d($dbh, $sql);
|
||||||
my ($original_binlog_format) = $dbh->selectrow_array($sql);
|
my ($original_binlog_format) = $dbh->selectrow_array($sql);
|
||||||
PTDEBUG && _d('Original binlog_format:', $original_binlog_format);
|
PTDEBUG && _d('Original binlog_format:', $original_binlog_format);
|
||||||
if ( $original_binlog_format !~ /STATEMENT/i ) {
|
if ( $original_binlog_format
|
||||||
|
&& $original_binlog_format !~ /STATEMENT/i ) {
|
||||||
$sql = q{/*!50108 SET @@binlog_format := 'STATEMENT'*/};
|
$sql = q{/*!50108 SET @@binlog_format := 'STATEMENT'*/};
|
||||||
eval {
|
eval {
|
||||||
PTDEBUG && _d($dbh, $sql);
|
PTDEBUG && _d($dbh, $sql);
|
||||||
|
Reference in New Issue
Block a user