mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 05:00:45 +00:00
Fixed all tests for MySQL 5.7
Most of the failing tests were failing due to changes in MySQL 5.7 default sql_mode and because of invalid timestamps ('0000-00-00')
This commit is contained in:
@@ -39,6 +39,7 @@ use Data::Dumper;
|
||||
$Data::Dumper::Indent = 1;
|
||||
$Data::Dumper::Sortkeys = 1;
|
||||
$Data::Dumper::Quotekeys = 0;
|
||||
use VersionParser;
|
||||
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
@@ -844,7 +845,14 @@ sub _explain_query {
|
||||
$dbh->do($sql);
|
||||
}
|
||||
|
||||
$sql = "EXPLAIN EXTENDED $query";
|
||||
$self->{db_version} ||= VersionParser->new($dbh);
|
||||
if ( $self->{db_version} < '5.7.3' ) {
|
||||
$sql = "EXPLAIN EXTENDED $query";
|
||||
}
|
||||
else {
|
||||
$sql = "EXPLAIN $query"; # EXTENDED is implicit as of 5.7.3
|
||||
}
|
||||
|
||||
PTDEBUG && _d($dbh, $sql);
|
||||
eval {
|
||||
$dbh->do($sql); # don't need the result
|
||||
|
Reference in New Issue
Block a user