fixed 5.7 tests for pt-query-digest and pt-show-grants and tweaked SqlMode for global

This commit is contained in:
frank-cizmich
2016-01-10 20:35:20 -03:00
parent b71d8fec09
commit 96aff694b1
242 changed files with 1757 additions and 14 deletions

View File

@@ -13,6 +13,7 @@ use Test::More;
use PerconaTest;
use Sandbox;
use SqlModes;
require "$trunk/bin/pt-show-grants";
my $dp = new DSNParser(opts=>$dsn_opts);
@@ -34,7 +35,13 @@ my $cnf = '/tmp/12345/my.sandbox.cnf';
# #############################################################################
# Issue 445: mk-show-grants --revoke crashes
# #############################################################################
# allow auto create user for a moment
my $modes = new SqlModes($dbh, global=>1);
$modes->del('NO_AUTO_CREATE_USER');
diag(`/tmp/12345/use -u root -e "GRANT USAGE ON *.* TO ''\@''"`);
$modes->restore_original_modes();
$output = `/tmp/12345/use -e "SELECT user FROM mysql.user WHERE user = ''"`;
like(
$output,