PT-2109 - pt-mysql-summary throws an error when using sql_mode="ANSI_QUOTES" (#696)

* PT-2109 - pt-mysql-summary throws an error when using sql_mode="ANSI_QUOTES"

- Fixed issues still visible with SQL mode ANSI_QUOTES
- Added test cases for this mode

* PT-2109 - pt-mysql-summary throws an error when using sql_mode="ANSI_QUOTES"

- Removed keyring plugin check in the beginning of the test, because
  reported error would show up even on servers that do not have keyring
  plugin installed. Same applies to wsrep_on check and Percona Server
  features checks.
- Removed temporary dir setup, because not needed for this test.
This commit is contained in:
Sveta Smirnova
2023-11-03 01:46:32 +03:00
committed by GitHub
parent 817673755f
commit 1407b5380b
4 changed files with 97 additions and 8 deletions

View File

@@ -97,6 +97,35 @@ like(
"Security works"
);
#
# SQL Mode ANSI_QUOTES
#
my ($orig_sql_mode) = $master_dbh->selectrow_array(q{SELECT @@SQL_MODE});
$master_dbh->do("SET GLOBAL SQL_MODE='ANSI_QUOTES'");
$out = `$env $trunk/bin/$tool --sleep 1 --databases mysql 2>/dev/null -- --defaults-file=/tmp/12345/my.sandbox.cnf`;
like(
$out,
qr/Database Tables Views SPs Trigs Funcs FKs Partn\s+\Qmysql\E/,
"--databases works with SQL Mode ANSI_QUOTES"
);
like(
$out,
qr/# InnoDB #.*Version.*# MyISAM #/s,
"InnoDB section present with SQL Mode ANSI_QUOTES"
);
like(
$out,
qr/Users \| 2/,
"Security works with SQL Mode ANSI_QUOTES"
);
$master_dbh->do("SET GLOBAL SQL_MODE='${orig_sql_mode}'");
# --read-samples
for my $i (2..9) {
ok(