Compare commits

...

40 Commits

Author SHA1 Message Date
Sveta Smirnova
588bf78d65 Merge pull request #1047 from percona/release-v3.7.1
Release v3.7.1
2025-12-17 16:20:35 +03:00
Sveta Smirnova
6b3e5ed485 RM-1554 - Percona Toolkit 3.7.1
- Typo in bug subject
2025-12-17 15:43:47 +03:00
Sveta Smirnova
c8c9798f1e RM-1554 - Percona Toolkit 3.7.1
- Updated release date
2025-12-17 15:24:52 +03:00
Sveta Smirnova
4b0ff0b2a0 RM-1554 - Percona Toolkit 3.7.1
- Empty line in Makefile.PL
2025-12-15 14:08:39 +03:00
Sveta Smirnova
75207ea316 Merge pull request #1046 from percona/pack_changes_3.7.1
Update go_version
2025-12-15 13:26:09 +03:00
EvgeniyPatlan
41632da754 Update go_version 2025-12-15 12:24:29 +02:00
Sveta Smirnova
440befcf4c RM-1554 - Percona Toolkit 3.7.1
- Updated version properly
2025-12-13 17:17:11 +03:00
Sveta Smirnova
6f43d4658f Merge pull request #1042 from alina-derkach-oaza/PT-2479-RN-3.7.1
PT-2479 Release notes for Percona Toolkit 3.7.1
2025-12-12 18:41:51 +03:00
Sveta Smirnova
fb97bf6356 Merge branch 'release-v3.7.1' into PT-2479-RN-3.7.1 2025-12-12 18:41:41 +03:00
Sveta Smirnova
78d8095bc8 PT-2479 Release notes for Percona Toolkit 3.7.1
- Added missed PR on Amazon Linux 2023 support
2025-12-12 18:07:53 +03:00
Alina Derkach
935da0c57a PT-2479 Release notes for Percona Toolkit 3.7.1
modified:   Changelog
	modified:   Makefile.PL
	modified:   config/sphinx-build/conf.py
	modified:   docs/release_notes.rst
2025-12-12 15:52:39 +01:00
Sveta Smirnova
ffa765f471 RM-1554 - Percona Toolkit 3.7.1
- Updated Go to 1.25.5
- Updated version for all tools
2025-12-12 16:01:47 +03:00
Sveta Smirnova
2dfb6ca93f RM-1554 - Percona Toolkit 3.7.1
- Updated date in the Changlog
2025-12-12 15:48:06 +03:00
Sveta Smirnova
05e4140c0b RM-1554 - Percona Toolkit 3.7.1
- Disabled t/pt-table-checksum/pt-2052.t in 5.7
2025-12-12 01:48:58 +03:00
Sveta Smirnova
127b2adfe7 RM-1554 - Percona Toolkit 3.7.1
- Added additional pre-requisite for 5.7 in t/pt-stalk/pt-2289.t
2025-12-11 14:49:35 +03:00
Sveta Smirnova
7fbda157d8 RM-1554 - Percona Toolkit 3.7.1
- Added LOCALE settings to t/pt-mysql-summary/pt-mysql-summary_encryption.t
2025-12-09 17:34:12 +03:00
Sveta Smirnova
84c90314b1 Merge branch '3.x' into release-v3.7.1 2025-12-09 17:12:32 +03:00
Sveta Smirnova
fef6e01fd5 RM-1554 - Percona Toolkit 3.7.1
- Added ANALYZE TABLE call to t/pt-table-checksum/samples/undef-arrayref-bug-995274.sql, so has less chances for sporadic failures
2025-12-09 17:11:20 +03:00
Sveta Smirnova
d7fc0f2d21 RM-1554 - Percona Toolkit 3.7.1
- Added SSL connection option to t/pt-table-checksum/run_time.t
2025-12-05 19:46:38 +03:00
Sveta Smirnova
17b3b66b54 RM-1554 - Percona Toolkit 3.7.1
- Added SSL connection option to t/pt-table-checksum/pt-1766.t
- Updated Changelog
2025-12-05 18:06:31 +03:00
Jiří Čtvrtka
b4475a0d1e Merge pull request #1040 from percona/PMM-7-bump-versions
PMM-7 Bump versions.
2025-12-05 10:09:42 +01:00
Sveta Smirnova
4cc67ff679 Merge pull request #1041 from surbhat1595/PKG261
Add support for Amazon Linux 2023
2025-12-04 16:42:43 +03:00
Surabhi Bhat
4dc09d253f PKG-414 Add support for Amazon Linux 2023 2025-12-04 18:01:52 +05:30
Jiří Čtvrtka
ceac1d438d PMM-7 Update sort. 2025-12-04 09:30:21 +01:00
Jiří Čtvrtka
bff9437728 PMM-7 Bump go in yml. 2025-12-04 09:24:24 +01:00
Jiří Čtvrtka
ae9a8db6bc PMM-7 Bump versions. 2025-12-04 09:19:51 +01:00
Sveta Smirnova
bcae8b2d60 Merge branch 'Changelog' into release-v3.7.1 2025-12-03 17:45:34 +03:00
Sveta Smirnova
25a011d18e RM-1554 - Percona Toolkit 3.7.1
- Removed extra new lines in the Changelog
2025-12-03 17:42:16 +03:00
Sveta Smirnova
8918850389 Merge pull request #1039 from percona/PT-2498_pt-sift_does_not_work_starting_from_version_3.7.0
PT-2498 - pt-sift does not work starting from version 3.7.0
2025-12-03 16:34:03 +03:00
Sveta Smirnova
b95730100b Merge pull request #1038 from percona/PT-2497_pt-2052.t_fails_in_December
PT-2497 - t/pt-table-checksum/pt-2052.t fails in December
2025-12-03 16:33:41 +03:00
Sveta Smirnova
0f0e1fb284 Merge pull request #1036 from percona/PT-2250_pt-table-checksum_reports_error_if_recursion_method_is_DSN
Pt 2250 pt table checksum reports error if recursion method is dsn
2025-12-03 16:33:25 +03:00
Sveta Smirnova
daac29c3a7 Merge pull request #1035 from percona/PT-2495_replication_filters.t_fails_on_Debian-based_distributions
PT-2495 - t/pt-table-checksum/replication_filters.t fails on Debian-b…
2025-12-03 16:33:05 +03:00
Sveta Smirnova
f13135674b Changelog for version 3.7.1 2025-12-02 00:47:58 +03:00
Sveta Smirnova
45dfae9a27 Merge pull request #1037 from percona/dependabot/go_modules/github.com/hashicorp/go-version-1.8.0
build(deps): bump github.com/hashicorp/go-version from 1.7.0 to 1.8.0
2025-12-01 16:35:41 +03:00
Sveta Smirnova
380a8085de PT-2498 - pt-sift does not work starting from version 3.7.0
- Added missed module into the tool
- Modified test case, so it tests if this interactive tool works, so we
  do not miss cases like this in the future
