Compare commits

...

31 Commits

Author SHA1 Message Date
Sveta Smirnova
05b7efcd27 Merge pull request #1000 from percona/PT-2471_Link_to_the_repository_documentation_is_broken
PT-2471 - Link to the repository documentation is broken
2025-08-29 01:35:54 +03:00
Sveta Smirnova
bca6c5bee8 Merge pull request #998 from percona/dependabot/go_modules/github.com/stretchr/testify-1.11.0
build(deps): bump github.com/stretchr/testify from 1.10.0 to 1.11.0
2025-08-26 21:41:04 +03:00
Sveta Smirnova
dcab1bb2ad PT-2471 - Link to the repository documentation is broken
- Fixed the link
2025-08-26 21:39:25 +03:00
Sveta Smirnova
6854715795 Merge pull request #891 from ehooi/PT-2401
PT-2401 - remove check to fix the 'table does not exist' problem when lower_case_table_names=2 is set
2025-08-26 19:44:15 +03:00
Sveta Smirnova
6414d071cd Merge pull request #997 from percona/PT-2467_t_pt-show-grants_basics.t_t_pt-table-checksum_basics.t_t_pt-table-sync_filters.t_t_pt-upgrade_diff_rows.t_fail_with_the_latest_PT
PT-2467 - t/pt-show-grants/basics.t t/pt-table-checksum/basics.t t/pt…
2025-08-26 19:43:51 +03:00
Sveta Smirnova
c1d3ebc72a Merge pull request #995 from percona/PT-2435_t_pt-online-schema-change_pt-1717-resume.t_fails_after_PT-2355_fix
PT-2435 - t/pt-online-schema-change/pt-1717-resume.t fails after PT-2…
2025-08-26 19:43:32 +03:00
Sveta Smirnova
670f4d159b Merge pull request #992 from percona/PT-1423_LP_1682929_pt-table-checksum_First_chunk_takes_too_long
PT-1423 - LP #1682929: pt-table-checksum: First chunk takes too long
2025-08-26 19:43:16 +03:00
Sveta Smirnova
a0dffc51e4 Merge pull request #989 from agejevasv/fix-precedence-error
Fix script crashing with precedence error
2025-08-26 19:43:00 +03:00
Sveta Smirnova
9e799fd04b Merge pull request #981 from Nyele93/PT-2465_patch_fix_for_mariadb_10.5_above
PT-2465 patch fix for erroneous flavour mismatch in mariadb-10.5.x and above
2025-08-26 19:42:44 +03:00
Sveta Smirnova
478255a6d5 Merge pull request #996 from utdrmac/pt-dup-index-invis
Add invisible option to pt-duplicate-key-checker
2025-08-26 19:42:23 +03:00
Sveta Smirnova
30f2ae5fee Update bin/pt-duplicate-key-checker 2025-08-26 19:39:53 +03:00
dependabot[bot]
c85ad15e3c build(deps): bump github.com/stretchr/testify from 1.10.0 to 1.11.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-version: 1.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-25 15:24:28 +00:00
Sveta Smirnova
afd8ccbbd5 PR-996 - Add invisible option to pt-duplicate-key-checker
- Fixed test case
2025-08-25 16:44:47 +03:00
Sveta Smirnova
9bb3ab4cbc PT-2440 - Support for MariaDB 10.5
- Added sandbox defaults for MariaDB 11.3
2025-08-23 03:41:22 +03:00
Sveta Smirnova
495869da3e PT-2440 - Support for MariaDB 10.5
- Updated non-libraries code in bin/pt-heartbeat, bin/pt-replica-restart, and bin/pt-slave-delay
- Adjusted lib/Sandbox.pm, so it does not require SSL for MariaDB
- Adjusted test case, so it is in line with other tests
2025-08-23 03:32:33 +03:00
Sveta Smirnova
4154acadc1 PT-2467 - t/pt-show-grants/basics.t t/pt-table-checksum/basics.t t/pt-table-sync/filters.t t/pt-upgrade/diff_rows.t fail with the latest PT
- Updated tests and results failed due to new percona.telemetry user
2025-08-22 18:38:07 +03:00
utdrmac
01db562b10 some spelling mistake 2025-08-20 16:34:30 -05:00
utdrmac
059a6fb52c add test case 2025-08-20 16:20:12 -05:00
utdrmac
be598413ef add invisible option to pt-duplicate-key-checker 2025-08-20 16:06:16 -05:00
Sveta Smirnova
d60ffe0654 PT-2435 - t/pt-online-schema-change/pt-1717-resume.t fails after PT-2355 fix
- Fixed code that incorrectly stored boundaries
2025-08-18 21:22:41 +03:00
Nyele93
a97c422851 PT-2465 patch fix for erroneous flavour mismatch in mariadb-10.5.x and above. This patch includes the fixed regex for checking DB flavour to include the case-insensitive marker i on the searches for MariaDB 2025-08-18 17:42:10 +03:00
Nyele
6c9deb9d66 Merge branch 'percona:3.x' into PT-2465_patch_fix_for_mariadb_10.5_above 2025-08-18 14:44:30 +03:00
Nyele93
a20dcbf4d3 executed ./util/update-modules bin/pt-online-schema-change 2025-08-18 13:05:30 +03:00
Sveta Smirnova
825dea7547 PT-1423 - LP #1682929: pt-table-checksum: First chunk takes too long
- Modified the tool, so if both --chunk-size and --chunk-time are specified, it starts chunking with the indicated --chunk-size, and then adjusts chunk size to fit the time.
2025-08-16 02:01:22 +03:00
Sveta Smirnova
3d0c0c623f Merge branch '3.x' into HEAD 2025-08-15 17:18:09 +03:00
Sveta Smirnova
75feef2f96 PT-2401 - pt-online-schema-change 'table does not exist' on macos
- Modified code, so it still checks table name but based on the lower_case_table_names option
2025-08-15 17:16:37 +03:00
Sveta Smirnova
82a2ac7a40 PR-989 - Fix script crashing with precedence error
- Fixed typo in the tool code
- Added more diagnostic information into test for pt-1919
2025-08-13 17:03:29 +03:00
Viktoras Agejevas
58cebefdcc Fix script crashing with precedence error
On Perl v5.42.0 the process exits with status 255 and error: Possible precedence problem between ! and string eq at pt-online-schema-change line 10633.
2025-08-06 16:47:21 +03:00
mamadi
2dd8de7def created test case for patch 2025-07-16 16:45:17 +02:00
mamadi
6c11129419 PT-2465 patch fix for erroneous flavour mismatch in mariadb-10.5.x and above 2025-07-16 13:37:47 +02:00
Taehyung Lim
5989d2883c remove check to fix the 'table does not exist' problem when lower_case_table_names=2 is set 2025-05-19 20:09:04 +09:00
33 changed files with 1032 additions and 170 deletions