2025-12-01 16:21:11 +03:00
Sveta Smirnova
1476171e09 PT-2497 - t/pt-table-checksum/pt-2052.t fails in December
- Adjusted formula for timelocal in the test file
2025-12-01 14:59:51 +03:00
dependabot[bot]
a9b8eb402c build(deps): bump github.com/hashicorp/go-version from 1.7.0 to 1.8.0
Bumps [github.com/hashicorp/go-version](https://github.com/hashicorp/go-version) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/hashicorp/go-version/releases)
- [Changelog](https://github.com/hashicorp/go-version/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/go-version/compare/v1.7.0...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-version
  dependency-version: 1.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 10:02:29 +00:00
Sveta Smirnova
70bd9164f8 Merge pull request #1034 from percona/PT-2494_pt-2052.t_fails_with_SSL_error
PT-2494 - t/pt-table-checksum/pt-2052.t fails with SSL error
2025-11-26 00:08:44 +03:00
Sveta Smirnova
ba4f650fad PT-2495 - t/pt-table-checksum/replication_filters.t fails on Debian-based distributions
- Specified locale for the sort operation
2025-11-24 17:52:35 +03:00
Sveta Smirnova
49b4293207 PT-2494 - t/pt-table-checksum/pt-2052.t fails with SSL error
- Added option s=1 to DSNs
2025-11-24 13:16:00 +03:00
54 changed files with 348 additions and 151 deletions

View File

@@ -20,7 +20,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.24'
go-version: '1.25'
- name: Build
run: cd src/go; make linux-amd64; cd ../../

View File

@@ -1,5 +1,45 @@
Changelog for Percona Toolkit
v3.7.1 released 2025-12-17
* Feature PT-2453: Add -skip-pod-summary for pt-k8s-debug-collector (Thanks to Iwo Panowicz for the contribution)
* Feature PT-191: add ssl options to DSN
* Feature PR-996: Add invisible option to pt-duplicate-key-checker (Thanks to Matthew Boehm for the contribution)
* Feature PT-2289: Allow pt-stalk do disable ps-lock-transactions data collection via parameter
* Feature PKG-1138: Build percona-toolkit on deb13
* Feature PR-1041: Add support for Amazon Linux 2023
* Improvement PR-951: PMM-12548 Add json tags for PMM purposes.
* Improvement PT-1718: Have pt-stalk collect performance_schema.threads along with information_schema.processlist (Thanks to Nilnandan Joshi for the contribution)
* Improvement PT-2469: version_cmp is binary file
* Improvement PT-2052: Tools should default to unbuffered stdout/stderr
* Improvement PT-1423: LP #1682929: pt-table-checksum: First chunk takes too long
* Improvement PT-2305: pt-online-schema-change should error if server is a slave in row based replication
* Improvement PR-1013: PMM-11406 Better check to prevent errors from missing fields.
* Fixed bug PT-2424: Typo in pt-table-checksum error message "--resume and --no-empty-replicate-table are mutually exclusive"
* Fixed bug PR-953: Update documentation of pt-query-digest - better description for --output secure-slowlog (Thanks to Paweł Kudzia for the contribution)
* Fixed bug PT-2129: pt-online-schema-change and other tools fail on non-readable version check file
* Fixed bug PR-890: pt-config-diff: MySQL truncates run-time variable values longer than 1024 characters (Thanks to Maciej Dobrzanski for the contribution)
* Fixed bug PT-2418: pt-online-schema-change 3.7.0 lost data when exe alter xxx rename column xxx (Thanks to Marek Knappe for the contribution)
* Fixed bug PT-2458: remove-data-dir defaults to True (Thanks to Marek Knappe for the contribution)
* Fixed bug PT-2463: pt-galera-log-explainer broken conflicts due to md5 being recomputed (Thanks to Yoann La Cancellera for the contribution)
* Fixed bug PT-2465: Fix Regex pattern search on version 3.7.0 for mariadb based DBs (Thanks to Nyele for the contribution)
* Fixed bug PT-2435: t/pt-online-schema-change/pt-1717-resume.t fails after PT-2355 fix
* Fixed bug 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
* Fixed bug PT-2401: pt-online-schema-change 'table does not exist' on macos (Thanks to Taehyung Lim for the contribution)
* Fixed bug PR-989: Fix script crashing with precedence error (Thanks to Viktoras Agejevas for the contribution)
* Fixed bug PT-2471: Link to the repository documentation is broken
* Fixed bug PT-2322: pt-mysql-summary does not detect jemalloc.
* Fixed bug PT-2015: pt-config-diff does not sort variable flags (Thanks to Hartley McGuire for the contribution)
* Fixed bug PT-2459: Mention "pt" repo for percona-toolkit installation
* Fixed bug PT-2470: pt-table-sync supports recursion methods dsn and cluster but documentation does not mention it
* Fixed bug PT-2014: pt-config-diff does not honor case insensitivity flag (Thanks to Nilnandan Joshi for the contribution)
* Fixed bug PT-2346: t/pt-table-sync/specify_column_or_index.t fails with 5.7
* Fixed bug PT-1151: LP #1225577: pt-online-schema-change can silently drop rows
* Fixed bug PT-1564: Man page broken for pt-secure-collect
* Fixed bug PT-2492: t/pt-online-schema-change/pt-200.t fails after fix for PT-1151
* Fixed bug PT-2250: pt-table-checksum reports error if recursion method is DSN
* Fixed bug PT-2498: pt-sift does not work starting from version 3.7.0
v3.7.0-2 released 2025-05-14
This release addresses multiple security vulnerabilities reported in Percona Toolkit version 3.7.0, including issues related to the `libxml2` component (CVE-2024-56171, CVE-2025-24928), `openssl` (CVE-2024-12797), and `krb5` (CVE-2022-37967).

View File

@@ -11,7 +11,7 @@ MAKE_GOTOOLS
WriteMakefile(
NAME => 'Percona::Toolkit',
VERSION => '3.7.0-2',
VERSION => '3.7.1',
EXE_FILES => [ <bin/*> ],
MAN1PODS => {
'docs/percona-toolkit.pod' => 'blib/man1/percona-toolkit.1p',

View File

@@ -1377,6 +1377,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-align 3.7.0
pt-align 3.7.1
=cut

View File

@@ -45,7 +45,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.7.0';
our $VERSION = '3.7.1';
use strict;
use warnings FATAL => 'all';
@@ -8988,6 +8988,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-archiver 3.7.0
pt-archiver 3.7.1
=cut

View File

@@ -43,7 +43,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.7.0';
our $VERSION = '3.7.1';
use strict;
use warnings FATAL => 'all';
@@ -6075,6 +6075,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-config-diff 3.7.0
pt-config-diff 3.7.1
=cut

View File

@@ -42,7 +42,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.7.0';
our $VERSION = '3.7.1';
use strict;
use warnings FATAL => 'all';
@@ -5837,6 +5837,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-deadlock-logger 3.7.0
pt-deadlock-logger 3.7.1
=cut

View File

@@ -38,7 +38,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.7.0';
our $VERSION = '3.7.1';
use strict;
use warnings FATAL => 'all';
@@ -5709,6 +5709,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-diskstats 3.7.0
pt-diskstats 3.7.1
=cut

View File

@@ -39,7 +39,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.7.0';
our $VERSION = '3.7.1';
use strict;
use warnings FATAL => 'all';
@@ -5872,6 +5872,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-duplicate-key-checker 3.7.0
pt-duplicate-key-checker 3.7.1
=cut

View File

@@ -252,6 +252,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-eustack-resolver 3.7.0
pt-eustack-resolver 3.7.1
=cut

View File

@@ -1732,6 +1732,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-fifo-split 3.7.0
pt-fifo-split 3.7.1
=cut

View File

@@ -35,7 +35,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.7.0';
our $VERSION = '3.7.1';
use strict;
use warnings FATAL => 'all';
@@ -5259,6 +5259,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-find 3.7.0
pt-find 3.7.1
=cut

View File

@@ -2284,6 +2284,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-fingerprint 3.7.0
pt-fingerprint 3.7.1
=cut

View File

@@ -37,7 +37,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.7.0';
our $VERSION = '3.7.1';
use strict;
use warnings FATAL => 'all';
@@ -4824,6 +4824,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-fk-error-logger 3.7.0
pt-fk-error-logger 3.7.1
=cut

View File

@@ -44,7 +44,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.7.0';
our $VERSION = '3.7.1';
use strict;
use warnings FATAL => 'all';
@@ -7761,6 +7761,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-heartbeat 3.7.0
pt-heartbeat 3.7.1
=cut

View File

@@ -45,7 +45,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.7.0';
our $VERSION = '3.7.1';
use strict;
use warnings FATAL => 'all';
@@ -7776,6 +7776,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-index-usage 3.7.0
pt-index-usage 3.7.1
=cut

View File

@@ -1149,7 +1149,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-ioprofile 3.7.0
pt-ioprofile 3.7.1
=cut

View File

@@ -47,7 +47,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.7.0';
our $VERSION = '3.7.1';
use strict;
use warnings FATAL => 'all';
@@ -8948,6 +8948,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-kill 3.7.0
pt-kill 3.7.1
=cut

View File

@@ -825,7 +825,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-mext 3.7.0
pt-mext 3.7.1
=cut

View File

@@ -3444,7 +3444,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-mysql-summary 3.7.0
pt-mysql-summary 3.7.1
=cut

View File

@@ -56,7 +56,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.7.0';
our $VERSION = '3.7.1';
use strict;
use warnings FATAL => 'all';
@@ -14303,6 +14303,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-online-schema-change 3.7.0
pt-online-schema-change 3.7.1
=cut

View File

@@ -1042,7 +1042,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-pmp 3.7.0
pt-pmp 3.7.1
=cut

View File

@@ -64,7 +64,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.7.0';
our $VERSION = '3.7.1';
use strict;
use warnings FATAL => 'all';
@@ -17169,6 +17169,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-query-digest 3.7.0
pt-query-digest 3.7.1
=cut

View File

@@ -4802,6 +4802,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-replica-find 3.7.0
pt-replica-find 3.7.1
=cut

View File

@@ -41,7 +41,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.7.0';
our $VERSION = '3.7.1';
use strict;
use warnings FATAL => 'all';
@@ -6500,6 +6500,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-replica-restart 3.7.0
pt-replica-restart 3.7.1
=cut

View File

@@ -2744,6 +2744,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-show-grants 3.7.0
pt-show-grants 3.7.1
=cut

View File

@@ -93,6 +93,53 @@ rm_tmpdir() {
# End tmpdir package
# ###########################################################################
# ###########################################################################
# alt_cmds package
# This package is a copy without comments from the original. The original
# with comments and its test file can be found in the GitHub repository at,
# lib/bash/alt_cmds.sh
# t/lib/bash/alt_cmds.sh
# See https://github.com/percona/percona-toolkit for more information.
# ###########################################################################
set -u
_seq() {
local i="$1"
awk "BEGIN { for(i=1; i<=$i; i++) print i; }"
}
_pidof() {
local cmd="$1"
if ! pidof "$cmd" 2>/dev/null; then
ps -eo pid,ucomm | awk -v comm="$cmd" '$2 == comm { print $1 }'
fi
}
_lsof() {
local pid="$1"
if ! lsof -p $pid 2>/dev/null; then
/bin/ls -l /proc/$pid/fd 2>/dev/null
fi
}
_which() {
if [ -x /usr/bin/which ]; then
/usr/bin/which "$1" 2>/dev/null | awk '{print $1}'
elif which which 1>/dev/null 2>&1; then
which "$1" 2>/dev/null | awk '{print $1}'
else
echo "$1"
fi
}
# ###########################################################################
# End alt_cmds package
# ###########################################################################
# ###########################################################################
# parse_options package
# This package is a copy without comments from the original. The original
@@ -1266,7 +1313,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-sift 3.7.0
pt-sift 3.7.1
=cut

View File

@@ -41,7 +41,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.7.0';
our $VERSION = '3.7.1';
use strict;
use warnings FATAL => 'all';
@@ -5292,6 +5292,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-slave-delay 3.7.0
pt-slave-delay 3.7.1
=cut

View File

@@ -2656,7 +2656,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-stalk 3.7.0
pt-stalk 3.7.1
=cut

View File

@@ -2808,7 +2808,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-summary 3.7.0
pt-summary 3.7.1
=cut

View File

@@ -58,7 +58,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.7.0';
our $VERSION = '3.7.1';
use strict;
use warnings FATAL => 'all';
@@ -14474,6 +14474,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-table-checksum 3.7.0
pt-table-checksum 3.7.1
=cut

View File

@@ -55,7 +55,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.7.0';
our $VERSION = '3.7.1';
use strict;
use warnings FATAL => 'all';
@@ -13488,6 +13488,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-table-sync 3.7.0
pt-table-sync 3.7.1
=cut

View File

@@ -8640,6 +8640,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-table-usage 3.7.0
pt-table-usage 3.7.1
=cut

View File

@@ -61,7 +61,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.7.0';
our $VERSION = '3.7.1';
use strict;
use warnings FATAL => 'all';
@@ -11577,6 +11577,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-upgrade 3.7.0
pt-upgrade 3.7.1
=cut

View File

@@ -44,7 +44,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.7.0';
our $VERSION = '3.7.1';
use strict;
use warnings FATAL => 'all';
@@ -6434,6 +6434,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-variable-advisor 3.7.0
pt-variable-advisor 3.7.1
=cut

View File

@@ -4254,6 +4254,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-visual-explain 3.7.0
pt-visual-explain 3.7.1
=cut

View File

@@ -14,7 +14,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: perl(ExtUtils::MakeMaker) make
Requires: perl(DBI) >= 1.13, perl(DBD::mysql) >= 1.0, perl(Time::HiRes), perl(IO::Socket::SSL), perl(Digest::MD5), perl(Term::ReadKey)
%if 0%{?rhel} > 9
%if 0%{?rhel} > 9 || 0%{?amzn} >= 2023
Requires: perl(English)
%endif
AutoReq: no

View File

@@ -151,6 +151,11 @@ get_system(){
ARCH=$(echo $(uname -m) | sed -e 's:i686:i386:g')
OS_NAME="el$RHEL"
OS="rpm"
elif [ -f /etc/amazon-linux-release ]; then
RHEL=$(rpm --eval %amzn)
ARCH=$(echo $(uname -m) | sed -e 's:i686:i386:g')
OS_NAME="amzn$RHEL"
OS="rpm"
else
ARCH=$(uname -m)
OS_NAME="$(lsb_release -sc)"
@@ -165,7 +170,7 @@ install_go() {
#rm -rf /usr/local/go /usr/local/go1.8 /usr/local/go1.9
#mv go1.9 /usr/local/
#ln -s /usr/local/go1.9 /usr/local/go
GO_VERSION=1.23.4
GO_VERSION=1.25.5
if [ x"$ARCH" = "xx86_64" ]; then
GO_ARCH="amd64"
elif [ x"$ARCH" = "xaarch64" ]; then
@@ -231,8 +236,8 @@ install_deps() {
# mv -f percona-dev.repo /etc/yum.repos.d/
yum clean all
yum -y install curl epel-release
RHEL=$(rpm --eval %rhel)
yum -y install wget tar findutils coreutils rpm-build perl-ExtUtils-MakeMaker make perl-DBD-MySQL
yum -y install coreutils
yum -y install wget tar findutils rpm-build perl-ExtUtils-MakeMaker make perl-DBD-MySQL
install_go
else
apt-get -y update
@@ -372,11 +377,9 @@ build_rpm(){
mkdir -vp rpmbuild/{SOURCES,SPECS,BUILD,SRPMS,RPMS}
cp $SRC_RPM rpmbuild/SRPMS/
cd $WORKDIR
RHEL=$(rpm --eval %rhel)
ARCH=$(echo $(uname -m) | sed -e 's:i686:i386:g')
echo "RHEL=${RHEL}" >> percona-toolkit.properties
echo "ARCH=${ARCH}" >> percona-toolkit.properties
rpmbuild --define "version $VERSION" --define "VERSION $VERSION" --define "dist .el${RHEL}" --define "release $RPM_RELEASE.el${RHEL}" --define "_topdir ${WORKDIR}/rpmbuild" --rebuild rpmbuild/SRPMS/${SRC_RPM}
rpmbuild --define "version $VERSION" --define "VERSION $VERSION" --define "dist .${OS_NAME}" --define "release $RPM_RELEASE.${OS_NAME}" --define "_topdir ${WORKDIR}/rpmbuild" --rebuild rpmbuild/SRPMS/${SRC_RPM}
return_code=$?
if [ $return_code != 0 ]; then

View File

@@ -50,7 +50,7 @@ copyright = u'2025, Percona LLC and/or its affiliates'
# The short X.Y version.
version = '3.7'
# The full version, including alpha/beta/rc tags.
release = '3.7.0-2'
release = '3.7.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@@ -607,6 +607,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
Percona Toolkit v3.7.0 released 2024-12-19
Percona Toolkit v3.7.1 released 2025-12-17
=cut

View File

@@ -1,6 +1,59 @@
Release Notes
***************
v3.7.1 released 2025-12-17
==============================
New Features
------------------------------------------------------------
* :jirabug:`PT-2453`: Add -skip-pod-summary for pt-k8s-debug-collector (Thanks to Iwo Panowicz for the contribution)
* :jirabug:`PT-191`: Add SSL options to DSN
* `PR-996`: Add invisible option to pt-duplicate-key-checker (Thanks to Matthew Boehm for the contribution)
* :jirabug:`PT-2289`: Allow pt-stalk to disable ps-lock-transactions data collection via parameter
* :jirabug:`PKG-1138`: Build percona-toolkit on deb13
* `PR-1041`: Add support for Amazon Linux 2023
Improvements
------------------------------------------------------------
* `PR-951`: PMM-12548 Add JSON tags for PMM purposes
* :jirabug:`PT-1718`: Have pt-stalk collect performance_schema.threads along with information_schema.processlist (Thanks to Nilnandan Joshi for the contribution)
* :jirabug:`PT-2469`: version_cmp is binary file
* :jirabug:`PT-2052`: Tools should default to unbuffered stdout/stderr
* :jirabug:`PT-1423`: LP #1682929: pt-table-checksum: First chunk takes too long
* :jirabug:`PT-2305`: pt-online-schema-change should error if server is a slave in row-based replication
* `PR-1013`: PMM-11406 Better check to prevent errors from missing fields
Bugs Fixed
------------------------------------------------------------
* :jirabug:`PT-2424`: Typo in pt-table-checksum error message "--resume and --no-empty-replicate-table are mutually exclusive" (Thanks to Paweł Kudzia for the contribution)
* `PR-953`: Update documentation of pt-query-digest better description for --output secure-slowlog (Thanks to Paweł Kudzia for the contribution)
* :jirabug:`PT-2129`: pt-online-schema-change and other tools fail on non-readable version check file
* `PR-890`: pt-config-diff: MySQL truncates run-time variable values longer than 1024 characters (Thanks to Maciej Dobrzanski for the contribution)
* :jirabug:`PT-2418`: pt-online-schema-change 3.7.0 lost data when executing ALTER … RENAME COLUMN (Thanks to Marek Knappe for the contribution)
* :jirabug:`PT-2458`: remove-data-dir defaults to True (Thanks to Marek Knappe for the contribution)
* :jirabug:`PT-2463`: pt-galera-log-explainer broken due to md5 being recomputed (Thanks to Yoann La Cancellera for the contribution)
* :jirabug:`PT-2465`: Fix Regex pattern search on version 3.7.0 for MariaDB-based DBs (Thanks to Nyele for the contribution)
* :jirabug:`PT-2435`: t/pt-online-schema-change/pt-1717-resume.t fails after PT-2355 fix
* :jirabug:`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
* :jirabug:`PT-2401`: pt-online-schema-change 'table does not exist' on macOS (Thanks to Taehyung Lim for the contribution)
* `PR-989`: Fix script crashing with precedence error (Thanks to Viktoras Agejevas for the contribution)
* :jirabug:`PT-2471`: Link to the repository documentation is broken
* :jirabug:`PT-2322`: pt-mysql-summary does not detect jemalloc
* :jirabug:`PT-2015`: pt-config-diff does not sort variable flags (Thanks to Hartley McGuire for the contribution)
* :jirabug:`PT-2459`: Mention "pt" repo for percona-toolkit installation
* :jirabug:`PT-2470`: pt-table-sync supports recursion methods dsn and cluster but documentation does not mention it
* :jirabug:`PT-2014`: pt-config-diff does not honor case-insensitivity flag (Thanks to Nilnandan Joshi for the contribution)
* :jirabug:`PT-2346`: t/pt-table-sync/specify_column_or_index.t fails with 5.7
* :jirabug:`PT-1151`: LP #1225577: pt-online-schema-change can silently drop rows
* :jirabug:`PT-1564`: Man page broken for pt-secure-collect
* :jirabug:`PT-2492`: t/pt-online-schema-change/pt-200.t fails after fix for PT-1151
* :jirabug:`PT-2250`: pt-table-checksum reports error if recursion method is DSN
* :jirabug:`PT-2498`: pt-sift does not work starting from version 3.7.0
v3.7.0-2 released 2025-05-14
==============================

40
go.mod
View File

@@ -1,8 +1,6 @@
module github.com/percona/percona-toolkit
go 1.24.0
toolchain go1.24.1
go 1.25.5
require (
github.com/AlekSi/pointer v1.2.0
@@ -15,13 +13,13 @@ require (
github.com/golang/mock v1.6.0
github.com/google/go-cmp v0.7.0
github.com/google/uuid v1.6.0
github.com/hashicorp/go-version v1.7.0
github.com/hashicorp/go-version v1.8.0
github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef
github.com/lib/pq v1.10.9
github.com/mattn/go-shellwords v1.0.12
github.com/montanaflynn/stats v0.7.1
github.com/pborman/getopt v1.1.0
github.com/percona/go-mysql v0.0.0-20210427141028-73d29c6da78c
github.com/percona/go-mysql v0.0.0-20251202083530-b3e1c16efc74
github.com/pkg/errors v0.9.1
github.com/rs/zerolog v1.34.0
github.com/shirou/gopsutil v3.21.11+incompatible
@@ -30,38 +28,38 @@ require (
github.com/xlab/treeprint v1.2.0
go.mongodb.org/mongo-driver v1.17.6
golang.org/x/crypto v0.45.0
golang.org/x/exp v0.0.0-20230321023759-10a507213a29
golang.org/x/exp v0.0.0-20251125195548-87e1e737ad39
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.34.2
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4
)
require (
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/golang/snappy v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/klauspost/compress v1.18.2 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/tklauser/go-sysconf v0.3.11 // indirect
github.com/tklauser/numcpus v0.6.0 // indirect
github.com/tklauser/go-sysconf v0.3.16 // indirect
github.com/tklauser/numcpus v0.11.0 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.2 // indirect
github.com/xdg-go/scram v1.2.0 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
golang.org/x/net v0.47.0 // indirect
golang.org/x/sync v0.18.0 // indirect
golang.org/x/sys v0.38.0 // indirect
@@ -71,7 +69,7 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apimachinery v0.34.2 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.1 // indirect
)

80
go.sum
View File

@@ -14,8 +14,8 @@ github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs
github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc=
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b h1:mimo19zliBX/vSQ6PWWSL9lK8qwHozUj03+zLoEB8O0=
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -26,24 +26,25 @@ github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sa
github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A=
github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs=
github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY=
github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/go-version v1.8.0 h1:KAkNb1HAiZd1ukkxDFGmokVZe1Xy9HG6NUp+bPle2i4=
github.com/hashicorp/go-version v1.8.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef h1:A9HsByNhogrvm9cWb28sjiS3i7tcKCkflWFEkHfuAgM=
@@ -52,19 +53,21 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I=
github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/klauspost/compress v1.18.2 h1:iiPHWW0YrcFgpBYhsA6D1+fqHssJscY/Tm/y2Uqnapk=
github.com/klauspost/compress v1.18.2/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk=
github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -77,8 +80,8 @@ github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8
github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
github.com/pborman/getopt v1.1.0 h1:eJ3aFZroQqq0bWmraivjQNt6Dmm5M0h2JcDW38/Azb0=
github.com/pborman/getopt v1.1.0/go.mod h1:FxXoW1Re00sQG/+KIkuSqRL/LwQgSkv7uyac+STFsbk=
github.com/percona/go-mysql v0.0.0-20210427141028-73d29c6da78c h1:1SZ7nS+kSaO63IpaKspf/gf8602QcgP2eXNPMNOIc0M=
github.com/percona/go-mysql v0.0.0-20210427141028-73d29c6da78c/go.mod h1:/SGLf9OMxlnK6jq4mkFiImBcJXXk5jwD+lDrwDaGXcw=
github.com/percona/go-mysql v0.0.0-20251202083530-b3e1c16efc74 h1:uULelXfIrpmKtIfPjYHnC8TlnQvqza7BT+DGdxYcAZk=
github.com/percona/go-mysql v0.0.0-20251202083530-b3e1c16efc74/go.mod h1:8n6mF3Igr3YYdh19ZUvyVyEH+hQr9LVSjG9hrlp0YTU=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@@ -96,21 +99,27 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
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.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/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=
github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4=
github.com/tklauser/go-sysconf v0.3.16 h1:frioLaCQSsF5Cy1jgRBrzr6t502KIIwQ0MArYICU0nA=
github.com/tklauser/go-sysconf v0.3.16/go.mod h1:/qNL9xxDhc7tx3HSRsLWNnuzbVfh3e7gh/BmM179nYI=
github.com/tklauser/numcpus v0.11.0 h1:nSTwhKH5e1dMNsCdVBukSZrURJRoHbSEQjdEbY+9RXw=
github.com/tklauser/numcpus v0.11.0/go.mod h1:z+LwcLq54uWZTX0u/bGobaV34u6V7KNlTZejzM6/3MQ=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=
github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY=
github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4=
github.com/xdg-go/scram v1.2.0 h1:bYKF2AEwG5rqd1BumT4gAnvwU/M9nBp2pTSxeZw7Wvs=
github.com/xdg-go/scram v1.2.0/go.mod h1:3dlrS0iBaWKYVt2ZfA4cj48umJZ+cAEbR6/SjLA88I8=
github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8=
github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM=
github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ=
@@ -121,20 +130,20 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
go.mongodb.org/mongo-driver v1.17.6 h1:87JUG1wZfWsr6rIz3ZmpH90rL5tea7O3IHuSwHUpsss=
go.mongodb.org/mongo-driver v1.17.6/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ=
go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0=
go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug=
golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
golang.org/x/exp v0.0.0-20251125195548-87e1e737ad39 h1:DHNhtq3sNNzrvduZZIiFyXWOL9IWaDPHqTnLJp+rCBY=
golang.org/x/exp v0.0.0-20251125195548-87e1e737ad39/go.mod h1:46edojNIoXTNOhySWIWdix628clX9ODXwPsQuG6hsK0=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
@@ -167,7 +176,7 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
@@ -199,7 +208,6 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw=
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
@@ -211,13 +219,13 @@ k8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4=
k8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y=
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck=
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg=
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco=
sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
sigs.k8s.io/structured-merge-diff/v6 v6.3.1 h1:JrhdFMqOd/+3ByqlP2I45kTOZmTRLBUm5pvRjeheg7E=
sigs.k8s.io/structured-merge-diff/v6 v6.3.1/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=

View File

@@ -18,7 +18,7 @@
# ###########################################################################
package Percona::Toolkit;
our $VERSION = '3.7.0';
our $VERSION = '3.7.1';
use strict;
use warnings FATAL => 'all';

View File

@@ -16,6 +16,6 @@ sphinx-tabs
certifi>=2024.7.4 # not directly required, pinned by Snyk to avoid a vulnerability
jinja2>=3.1.6 # not directly required, pinned by Snyk to avoid a vulnerability
pygments>=2.15.0 # not directly required, pinned by Snyk to avoid a vulnerability
requests>=2.32.4 # not directly required, pinned by Snyk to avoid a vulnerability
setuptools>=78.1.1 # not directly required, pinned by Snyk to avoid a vulnerability
requests>=2.31.0 # not directly required, pinned by Snyk to avoid a vulnerability
setuptools==68.0.0 # not directly required, pinned by Snyk to avoid a vulnerability
idna>=3.7 # not directly required, pinned by Snyk to avoid a vulnerability

View File

@@ -4,6 +4,8 @@ import (
"encoding/json"
"time"
"cmp"
"github.com/percona/percona-toolkit/src/go/pt-galera-log-explainer/utils"
"github.com/xlab/treeprint"
"golang.org/x/exp/slices"
@@ -98,17 +100,24 @@ func (n *WhoisNode) valuesSortedByTimestamps() []string {
}
// keep nil timestamps at the top
slices.SortFunc(values, func(a, b string) bool {
if n.Values[a].Timestamp == nil && n.Values[b].Timestamp == nil {
return a < b
slices.SortFunc(values, func(a, b string) int {
va, vb := n.Values[a].Timestamp, n.Values[b].Timestamp
switch {
case va == nil && vb == nil:
return cmp.Compare(a, b)
case va == nil:
return -1 // nil < non-nil
case vb == nil:
return 1 // non-nil > nil
default:
if va.Before(*vb) {
return -1
}
if va.After(*vb) {
return 1
}
return cmp.Compare(a, b)
}
if n.Values[a].Timestamp == nil { // implied b!=nil
return true // meaning, nil < nonnil, a < b
}
if n.Values[b].Timestamp == nil { // implied a!=nil
return false // meaning a is greater than b
}
return n.Values[a].Timestamp.Before(*n.Values[b].Timestamp)
})
return values
}

View File

@@ -132,7 +132,7 @@ for my $i (2..9) {
no_diff(
sub {
local $ENV{_NO_FALSE_NEGATIVES} = 1;
print `$env $trunk/bin/$tool --read-samples $trunk/t/pt-mysql-summary/samples/temp_enc00$i -- --defaults-file=/tmp/12345/my.sandbox.cnf | tail -n+3 | perl -wlnpe 's/Skipping schema analysis.*/Specify --databases or --all-databases to dump and summarize schemas/'`
print `LOCALE=en_US.utf8 LANG=en_US.UTF-8 $env $trunk/bin/$tool --read-samples $trunk/t/pt-mysql-summary/samples/temp_enc00$i -- --defaults-file=/tmp/12345/my.sandbox.cnf | tail -n+3 | perl -wlnpe 's/Skipping schema analysis.*/Specify --databases or --all-databases to dump and summarize schemas/'`
},
"t/pt-mysql-summary/samples/expected_output_temp_enc00$i.txt",
),

View File

@@ -9,11 +9,29 @@ BEGIN {
use strict;
use warnings FATAL => 'all';
use English qw(-no_match_vars);
use Test::More tests => 1;
use Test::More tests => 2;
use PerconaTest;
pass();
my ($tool) = $PROGRAM_NAME =~ m/([\w-]+)\.t$/;
my $output = `$trunk/bin/$tool $trunk/bin 2>&1`;
# https://perconadev.atlassian.net/browse/PT-2498
# We do not test interactive tool here
# But we at least ensure it works and prints
# proper error message if called without correct path
isnt(
$?,
0,
"Error for the directory that does not contain pt-stalk files"
) or diag($output);
like(
$output,
qr/Error: There are no pt-stalk files in $trunk\/bin/,
"Correct error message"
) or diag($output);
# #############################################################################
# Done.

View File

@@ -46,6 +46,12 @@ sub cleanup {
cleanup();
# We need to enable transaction instrumentation in 5.7
if ( $sandbox_version eq '5.7' ) {
$dbh->do("UPDATE performance_schema.setup_instruments SET enabled = 'YES'"
. ", timed='YES' WHERE NAME IN ('transaction')");
}
# We need these to collect lock-waits
sub start_thread_pt_1897_1 {
# this must run in a thread because we need to have an active session
@@ -257,6 +263,11 @@ like(
cleanup();
diag(`rm -rf $dest 2>/dev/null`);
if ( $sandbox_version eq '5.7' ) {
$dbh->do("UPDATE performance_schema.setup_instruments SET enabled = 'NO'"
. ", timed='NO' WHERE NAME IN ('transaction')");
}
$sb->wipe_clean($dbh);
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
done_testing;

View File

@@ -46,7 +46,7 @@ diag("Starting checksum");
# 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.
# And --max-load "" prevents waiting for status variables.
my $source_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
my $source_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox,s=1';
my @args = ($source_dsn, qw(--no-check-binlog-format --chunk-size 10));
my $output;

View File

@@ -20,7 +20,15 @@ my $dp = new DSNParser(opts=>$dsn_opts);
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
my $dbh = $sb->get_dbh_for('source');
my $output = `$trunk/bin/pt-table-checksum h=127.1,P=12345,u=msandbox,p=msandbox --set-vars innodb_lock_wait_timeout=3 --chunk-size=50 -d sakila --buffer-stdout 2>&1 | tee | ts '%m-%dT%H:%M:%S'`;
# pt-tc does not buffer output with 5.7, at least it is not possible
# to catch buffering with the tee command we use for tests.
# Since main issue of buffering is getting data in K8 environments,
# and k8 environments mostly use 8.0+, no sense to test buffering with 5.7.
if ( $sandbox_version eq '5.7' ) {
plan skip_all => 'Test requires 8.0 or newer';
}
my $output = `$trunk/bin/pt-table-checksum h=127.1,P=12345,u=msandbox,p=msandbox,s=1 --set-vars innodb_lock_wait_timeout=3 --chunk-size=50 -d sakila --buffer-stdout 2>&1 | tee | ts '%m-%dT%H:%M:%S'`;
my @lines = split(/\n/, $output);
my @times = ( $lines[3] =~ m/\d\d-\d\dT\d\d:\d\d:\d\d/g );
@@ -32,16 +40,16 @@ is(
) or diag($output);
my ($month, $day, $hour, $min, $sec) = split(/[T:-]+/, $times[0]);
my $time_ts = timelocal($sec, $min, $hour, $day, $month);
my $time_ts = timelocal($sec, $min, $hour, $day, $month - 1);
($month, $day, $hour, $min, $sec) = split(/[T:-]+/, $times[1]);
my $time_tool = timelocal($sec, $min, $hour, $day, $month);
my $time_tool = timelocal($sec, $min, $hour, $day, $month - 1);
cmp_ok(
$time_ts - $time_tool, 'gt', 1,
"Print delay is expected for the buffered output"
) or diag($output);
$output = `$trunk/bin/pt-table-checksum h=127.1,P=12345,u=msandbox,p=msandbox --set-vars innodb_lock_wait_timeout=3 --chunk-size=50 -d sakila 2>&1 | tee | ts '%m-%dT%H:%M:%S'`;
$output = `$trunk/bin/pt-table-checksum h=127.1,P=12345,u=msandbox,p=msandbox,s=1 --set-vars innodb_lock_wait_timeout=3 --chunk-size=50 -d sakila 2>&1 | tee | ts '%m-%dT%H:%M:%S'`;
@lines = split(/\n/, $output);
@times = ( $lines[3] =~ m/\d\d-\d\dT\d\d:\d\d:\d\d/g );
@@ -53,16 +61,16 @@ is(
) or diag($output);
($month, $day, $hour, $min, $sec) = split(/[T:-]+/, $times[0]);
$time_ts = timelocal($sec, $min, $hour, $day, $month);
$time_ts = timelocal($sec, $min, $hour, $day, $month - 1);
($month, $day, $hour, $min, $sec) = split(/[T:-]+/, $times[1]);
$time_tool = timelocal($sec, $min, $hour, $day, $month);
$time_tool = timelocal($sec, $min, $hour, $day, $month - 1);
cmp_ok(
$time_ts - $time_tool, 'gt', 1,
"STDOUT is buffered by default"
) or diag($output);
$output = `$trunk/bin/pt-table-checksum h=127.1,P=12345,u=msandbox,p=msandbox --set-vars innodb_lock_wait_timeout=3 --chunk-size=50 -d sakila --no-buffer-stdout 2>&1 | tee | ts '%m-%dT%H:%M:%S'`;
$output = `$trunk/bin/pt-table-checksum h=127.1,P=12345,u=msandbox,p=msandbox,s=1 --set-vars innodb_lock_wait_timeout=3 --chunk-size=50 -d sakila --no-buffer-stdout 2>&1 | tee | ts '%m-%dT%H:%M:%S'`;
@lines = split(/\n/, $output);
@times = ( $lines[3] =~ m/\d\d-\d\dT\d\d:\d\d:\d\d/g );
@@ -74,16 +82,16 @@ is(
) or diag($output);
($month, $day, $hour, $min, $sec) = split(/[T:-]+/, $times[0]);
$time_ts = timelocal($sec, $min, $hour, $day, $month);
$time_ts = timelocal($sec, $min, $hour, $day, $month - 1);
($month, $day, $hour, $min, $sec) = split(/[T:-]+/, $times[1]);
$time_tool = timelocal($sec, $min, $hour, $day, $month);
$time_tool = timelocal($sec, $min, $hour, $day, $month - 1);
cmp_ok(
$time_ts - $time_tool, 'le', 1,
"Print delay is not expected when buffering is disabled"
) or diag($output);
$output = `$trunk/bin/pt-table-checksum h=127.1,P=12345,u=msandbox,p=msandbox --set-vars innodb_lock_wait_timeout=3 --chunk-size=50 -d sakila --nobuffer-stdout 2>&1 | tee | ts '%m-%dT%H:%M:%S'`;
$output = `$trunk/bin/pt-table-checksum h=127.1,P=12345,u=msandbox,p=msandbox,s=1 --set-vars innodb_lock_wait_timeout=3 --chunk-size=50 -d sakila --nobuffer-stdout 2>&1 | tee | ts '%m-%dT%H:%M:%S'`;
@lines = split(/\n/, $output);
@times = ( $lines[3] =~ m/\d\d-\d\dT\d\d:\d\d:\d\d/g );
@@ -95,9 +103,9 @@ is(
) or diag($output);
($month, $day, $hour, $min, $sec) = split(/[T:-]+/, $times[0]);
$time_ts = timelocal($sec, $min, $hour, $day, $month);
$time_ts = timelocal($sec, $min, $hour, $day, $month - 1);
($month, $day, $hour, $min, $sec) = split(/[T:-]+/, $times[1]);
$time_tool = timelocal($sec, $min, $hour, $day, $month);
$time_tool = timelocal($sec, $min, $hour, $day, $month - 1);
cmp_ok(
$time_ts - $time_tool, 'le', 1,

View File

@@ -294,7 +294,7 @@ if ( -x "$ENV{PERCONA_TOOLKIT_SANDBOX}/bin/mysqlbinlog" ) {
chomp $mysqlbinlog;
}
$output = `$mysqlbinlog /tmp/12345/data/$row->{file} --start-position=$row->{position} | grep 'use ' | grep -v '^# Warning' | grep -v 'pseudo_replica_mode' | sort -u | sed -e 's/\`//g'`;
$output = `$mysqlbinlog /tmp/12345/data/$row->{file} --start-position=$row->{position} | grep 'use ' | grep -v '^# Warning' | grep -v 'pseudo_replica_mode' | LOCALE=en_US.utf8 LANG=en_US.UTF-8 sort -u | sed -e 's/\`//g'`;
my $use_dbs = "use mysql/*!*/;
use percona/*!*/;
@@ -317,7 +317,7 @@ $row = $source_dbh->selectrow_hashref("show ${source_status} status");
pt_table_checksum::main(@args, qw(--quiet --replicate-database percona));
$output = `$mysqlbinlog /tmp/12345/data/$row->{file} --start-position=$row->{position} | grep 'use ' | grep -v '^# Warning' | grep -v 'pseudo_replica_mode' | sort -u | sed -e 's/\`//g'`;
$output = `$mysqlbinlog /tmp/12345/data/$row->{file} --start-position=$row->{position} | grep 'use ' | grep -v '^# Warning' | grep -v 'pseudo_replica_mode' | LOCALE=en_US.utf8 LANG=en_US.UTF-8 sort -u | sed -e 's/\`//g'`;
is(
$output,

View File

@@ -31,7 +31,7 @@ if ( !$source_dbh ) {
# 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.
# And --max-load "" prevents waiting for status variables.
my $source_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
my $source_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox,s=1';
my @args = ($source_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '');
my $output;
my $exit_status;

View File

@@ -16,3 +16,5 @@ INSERT INTO `GroupMembers` VALUES
(450876,3,691360),(450881,3,691366),(450886,3,691372),(450893,3,691382),(450898,3,691388),(450903,3,691394),(450912,3,691408),(450921,3,691422),(450926,3,691428),(450931,3,691434),(450936,3,691440),(450945,3,691454),(450969,3,691496),(450989,3,691530),(450998,3,691544),(451022,3,691574),(451076,3,691636),(451081,3,691642),(451090,3,691656),(451095,3,691662),(451100,3,691668),(451115,3,691694),(451155,3,691756),(451171,3,691782),(451178,3,691792),(451183,3,691798),(451190,3,691808),(451245,3,691914),(451260,3,691940),(451267,3,691950),(451284,3,691976),(451290,3,691982),(451301,3,691992),(451323,3,692030),(451376,3,692128),(451395,3,692162),(451400,3,692168),(451433,3,692226),(451460,3,692276),(451471,3,692294),(451476,3,692300),(451487,3,692318),(451500,3,692340),(451517,3,692370),(451522,3,692376),(451527,3,692382),(451532,3,692388),(451537,3,692394),(451542,3,692400),(451549,3,692410),(451554,3,692416),(451563,3,692430),(451574,3,692448),(451587,3,692470),(451604,3,692500),(491255,3,751615),(491265,3,751629),(491279,3,751647),(491313,3,751689),(491318,3,751695),(491339,3,751725),(491344,3,751731),(491350,3,751737),(491367,3,751767),(491376,3,751781),(491381,3,751787),(491390,3,751801),(491399,3,751815),(491406,3,751825),(491415,3,751839),(491420,3,751845),(491425,3,751851),(491430,3,751857),(491447,3,751887),(491454,3,751897),(491463,3,751912),(491484,3,751950),(491563,3,752104),(491580,3,752134),(491595,3,752160),(491604,3,752174),(491615,3,752192),(491624,3,752206),(491631,3,752216),(491652,3,752254),(491657,3,752260),(491664,3,752270),(491675,3,752288),(491680,3,752294),(491685,3,752300),(491692,3,752310),(491697,3,752316),(491704,3,752326),(491715,3,752344),(491742,3,752394),(491757,3,752420),(491762,3,752426),(491769,3,752436),(491774,3,752442),(491779,3,752448),(491786,3,752458),(491799,3,752480),(491806,3,752490),(491813,3,752500),(491821,3,752510),(491833,3,752524),(491838,3,752530),(491843,3,752536),(491848,3,752542),(491853,3,752548),(491858,3,752554),(491865,3,752564),(491870,3,752570),(491875,3,752576),(491886,3,752594),(491891,3,752600),(491933,3,752642),(491938,3,752648),(491965,3,752686),(491976,3,752704),(491991,3,752726),(492004,3,752748),(492013,3,752762),(492018,3,752768),(492023,3,752774),(492030,3,752780),(492037,3,752786),(492062,3,752816),(492073,3,752834),(492078,3,752840),(492089,3,752858),(492094,3,752864),(492099,3,752870),(492128,3,752908),(492139,3,752922),(492158,3,752956),(492163,3,752962),(492184,3,753000),(492196,3,753010),(492224,3,753044),(492231,3,753054),(492236,3,753060),(492241,3,753066),(492246,3,753072),(492253,3,753082),(492258,3,753088),(492267,3,753102),(492272,3,753108),(492277,3,753114),(492282,3,753120),(492287,3,753126),(492292,3,753132),(492297,3,753138),(492302,3,753144),(492307,3,753150),(492312,3,753156),(492317,3,753162),(492326,3,753176),(492331,3,753182),(492338,3,753192),(492343,3,753198),(492348,3,753204),(492357,3,753218),(492364,3,753228),(492377,3,753250),(492384,3,753260),(492389,3,753266),(492394,3,753272),(492401,3,753282),(492458,3,753368),(492463,3,753374),(492469,3,753380),(492489,3,753414),(492496,3,753424),(492503,3,753434),(492510,3,753444),(492515,3,753450),(492528,3,753472),(492537,3,753486),(492577,3,753552),(492584,3,753562),(492591,3,753572),(492596,3,753578),(492605,3,753592),(492610,3,753598),(492615,3,753604),(492620,3,753610),(492625,3,753616),(492630,3,753622),(492636,3,753628),(492653,3,753654),(492664,3,753672),(492681,3,753702),(492686,3,753708),(492693,3,753718),(492700,3,753728),(492705,3,753734),(492716,3,753752),(492727,3,753770),(492736,3,753784),(492745,3,753798),(492754,3,753812),(492759,3,753818),(492764,3,753824),(492783,3,753846),(492817,3,753896),(492842,3,753942),(492847,3,753948),(492854,3,753958),(492863,3,753972),(492870,3,753982),(492895,3,754020),(492900,3,754026),(492907,3,754036),(492914,3,754046),(492919,3,754052),(492924,3,754058),(492929,3,754064),(492934,3,754070),(492943,3,754084),(492950,3,754094),(492957,3,754104),(492964,3,754114),(492969,3,754120),(492981,3,754138),(492996,3,754164),(493002,3,754170),(493007,3,754176),(493027,3,754202),(493035,3,754208),(493042,3,754218),(493053,3,754236),(493064,3,754254),(493071,3,754264),(493076,3,754270);
/*!40000 ALTER TABLE `GroupMembers` ENABLE KEYS */;
ANALYZE TABLE `GroupMembers`;