View File

@@ -2120,12 +2120,6 @@ sub check_table {
return 0;
}
PTDEBUG && _d("lower_case_table_names=$lower_case_table_names");
if ($lower_case_table_names > 0) {
PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase");
$tbl = lc $tbl;
}
my $db_tbl = $q->quote($db, $tbl);
PTDEBUG && _d('Checking', $db_tbl);
@@ -2141,7 +2135,9 @@ sub check_table {
$self->{check_table_error} = $e;
return 0;
}
if ( !$row->[0] || $row->[0] ne $tbl ) {
if ( !$row->[0]
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
PTDEBUG && _d('Table does not exist');
return 0;
}
@@ -3932,7 +3928,7 @@ sub _find_replicas_by_hosts {
my $vp = VersionParser->new($dbh);
my $sql = 'SHOW REPLICAS';
my $source_name = 'source';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$sql = 'SHOW SLAVE HOSTS';
$source_name='master';
}
@@ -4055,7 +4051,7 @@ sub get_source_dsn {
my $vp = VersionParser->new($dbh);
my $source_host = 'source_host';
my $source_port = 'source_port';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_host = 'master_host';
$source_port = 'master_port';
}
@@ -4129,7 +4125,7 @@ sub get_source_status {
my $vp = VersionParser->new($dbh);
my $source_name = 'binary log';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_name = 'master';
}
@@ -4572,13 +4568,13 @@ sub get_cxn_from_dsn_table {
sub get_source_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'master' : 'source';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'master' : 'source';
}
sub get_replica_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'slave' : 'replica';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'slave' : 'replica';
}
sub _d {

View File

@@ -504,12 +504,6 @@ sub check_table {
return 0;
}
PTDEBUG && _d("lower_case_table_names=$lower_case_table_names");
if ($lower_case_table_names > 0) {
PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase");
$tbl = lc $tbl;
}
my $db_tbl = $q->quote($db, $tbl);
PTDEBUG && _d('Checking', $db_tbl);
@@ -525,7 +519,9 @@ sub check_table {
$self->{check_table_error} = $e;
return 0;
}
if ( !$row->[0] || $row->[0] ne $tbl ) {
if ( !$row->[0]
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
PTDEBUG && _d('Table does not exist');
return 0;
}
@@ -5301,12 +5297,19 @@ sub print_duplicate_key {
if ( $o->get('sql') ) {
if ( $dupe->{dupe_type} ne 'clustered' ) {
print "# To remove this duplicate "
. ($args{is_fk} ? 'foreign key' : 'index')
. ", execute:\n"
. 'ALTER TABLE ' . $q->quote($db, $tbl)
. ($args{is_fk} ? ' DROP FOREIGN KEY ' : ' DROP INDEX ')
. "`$dupe->{key}`;\n";
if ( $o->get('invisible') && !$args{is_fk} ) {
print "# To make this index invisible, execute:\n"
. 'ALTER TABLE ' . $q->quote($db, $tbl)
. " ALTER INDEX `$dupe->{key}` INVISIBLE;\n";
}
else {
print "# To remove this duplicate "
. ($args{is_fk} ? 'foreign key' : 'index')
. ", execute:\n"
. 'ALTER TABLE ' . $q->quote($db, $tbl)
. ($args{is_fk} ? ' DROP FOREIGN KEY ' : ' DROP INDEX ')
. "`$dupe->{key}`;\n";
}
}
else {
# Suggest shortening clustered dupes instead of
@@ -5566,6 +5569,19 @@ type: Hash
Ignore this comma-separated list of tables. Table names may be qualified with
the database name.
=item --invisible
The output SQL will make the index INVISIBLE, instead of dropping it.
An invisible index cannot be considered by the query optimizer, but is still
maintained when writes happen to the table. To make the index usable by the
optimizer, execute ALTER INDEX .. VISIBLE
While dropping an index is a fast, background operation, adding indexes is
a slow, CPU, and disk IO intensive operation. If you discover that an index
was made invisible incorrectly, it becomes a NOOP (no-operation) to make the index visible again,
compared to completely re-adding the index.
=item --key-types
type: string; default: fk

View File

@@ -2067,12 +2067,6 @@ sub check_table {
return 0;
}
PTDEBUG && _d("lower_case_table_names=$lower_case_table_names");
if ($lower_case_table_names > 0) {
PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase");
$tbl = lc $tbl;
}
my $db_tbl = $q->quote($db, $tbl);
PTDEBUG && _d('Checking', $db_tbl);
@@ -2088,7 +2082,9 @@ sub check_table {
$self->{check_table_error} = $e;
return 0;
}
if ( !$row->[0] || $row->[0] ne $tbl ) {
if ( !$row->[0]
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
PTDEBUG && _d('Table does not exist');
return 0;
}

View File

@@ -384,7 +384,7 @@ sub _find_replicas_by_hosts {
my $vp = VersionParser->new($dbh);
my $sql = 'SHOW REPLICAS';
my $source_name = 'source';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$sql = 'SHOW SLAVE HOSTS';
$source_name='master';
}
@@ -507,7 +507,7 @@ sub get_source_dsn {
my $vp = VersionParser->new($dbh);
my $source_host = 'source_host';
my $source_port = 'source_port';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_host = 'master_host';
$source_port = 'master_port';
}
@@ -581,7 +581,7 @@ sub get_source_status {
my $vp = VersionParser->new($dbh);
my $source_name = 'binary log';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_name = 'master';
}
@@ -1024,13 +1024,13 @@ sub get_cxn_from_dsn_table {
sub get_source_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'master' : 'source';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'master' : 'source';
}
sub get_replica_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'slave' : 'replica';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'slave' : 'replica';
}
sub _d {
@@ -3941,12 +3941,6 @@ sub check_table {
return 0;
}
PTDEBUG && _d("lower_case_table_names=$lower_case_table_names");
if ($lower_case_table_names > 0) {
PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase");
$tbl = lc $tbl;
}
my $db_tbl = $q->quote($db, $tbl);
PTDEBUG && _d('Checking', $db_tbl);
@@ -3962,7 +3956,9 @@ sub check_table {
$self->{check_table_error} = $e;
return 0;
}
if ( !$row->[0] || $row->[0] ne $tbl ) {
if ( !$row->[0]
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
PTDEBUG && _d('Table does not exist');
return 0;
}
@@ -6454,7 +6450,7 @@ sub main {
my $vp = VersionParser->new($dbh);
my $source_name = 'source';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_name = 'master';
}
@@ -6497,7 +6493,7 @@ sub main {
my $sql;
if ( @master_status_cols ) {
if ( $vp ge '8.1' && $vp->flavor() !~ m/maria/ ) {
if ( $vp ge '8.1' && $vp->flavor() !~ m/maria/i ) {
$sql = 'SHOW BINARY LOG STATUS';
}
else {
@@ -6515,7 +6511,7 @@ sub main {
}
if ( @slave_status_cols ) {
if ( $vp ge '8.1' && $vp->flavor() !~ m/maria/ ) {
if ( $vp ge '8.1' && $vp->flavor() !~ m/maria/i ) {
$sql = 'SHOW REPLICA STATUS';
}
else {

View File

@@ -3319,12 +3319,6 @@ sub check_table {
return 0;
}
PTDEBUG && _d("lower_case_table_names=$lower_case_table_names");
if ($lower_case_table_names > 0) {
PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase");
$tbl = lc $tbl;
}
my $db_tbl = $q->quote($db, $tbl);
PTDEBUG && _d('Checking', $db_tbl);
@@ -3340,7 +3334,9 @@ sub check_table {
$self->{check_table_error} = $e;
return 0;
}
if ( !$row->[0] || $row->[0] ne $tbl ) {
if ( !$row->[0]
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
PTDEBUG && _d('Table does not exist');
return 0;
}

View File

@@ -3190,12 +3190,6 @@ sub check_table {
return 0;
}
PTDEBUG && _d("lower_case_table_names=$lower_case_table_names");
if ($lower_case_table_names > 0) {
PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase");
$tbl = lc $tbl;
}
my $db_tbl = $q->quote($db, $tbl);
PTDEBUG && _d('Checking', $db_tbl);
@@ -3211,7 +3205,9 @@ sub check_table {
$self->{check_table_error} = $e;
return 0;
}
if ( !$row->[0] || $row->[0] ne $tbl ) {
if ( !$row->[0]
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
PTDEBUG && _d('Table does not exist');
return 0;
}
@@ -4206,7 +4202,7 @@ sub _find_replicas_by_hosts {
my $vp = VersionParser->new($dbh);
my $sql = 'SHOW REPLICAS';
my $source_name = 'source';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$sql = 'SHOW SLAVE HOSTS';
$source_name='master';
}
@@ -4329,7 +4325,7 @@ sub get_source_dsn {
my $vp = VersionParser->new($dbh);
my $source_host = 'source_host';
my $source_port = 'source_port';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_host = 'master_host';
$source_port = 'master_port';
}
@@ -4403,7 +4399,7 @@ sub get_source_status {
my $vp = VersionParser->new($dbh);
my $source_name = 'binary log';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_name = 'master';
}
@@ -4846,13 +4842,13 @@ sub get_cxn_from_dsn_table {
sub get_source_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'master' : 'source';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'master' : 'source';
}
sub get_replica_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'slave' : 'replica';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'slave' : 'replica';
}
sub _d {

View File

@@ -3509,12 +3509,6 @@ sub check_table {
return 0;
}
PTDEBUG && _d("lower_case_table_names=$lower_case_table_names");
if ($lower_case_table_names > 0) {
PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase");
$tbl = lc $tbl;
}
my $db_tbl = $q->quote($db, $tbl);
PTDEBUG && _d('Checking', $db_tbl);
@@ -3530,7 +3524,9 @@ sub check_table {
$self->{check_table_error} = $e;
return 0;
}
if ( !$row->[0] || $row->[0] ne $tbl ) {
if ( !$row->[0]
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
PTDEBUG && _d('Table does not exist');
return 0;
}
@@ -4497,7 +4493,7 @@ sub _find_replicas_by_hosts {
my $vp = VersionParser->new($dbh);
my $sql = 'SHOW REPLICAS';
my $source_name = 'source';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$sql = 'SHOW SLAVE HOSTS';
$source_name='master';
}
@@ -4620,7 +4616,7 @@ sub get_source_dsn {
my $vp = VersionParser->new($dbh);
my $source_host = 'source_host';
my $source_port = 'source_port';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_host = 'master_host';
$source_port = 'master_port';
}
@@ -4694,7 +4690,7 @@ sub get_source_status {
my $vp = VersionParser->new($dbh);
my $source_name = 'binary log';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_name = 'master';
}
@@ -5137,13 +5133,13 @@ sub get_cxn_from_dsn_table {
sub get_source_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'master' : 'source';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'master' : 'source';
}
sub get_replica_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'slave' : 'replica';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'slave' : 'replica';
}
sub _d {
@@ -8749,7 +8745,7 @@ sub main {
}
# Explicit --chunk-size disable auto chunk sizing.
$o->set('chunk-time', 0) if $o->got('chunk-size');
$o->set('chunk-time', 0) if $o->got('chunk-size') && !$o->got('chunk-time');
if (!$o->get('swap-tables') && !$o->get('drop-triggers')) {
PTDEBUG && _d('Enabling no-drop-new-table since no-swap-tables & no-drop-triggers were specified');
$o->set('drop-new-table', 0);
@@ -8879,7 +8875,7 @@ sub main {
# it's a hack, like ignoring a problem instead of fixing it somehow. We
# should take a look at the things that get printed in a "normal"
# non-quiet run, and "if !quiet" them, and then do some kind of Logger.pm
# or Messager.pm module for a future release.
# or Message.pm module for a future release.
close STDOUT;
open STDOUT, '>', '/dev/null'
or warn "Cannot reopen STDOUT to /dev/null: $OS_ERROR";
@@ -10634,7 +10630,7 @@ sub main {
$plugin->after_copy_rows();
}
if ( $o->get('preserve-triggers') ) {
if ( !$o->get('swap-tables') && $o->get('drop-new-table') && !$o->get('alter-foreign-keys-method') eq "drop-swap" ) {
if ( !$o->get('swap-tables') && $o->get('drop-new-table') && ( $o->get('alter-foreign-keys-method') ne "drop_swap" ) ) {
print ts("Skipping triggers creation since --no-swap-tables was specified along with --drop-new-table\n");
} else {
print ts("Adding original triggers to new table.\n");
@@ -12466,9 +12462,8 @@ sub exec_nibble {
# Success: no warnings, no errors. Record and return nibble time.
if ( $hist_sth ) {
$hist_sth->execute(
# WHERE
@{$boundary->{lower}}, # upper boundary values
@{$boundary->{upper}}, # lower boundary values
$lb_quoted, # upper boundary values
$ub_quoted, # lower boundary values
);
}
@@ -13093,8 +13088,9 @@ This option can override the default behavior, which is to adjust chunk size
dynamically to try to make chunks run in exactly L<"--chunk-time"> seconds.
When this option isn't set explicitly, its default value is used as a starting
point, but after that, the tool ignores this option's value. If you set this
option explicitly, however, then it disables the dynamic adjustment behavior and
tries to make all chunks exactly the specified number of rows.
option explicitly, and do not set L<"--chunk-time"> explicitly, then it disables
the dynamic adjustment behavior and tries to make all chunks exactly the specified
number of rows.
=item --chunk-size-limit
@@ -13131,7 +13127,13 @@ changes in server load, the tool adapts quickly.
If this option is set to zero, the chunk size doesn't auto-adjust, so query
times will vary, but query chunk sizes will not. Another way to do the same
thing is to specify a value for L<"--chunk-size"> explicitly, instead of leaving
it at the default.
it at the default, and omit the option L<"--chunk-time">.
If both options L<"--chunk-size"> and L<"--chunk-time"> set explicitly, initial
chunk size will be as specified by the option L<"--chunk-size">, but later it will
be adjusted, so that the next query takes this amount of time (in seconds)
to execute. Use this option if the tool spends too much time copying the first chunk
with default L<"--chunk-size">.
=item --config

View File

@@ -9070,12 +9070,6 @@ sub check_table {
return 0;
}
PTDEBUG && _d("lower_case_table_names=$lower_case_table_names");
if ($lower_case_table_names > 0) {
PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase");
$tbl = lc $tbl;
}
my $db_tbl = $q->quote($db, $tbl);
PTDEBUG && _d('Checking', $db_tbl);
@@ -9091,7 +9085,9 @@ sub check_table {
$self->{check_table_error} = $e;
return 0;
}
if ( !$row->[0] || $row->[0] ne $tbl ) {
if ( !$row->[0]
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
PTDEBUG && _d('Table does not exist');
return 0;
}
@@ -10803,7 +10799,7 @@ sub _find_replicas_by_hosts {
my $vp = VersionParser->new($dbh);
my $sql = 'SHOW REPLICAS';
my $source_name = 'source';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$sql = 'SHOW SLAVE HOSTS';
$source_name='master';
}
@@ -10926,7 +10922,7 @@ sub get_source_dsn {
my $vp = VersionParser->new($dbh);
my $source_host = 'source_host';
my $source_port = 'source_port';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_host = 'master_host';
$source_port = 'master_port';
}
@@ -11000,7 +10996,7 @@ sub get_source_status {
my $vp = VersionParser->new($dbh);
my $source_name = 'binary log';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_name = 'master';
}
@@ -11443,13 +11439,13 @@ sub get_cxn_from_dsn_table {
sub get_source_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'master' : 'source';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'master' : 'source';
}
sub get_replica_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'slave' : 'replica';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'slave' : 'replica';
}
sub _d {

View File

@@ -2531,7 +2531,7 @@ sub _find_replicas_by_hosts {
my $vp = VersionParser->new($dbh);
my $sql = 'SHOW REPLICAS';
my $source_name = 'source';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$sql = 'SHOW SLAVE HOSTS';
$source_name='master';
}
@@ -2654,7 +2654,7 @@ sub get_source_dsn {
my $vp = VersionParser->new($dbh);
my $source_host = 'source_host';
my $source_port = 'source_port';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_host = 'master_host';
$source_port = 'master_port';
}
@@ -2728,7 +2728,7 @@ sub get_source_status {
my $vp = VersionParser->new($dbh);
my $source_name = 'binary log';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_name = 'master';
}
@@ -3171,13 +3171,13 @@ sub get_cxn_from_dsn_table {
sub get_source_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'master' : 'source';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'master' : 'source';
}
sub get_replica_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'slave' : 'replica';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'slave' : 'replica';
}
sub _d {

View File

@@ -2945,7 +2945,7 @@ sub _find_replicas_by_hosts {
my $vp = VersionParser->new($dbh);
my $sql = 'SHOW REPLICAS';
my $source_name = 'source';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$sql = 'SHOW SLAVE HOSTS';
$source_name='master';
}
@@ -3068,7 +3068,7 @@ sub get_source_dsn {
my $vp = VersionParser->new($dbh);
my $source_host = 'source_host';
my $source_port = 'source_port';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_host = 'master_host';
$source_port = 'master_port';
}
@@ -3142,7 +3142,7 @@ sub get_source_status {
my $vp = VersionParser->new($dbh);
my $source_name = 'binary log';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_name = 'master';
}
@@ -3585,13 +3585,13 @@ sub get_cxn_from_dsn_table {
sub get_source_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'master' : 'source';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'master' : 'source';
}
sub get_replica_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'slave' : 'replica';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'slave' : 'replica';
}
sub _d {
@@ -5438,7 +5438,7 @@ sub watch_server {
my $source_name = 'source';
my $source_change = 'replication source';
my $replica_name = 'replica';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_name = 'master';
$source_change = 'master';
$replica_name = 'slave';

View File

@@ -4559,7 +4559,7 @@ sub main {
# Check version, refuse working with 8.4
my $version = VersionParser->new($slave_dbh);
if ( $version ge '8.1' && $version->flavor() !~ m/maria/ ) {
if ( $version ge '8.1' && $version->flavor() !~ m/maria/i ) {
die "This tool does not work with MySQL 8.1 and newer.\n";
}

View File

@@ -4703,12 +4703,6 @@ sub check_table {
return 0;
}
PTDEBUG && _d("lower_case_table_names=$lower_case_table_names");
if ($lower_case_table_names > 0) {
PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase");
$tbl = lc $tbl;
}
my $db_tbl = $q->quote($db, $tbl);
PTDEBUG && _d('Checking', $db_tbl);
@@ -4724,7 +4718,9 @@ sub check_table {
$self->{check_table_error} = $e;
return 0;
}
if ( !$row->[0] || $row->[0] ne $tbl ) {
if ( !$row->[0]
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
PTDEBUG && _d('Table does not exist');
return 0;
}
@@ -5452,7 +5448,7 @@ sub _find_replicas_by_hosts {
my $vp = VersionParser->new($dbh);
my $sql = 'SHOW REPLICAS';
my $source_name = 'source';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$sql = 'SHOW SLAVE HOSTS';
$source_name='master';
}
@@ -5575,7 +5571,7 @@ sub get_source_dsn {
my $vp = VersionParser->new($dbh);
my $source_host = 'source_host';
my $source_port = 'source_port';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_host = 'master_host';
$source_port = 'master_port';
}
@@ -5649,7 +5645,7 @@ sub get_source_status {
my $vp = VersionParser->new($dbh);
my $source_name = 'binary log';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_name = 'master';
}
@@ -6092,13 +6088,13 @@ sub get_cxn_from_dsn_table {
sub get_source_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'master' : 'source';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'master' : 'source';
}
sub get_replica_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'slave' : 'replica';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'slave' : 'replica';
}
sub _d {

View File

@@ -3047,12 +3047,6 @@ sub check_table {
return 0;
}
PTDEBUG && _d("lower_case_table_names=$lower_case_table_names");
if ($lower_case_table_names > 0) {
PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase");
$tbl = lc $tbl;
}
my $db_tbl = $q->quote($db, $tbl);
PTDEBUG && _d('Checking', $db_tbl);
@@ -3068,7 +3062,9 @@ sub check_table {
$self->{check_table_error} = $e;
return 0;
}
if ( !$row->[0] || $row->[0] ne $tbl ) {
if ( !$row->[0]
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
PTDEBUG && _d('Table does not exist');
return 0;
}
@@ -6982,7 +6978,7 @@ sub _find_replicas_by_hosts {
my $vp = VersionParser->new($dbh);
my $sql = 'SHOW REPLICAS';
my $source_name = 'source';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$sql = 'SHOW SLAVE HOSTS';
$source_name='master';
}
@@ -7105,7 +7101,7 @@ sub get_source_dsn {
my $vp = VersionParser->new($dbh);
my $source_host = 'source_host';
my $source_port = 'source_port';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_host = 'master_host';
$source_port = 'master_port';
}
@@ -7179,7 +7175,7 @@ sub get_source_status {
my $vp = VersionParser->new($dbh);
my $source_name = 'binary log';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_name = 'master';
}
@@ -7622,13 +7618,13 @@ sub get_cxn_from_dsn_table {
sub get_source_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'master' : 'source';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'master' : 'source';
}
sub get_replica_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'slave' : 'replica';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'slave' : 'replica';
}
sub _d {

View File

@@ -7057,12 +7057,6 @@ sub check_table {
return 0;
}
PTDEBUG && _d("lower_case_table_names=$lower_case_table_names");
if ($lower_case_table_names > 0) {
PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase");
$tbl = lc $tbl;
}
my $db_tbl = $q->quote($db, $tbl);
PTDEBUG && _d('Checking', $db_tbl);
@@ -7078,7 +7072,9 @@ sub check_table {
$self->{check_table_error} = $e;
return 0;
}
if ( !$row->[0] || $row->[0] ne $tbl ) {
if ( !$row->[0]
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
PTDEBUG && _d('Table does not exist');
return 0;
}

View File

@@ -8,7 +8,7 @@ It is recommended to install Percona software from official repositories:
1. Configure Percona repositories as described in
`Percona Software Repositories Documentation
<https://www.percona.com/doc/percona-repo-config/index.html>`_.
<https://docs.percona.com/percona-software-repositories/index.html>`_.
#. Install Percona Toolkit using the corresponding package manager:

2
go.mod
View File

@@ -26,7 +26,7 @@ require (
github.com/rs/zerolog v1.34.0
github.com/shirou/gopsutil v3.21.11+incompatible
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.10.0
github.com/stretchr/testify v1.11.0
github.com/xlab/treeprint v1.2.0
go.mongodb.org/mongo-driver v1.17.4
golang.org/x/crypto v0.41.0

4
go.sum
View File

@@ -99,8 +99,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.11.0 h1:ib4sjIrwZKxE5u/Japgo/7SJV3PvgjGiRNAvTVGqQl8=
github.com/stretchr/testify v1.11.0/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM=
github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI=
github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms=

View File

@@ -340,7 +340,7 @@ sub _find_replicas_by_hosts {
my $vp = VersionParser->new($dbh);
my $sql = 'SHOW REPLICAS';
my $source_name = 'source';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$sql = 'SHOW SLAVE HOSTS';
$source_name='master';
}
@@ -485,7 +485,7 @@ sub get_source_dsn {
my $vp = VersionParser->new($dbh);
my $source_host = 'source_host';
my $source_port = 'source_port';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_host = 'master_host';
$source_port = 'master_port';
}
@@ -566,7 +566,7 @@ sub get_source_status {
my $vp = VersionParser->new($dbh);
my $source_name = 'binary log';
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/ ) {
if ( $vp lt '8.1' || $vp->flavor() =~ m/maria/i ) {
$source_name = 'master';
}
@@ -1123,13 +1123,13 @@ sub get_cxn_from_dsn_table {
sub get_source_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'master' : 'source';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'master' : 'source';
}
sub get_replica_name {
my ($dbh) = @_;
my $vp = VersionParser->new($dbh);
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/) ? 'slave' : 'replica';
return ($vp lt '8.1' || $vp->flavor() =~ m/maria/i) ? 'slave' : 'replica';
}
sub _d {

View File

@@ -134,7 +134,12 @@ sub create_dbs {
sub get_dbh_for {
my ( $self, $server, $cxn_ops, $user ) = @_;
_check_server($server);
$cxn_ops ||= { AutoCommit => 1, mysql_enable_utf8 => 1, mysql_ssl => 1 };
if ($ENV{FORK} || "" eq 'mariadb') {
$cxn_ops ||= { AutoCommit => 1, mysql_enable_utf8 => 1, mysql_ssl => 0 };
}
else {
$cxn_ops ||= { AutoCommit => 1, mysql_enable_utf8 => 1, mysql_ssl => 1 };
}
$user ||= 'msandbox';
PTDEBUG && _d('dbh for', $server, 'on port', $port_for{$server});
my $dp = $self->{DSNParser};

View File

@@ -341,12 +341,6 @@ sub check_table {
return 0;
}
PTDEBUG && _d("lower_case_table_names=$lower_case_table_names");
if ($lower_case_table_names > 0) {
PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase");
$tbl = lc $tbl;
}
my $db_tbl = $q->quote($db, $tbl);
PTDEBUG && _d('Checking', $db_tbl);
@@ -362,7 +356,9 @@ sub check_table {
$self->{check_table_error} = $e;
return 0;
}
if ( !$row->[0] || $row->[0] ne $tbl ) {
if ( !$row->[0]
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
PTDEBUG && _d('Table does not exist');
return 0;
}

Binary file not shown.

View File

@@ -0,0 +1,29 @@
[client]
user = msandbox
password = msandbox
port = PORT
socket = /tmp/PORT/mysql_sandboxPORT.sock
[mysqld]
port = PORT
socket = /tmp/PORT/mysql_sandboxPORT.sock
pid-file = /tmp/PORT/data/mysql_sandboxPORT.pid
basedir = PERCONA_TOOLKIT_SANDBOX
datadir = /tmp/PORT/data
key_buffer_size = 16M
innodb_buffer_pool_size = 16M
innodb_data_home_dir = /tmp/PORT/data
innodb_log_group_home_dir = /tmp/PORT/data
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_file_size = 64M
log-bin = mysql-bin
relay_log = mysql-relay-bin
log_slave_updates
server-id = PORT
report-host = 127.0.0.1
report-port = PORT
log-error = /tmp/PORT/data/mysqld.log
innodb_lock_wait_timeout = 3
general_log
general_log_file = genlog
performance_schema = ON

View File

@@ -0,0 +1,627 @@
USE `mysql`;
-- MySQL dump 10.16 Distrib 10.1.21-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: localhost
-- ------------------------------------------------------
-- Server version 10.1.21-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `column_stats`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `column_stats` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`column_name` varchar(64) COLLATE utf8_bin NOT NULL,
`min_value` varbinary(255) DEFAULT NULL,
`max_value` varbinary(255) DEFAULT NULL,
`nulls_ratio` decimal(12,4) DEFAULT NULL,
`avg_length` decimal(12,4) DEFAULT NULL,
`avg_frequency` decimal(12,4) DEFAULT NULL,
`hist_size` tinyint(3) unsigned DEFAULT NULL,
`hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL,
`histogram` varbinary(255) DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`,`column_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `columns_priv`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `columns_priv` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `db`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `db` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
PRIMARY KEY (`Host`,`Db`,`User`),
KEY `User` (`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `event`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `event` (
`db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`name` char(64) NOT NULL DEFAULT '',
`body` longblob NOT NULL,
`definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`execute_at` datetime DEFAULT NULL,
`interval_value` int(11) DEFAULT NULL,
`interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`last_executed` datetime DEFAULT NULL,
`starts` datetime DEFAULT NULL,
`ends` datetime DEFAULT NULL,
`status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED',
`on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP',
`sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '',
`comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`originator` int(10) unsigned NOT NULL,
`time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM',
`character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`body_utf8` longblob,
PRIMARY KEY (`db`,`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `func`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `func` (
`name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`ret` tinyint(1) NOT NULL DEFAULT '0',
`dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `gtid_slave_pos`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `gtid_slave_pos` (
`domain_id` int(10) unsigned NOT NULL,
`sub_id` bigint(20) unsigned NOT NULL,
`server_id` int(10) unsigned NOT NULL,
`seq_no` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`domain_id`,`sub_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Replication slave GTID position';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `help_category`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `help_category` (
`help_category_id` smallint(5) unsigned NOT NULL,
`name` char(64) NOT NULL,
`parent_category_id` smallint(5) unsigned DEFAULT NULL,
`url` text NOT NULL,
PRIMARY KEY (`help_category_id`),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help categories';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `help_keyword`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `help_keyword` (
`help_keyword_id` int(10) unsigned NOT NULL,
`name` char(64) NOT NULL,
PRIMARY KEY (`help_keyword_id`),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help keywords';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `help_relation`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `help_relation` (
`help_topic_id` int(10) unsigned NOT NULL,
`help_keyword_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`help_keyword_id`,`help_topic_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='keyword-topic relation';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `help_topic`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `help_topic` (
`help_topic_id` int(10) unsigned NOT NULL,
`name` char(64) NOT NULL,
`help_category_id` smallint(5) unsigned NOT NULL,
`description` text NOT NULL,
`example` text NOT NULL,
`url` text NOT NULL,
PRIMARY KEY (`help_topic_id`),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help topics';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `host`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `host` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
PRIMARY KEY (`Host`,`Db`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `index_stats`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `index_stats` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`index_name` varchar(64) COLLATE utf8_bin NOT NULL,
`prefix_arity` int(11) unsigned NOT NULL,
`avg_frequency` decimal(12,4) DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`,`index_name`,`prefix_arity`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Indexes';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `innodb_index_stats`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `innodb_index_stats` (
`database_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`index_name` varchar(64) COLLATE utf8_bin NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`stat_name` varchar(64) COLLATE utf8_bin NOT NULL,
`stat_value` bigint(20) unsigned NOT NULL,
`sample_size` bigint(20) unsigned DEFAULT NULL,
`stat_description` varchar(1024) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`database_name`,`table_name`,`index_name`,`stat_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `innodb_table_stats`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `innodb_table_stats` (
`database_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`n_rows` bigint(20) unsigned NOT NULL,
`clustered_index_size` bigint(20) unsigned NOT NULL,
`sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`database_name`,`table_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `plugin`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `plugin` (
`name` varchar(64) NOT NULL DEFAULT '',
`dl` varchar(128) NOT NULL DEFAULT '',
PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL plugins';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `proc`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `proc` (
`db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`name` char(64) NOT NULL DEFAULT '',
`type` enum('FUNCTION','PROCEDURE') NOT NULL,
`specific_name` char(64) NOT NULL DEFAULT '',
`language` enum('SQL') NOT NULL DEFAULT 'SQL',
`sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL',
`is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO',
`security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER',
`param_list` blob NOT NULL,
`returns` longblob NOT NULL,
`body` longblob NOT NULL,
`definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '',
`comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`body_utf8` longblob,
PRIMARY KEY (`db`,`name`,`type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `procs_priv`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `procs_priv` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '',
`Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL,
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
`Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
KEY `Grantor` (`Grantor`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `proxies_priv`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `proxies_priv` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`Proxied_user` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`With_grant` tinyint(1) NOT NULL DEFAULT '0',
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`),
KEY `Grantor` (`Grantor`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `roles_mapping`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `roles_mapping` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Admin_option` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
UNIQUE KEY `Host` (`Host`,`User`,`Role`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Granted roles';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `servers`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `servers` (
`Server_name` char(64) NOT NULL DEFAULT '',
`Host` char(64) NOT NULL DEFAULT '',
`Db` char(64) NOT NULL DEFAULT '',
`Username` char(80) NOT NULL DEFAULT '',
`Password` char(64) NOT NULL DEFAULT '',
`Port` int(4) NOT NULL DEFAULT '0',
`Socket` char(64) NOT NULL DEFAULT '',
`Wrapper` char(64) NOT NULL DEFAULT '',
`Owner` char(64) NOT NULL DEFAULT '',
PRIMARY KEY (`Server_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `table_stats`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `table_stats` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`cardinality` bigint(21) unsigned DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tables_priv`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `tables_priv` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
KEY `Grantor` (`Grantor`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `time_zone`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `time_zone` (
`Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N',
PRIMARY KEY (`Time_zone_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zones';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `time_zone_leap_second`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `time_zone_leap_second` (
`Transition_time` bigint(20) NOT NULL,
`Correction` int(11) NOT NULL,
PRIMARY KEY (`Transition_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Leap seconds information for time zones';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `time_zone_name`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `time_zone_name` (
`Name` char(64) NOT NULL,
`Time_zone_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`Name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone names';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `time_zone_transition`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `time_zone_transition` (
`Time_zone_id` int(10) unsigned NOT NULL,
`Transition_time` bigint(20) NOT NULL,
`Transition_type_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`Time_zone_id`,`Transition_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transitions';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `time_zone_transition_type`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `time_zone_transition_type` (
`Time_zone_id` int(10) unsigned NOT NULL,
`Transition_type_id` int(10) unsigned NOT NULL,
`Offset` int(11) NOT NULL DEFAULT '0',
`Is_DST` tinyint(3) unsigned NOT NULL DEFAULT '0',
`Abbreviation` char(8) NOT NULL DEFAULT '',
PRIMARY KEY (`Time_zone_id`,`Transition_type_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transition types';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `user`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `user` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
`Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
`ssl_cipher` blob NOT NULL,
`x509_issuer` blob NOT NULL,
`x509_subject` blob NOT NULL,
`max_questions` int(11) unsigned NOT NULL DEFAULT '0',
`max_updates` int(11) unsigned NOT NULL DEFAULT '0',
`max_connections` int(11) unsigned NOT NULL DEFAULT '0',
`max_user_connections` int(11) NOT NULL DEFAULT '0',
`plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
`authentication_string` text COLLATE utf8_bin NOT NULL,
`password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`max_statement_time` decimal(12,6) NOT NULL DEFAULT '0.000000',
PRIMARY KEY (`Host`,`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `general_log`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `general_log` (
`event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
`user_host` mediumtext NOT NULL,
`thread_id` bigint(21) unsigned NOT NULL,
`server_id` int(10) unsigned NOT NULL,
`command_type` varchar(64) NOT NULL,
`argument` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `slow_log`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE IF NOT EXISTS `slow_log` (
`start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
`user_host` mediumtext NOT NULL,
`query_time` time(6) NOT NULL,
`lock_time` time(6) NOT NULL,
`rows_sent` int(11) NOT NULL,
`rows_examined` int(11) NOT NULL,
`db` varchar(512) NOT NULL,
`last_insert_id` int(11) NOT NULL,
`insert_id` int(11) NOT NULL,
`server_id` int(10) unsigned NOT NULL,
`sql_text` mediumtext NOT NULL,
`thread_id` bigint(21) unsigned NOT NULL,
`rows_affected` int(11) NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2017-03-10 19:49:04

View File

@@ -80,6 +80,15 @@ ok(
'--nosql'
);
ok(
no_diff(
sub { pt_duplicate_key_checker::main(@args, qw(-d test --invisible)) },
"$sample/basic_invisible.txt",
transform_sample => $transform_int
),
'--invisible'
);
ok(
no_diff(
sub { pt_duplicate_key_checker::main(@args, qw(-d test --nosummary)) },

View File

@@ -0,0 +1,21 @@
# ########################################################################
# test.dupe_key
# ########################################################################
# a is a left-prefix of a_2
# Key definitions:
# KEY `a` (`a`),
# KEY `a_2` (`a`,`b`)
# Column types:
# `a` int(11) default null
# `b` int(11) default null
# To make this index invisible, execute:
ALTER TABLE `test`.`dupe_key` ALTER INDEX `a` INVISIBLE;
# ########################################################################
# Summary of indexes
# ########################################################################
# Size Duplicate Indexes 0
# Total Duplicate Indexes 1
# Total Indexes 2

View File

@@ -0,0 +1,87 @@
#!/usr/bin/env perl
BEGIN {
die "The PERCONA_TOOLKIT_BRANCH environment variable is not set.\n"
unless $ENV{PERCONA_TOOLKIT_BRANCH} && -d $ENV{PERCONA_TOOLKIT_BRANCH};
unshift @INC, "$ENV{PERCONA_TOOLKIT_BRANCH}/lib";
};
use strict;
use warnings FATAL => 'all';
use Test::More;
use PerconaTest;
use File::Temp qw(tempfile);
use Data::Dumper;
use PerconaTest;
use Sandbox;
require "$trunk/bin/pt-online-schema-change";
my $dp = new DSNParser(opts=>$dsn_opts);
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
my $dbh = $sb->get_dbh_for('source', { mysql_ssl => 0 });
my $db_flavor = VersionParser->new($dbh)->flavor();
if ( $sandbox_version lt 10.5 || $db_flavor !~ m/maria/i ) {
plan skip_all => "Test requires MariaDB 10.5+";
}
else {
plan tests => 4;
}
# Prepare database and table
diag("Creating test database and table...");
$dbh->do("DROP DATABASE IF EXISTS test_flavor");
$dbh->do("CREATE DATABASE test_flavor");
$dbh->do("USE test_flavor");
$dbh->do("CREATE TABLE test_table (id INT PRIMARY KEY AUTO_INCREMENT, test_column VARCHAR(255))");
$dbh->do("INSERT INTO test_table VALUES(1, 'foobar')");
$dbh->do("COMMIT");
# Run pt-online-schema-change with your full options
my ($output, $exit_code) = full_output(
sub { pt_online_schema_change::main(
"D=test_flavor,t=test_table,h=127.1,P=12345,u=msandbox,p=msandbox,s=0",
"--alter", "ADD INDEX test_column_idx (test_column)",
qw(--execute)
)
},
);
is(
$exit_code,
0,
"pt-online-schema-change executed successfully"
);
unlike(
$output,
qr/flavor mismatch|not supported/i,
"No flavor mismatch or unsupported error"
) or diag($output);
# Confirm index exists
$output = `/tmp/12345/use -Ne "SELECT COUNT(*) FROM information_schema.STATISTICS WHERE INDEX_NAME = 'test_column_idx' AND TABLE_SCHEMA = 'test_flavor' AND TABLE_NAME = 'test_table'" 2>/dev/null`;
chomp $output;
is(
$output,
1,
"Index 'test_column_idx' created"
);
# Cleanup
#$dbh->do("DROP DATABASE test_flavor");
# #############################################################################
# Done.
# #############################################################################
$sb->wipe_clean($dbh);
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
done_testing;

View File

@@ -0,0 +1,106 @@
#!/usr/bin/env perl
BEGIN {
die "The PERCONA_TOOLKIT_BRANCH environment variable is not set.\n"
unless $ENV{PERCONA_TOOLKIT_BRANCH} && -d $ENV{PERCONA_TOOLKIT_BRANCH};
unshift @INC, "$ENV{PERCONA_TOOLKIT_BRANCH}/lib";
};
use strict;
use warnings FATAL => 'all';
use English qw(-no_match_vars);
use Test::More;
use Data::Dumper;
use PerconaTest;
use Sandbox;
require "$trunk/bin/pt-online-schema-change";
my $dp = new DSNParser(opts=>$dsn_opts);
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
my $source_dbh = $sb->get_dbh_for('source');
if ( !$source_dbh ) {
plan skip_all => 'Cannot connect to sandbox source';
}
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the
# tool will die.
my $source_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
my @args = (qw(--set-vars innodb_lock_wait_timeout=3));
my $sample = "t/pt-online-schema-change/samples/";
my $plugin = "$trunk/$sample/plugins";
my $output;
my $exit_status;
$sb->load_file('source', "$sample/basic_no_fks.sql");
# Should be big enough, so we can watch how number of chunks changes with different options
my $num_rows = 5000;
diag("Loading $num_rows into the table. This might take some time.");
diag(`util/mysql_random_data_load --host=127.0.0.1 --port=12345 --user=msandbox --password=msandbox pt_osc t $num_rows`);
($output, $exit_status) = full_output(
sub { pt_online_schema_change::main(@args,
"$source_dsn,D=pt_osc,t=t",
'--progress', 'iterations,1',
"--alter", "FORCE",
'--chunk-size=100',
'--execute') },
stderr => 1,
);
my $chunks = () = $output =~ /Copying `pt_osc`.`t`:\s+\d+% \d\d:\d\d remain/gi;
is(
$chunks,
51,
'Chunk size was not modified with default --chunk-time'
) or diag($chunks, $output);
($output, $exit_status) = full_output(
sub { pt_online_schema_change::main(@args,
"$source_dsn,D=pt_osc,t=t",
'--progress', 'iterations,1',
"--alter", "FORCE",
'--chunk-size=100',
'--chunk-time=0',
'--execute') },
stderr => 1,
);
$chunks = () = $output =~ /Copying `pt_osc`.`t`:\s+\d+% \d\d:\d\d remain/gi;
is(
$chunks,
51,
'Chunk size was not modified with --chunk-time=0'
) or diag($chunks, $output);
($output, $exit_status) = full_output(
sub { pt_online_schema_change::main(@args,
"$source_dsn,D=pt_osc,t=t",
'--progress', 'iterations,1',
"--alter", "FORCE",
'--chunk-size=100',
'--chunk-time=0.5',
'--execute') },
stderr => 1,
);
$chunks = () = $output =~ /Copying `pt_osc`.`t`:\s+\d+% \d\d:\d\d remain/gi;
is(
$chunks,
2,
'Chunk size was adjusted to fit specified --chunk-time'
) or diag($chunks, $output);
# #############################################################################
# Done.
# #############################################################################
$sb->wipe_clean($source_dbh);
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
done_testing;

View File

@@ -312,7 +312,7 @@ sub test_alter_table {
$orig_triggers,
$new_triggers,
'Triggers should remain in place',
);
) or diag($output);
return;
}

View File

@@ -84,7 +84,7 @@ unlike(
);
$output = output(
sub { pt_show_grants::main('-F', $cnf, '--ignore', 'baron,msandbox,root,root@localhost,user,mysql.session@localhost,mysql.sys@localhost,sys,mysql.infoschema@localhost'); }
sub { pt_show_grants::main('-F', $cnf, '--ignore', 'baron,msandbox,root,root@localhost,user,mysql.session@localhost,mysql.sys@localhost,sys,mysql.infoschema@localhost,percona.telemetry@localhost'); }
);
unlike(
$output,

View File

@@ -28,7 +28,7 @@ ERRORS DIFFS ROWS SKIPPED TABLE
0 0 0 0 mysql.time_zone_name
0 0 0 0 mysql.time_zone_transition
0 0 0 0 mysql.time_zone_transition_type
0 1 5 0 mysql.user
0 1 6 0 mysql.user
0 0 29 0 percona_test.checksums
0 0 1 0 percona_test.sentinel
0 0 200 0 sakila.actor

View File

@@ -28,7 +28,7 @@ ERRORS DIFFS ROWS SKIPPED TABLE
0 0 0 0 mysql.time_zone_name
0 0 0 0 mysql.time_zone_transition
0 0 0 0 mysql.time_zone_transition_type
0 1 5 0 mysql.user
0 1 6 0 mysql.user
0 0 29 0 percona_test.checksums
0 0 1 0 percona_test.sentinel
0 0 200 0 sakila.actor

View File

@@ -147,7 +147,7 @@ foreach my $args (
my $stm = $args->[-1] eq '--sync-to-source' ? ' --sync-to-source' : '';
test_filters(
name => $stm . "--replicate --tables t1",
name => $stm . " --replicate --tables t1",
cmds => [@$args,
qw(--tables t1)],
res => [qw(d1.t1 d2.t1 percona.checksums)],

View File

@@ -104,12 +104,12 @@ if ($sandbox_version ge '5.7' and $sandbox_version lt '8.0') {
[
2,
[ 'mysql.infoschema' ],
[ 'mysql.sys' ]
[ 'percona.telemetry' ]
],
[
4,
[ 'mysql.sys' ],
[ 'mysql.infoschema' ]
3,
[ 'mysql.session' ],
[ 'mysql.sys' ]
]
];
}
@@ -146,7 +146,7 @@ if ($sandbox_version ge '5.7' and $sandbox_version lt '8.0') {
} elsif ($sandbox_version ge '8.0') {
$expect =[
[
4,
5,
undef,
[
[ 'mysql.infoschema' ],
@@ -189,7 +189,7 @@ if ($sandbox_version ge '5.7' and $sandbox_version lt '8.0') {
} elsif ($sandbox_version ge '8.0') {
$expect =[
[
4,
5,
[
[
'mysql.infoschema'