237 Commits

Author SHA1 Message Date
nilnandan
6588510632 PT-1718 - Have pt-stalk collect performance_schema.threads along with information_schema.processlist
- Update collect.sh file and add code for collecting threads details.
- Add PT-1718-threads.t test file for testing this fix.
2025-07-30 14:11:43 +00:00
Sveta Smirnova
ea6bd77501 PT-2340 - Support MySQL 8.4
- Moved data collection for THP from lib/bash/report_system_info.sh to lib/bash/collect_system_info.sh, so pt-summary reports THP status on the machine where samples were collected, not on the machine where an engineer examines samples.
2024-09-06 13:08:45 +03:00
Sveta Smirnova
b332537481 PT-2340 - Support MySQL 8.4
- Fixed staff I broke for 8.0
2024-08-23 16:03:53 +03:00
Sveta Smirnova
5c999ca3e0 PT-2340 - Support MySQL 8.4
- Removed runtime.txt after discussion with Anastasia Alexandrova
- Added "use VersionParser" into tests in t/lib when needed
- Removed word master from tests for pt-archiver, pt-config-diff, pt-deadlock-logger, pt-duplicate-key-checker, pt-find, pt-fk-error-logger, pt-heartbeat, pt-index-usage, pt-ioprofile, pt-kill, pt-mysql-summary
- Removed word slave from tests for pt-archiver, pt-config-diff, pt-deadlock-logger, pt-duplicate-key-checker, pt-find, pt-fk-error-logger, pt-heartbeat, pt-index-usage, pt-ioprofile, pt-kill, pt-mysql-summary
- Updated modules for pt-archiver, pt-config-diff, pt-deadlock-logger, pt-duplicate-key-checker, pt-find, pt-fk-error-logger, pt-heartbeat, pt-index-usage, pt-ioprofile, pt-kill, pt-mysql-summary
- Changed mysql_ssl patch, so it is now short option s
- Added a check for existing zombies in t/pt-kill/execute_command.t
- Added bin/pt-galera-log-explainer to .gitignore
2024-07-27 01:59:52 +03:00
Sveta Smirnova
8cbb5a0c8f PT-2340 - Support MySQL 8.4
- Removed lib/Percona/Test.pm, lib/Safeguards.pm, t/lib/Safeguards.t, because they are not used anymore
- Removed word "slave" from lib
2024-07-26 13:31:22 +03:00
Sveta Smirnova
b9a5231c9b PT-2340 - Support MySQL 8.4
- Removed all unneeded occuriences of the word "master" in lib
2024-07-25 23:12:43 +03:00
Sveta Smirnova
f47c1d76b6 PR-839 - Update pt-mysql-summary
- Reversed condition, so default is transaction_isolation, not
  tx_isolation
- Removed extra variable: we have variable $version, defined before
- Fixed test cases
2024-07-16 19:02:40 +03:00
MASTERGOKUL
fbf144c8f6 changed if condition more readable 2024-07-11 18:15:18 +05:30
GOKUL S
d2649ae884 added version check for transaction_isolation and tx_isolation 2024-07-11 15:09:28 +05:30
Sveta Smirnova
8dd0f28f64 Removed extra spaces in lsof output, so mysql_pid detection does not depend on lsof format 2024-06-07 22:12:44 +03:00
Sveta Smirnova
5e72127ebf Merge branch 'release-v3.6.0' of github.com:percona/percona-toolkit into release-v3.6.0 2024-06-07 22:12:44 +03:00
Sveta Smirnova
841ddb2edc PT-2327 - pt-mysql-summary fails to connect if password has a single quote character
- Implemented the fix
- Added test case
- Run update-modules
2024-04-11 14:38:28 +03:00
Sveta Smirnova
e9fab37367 PT-2275 - "System Summary" graph breaks when perl is not available (OS summary dashboard)
- Added check for Perl binary in lib/bash/parse_options.sh
- Updated tools
- Updated t/lib/bash/parse_options.sh, so it includes required package alt_cmds.sh
2024-03-18 14:27:11 +03:00
Sveta Smirnova
f136116826 PT-2295 - Fix tests on distributions
- Added test result adjustment on slow machines for
  t/lib/bash/collect.sh, because no other solution worked
- Updated modules for all tools
2024-02-13 20:03:32 +03:00
Sveta Smirnova
19baa34872 PT-2295 - Fix tests on distributions
- Fixed sporadic pt-tc failures on rolled back SHOW MASTER STATUS code
- Added better diagnostic info for sporadically failing t/pt-table-checksum/basics.t
- Decreased chunk size it t/pt-table-checksum/progress.t, so this test
  has less chances to fail, because pt-osc finishes faster than expected
2024-02-13 20:03:32 +03:00
Sveta Smirnova
7369476a8d PT-2295 - Fix tests on distributions
- Fixed typo in has_rocksdb variable assignment in lib/bash/report_mysql_info.sh
- Added cleanup to pt-stalk tests
2024-02-01 13:54:47 +03:00
Sveta Smirnova
cf255e01e4 Merge pull request #140 from akopytov/2.2
Add CPU cache configuration info to pt-summary.
2024-01-30 23:03:57 +03:00
Sveta Smirnova
3fa1d8dfed PR-160 - added support for operf if present, and if CMD_OPCONTROL is not set
- Added back support for CMD_OPCONTROL
2024-01-26 16:39:26 +03:00
Sveta Smirnova
5ca0e8a898 PR-160 - added support for operf if present, and if CMD_OPCONTROL is not set
- Made PR actually working
2024-01-26 01:01:23 +03:00
Sveta Smirnova
8e3ce6c74f Merge branch '3.x' into HEAD 2024-01-25 01:50:05 +03:00
Sveta Smirnova
1036b5768a PR-140 - Add CPU cache configuration info to pt-summary
- Merge branch '3.x' into HEAD
- Move code to the proper place: library files
- Fix tests
2024-01-25 01:41:20 +03:00
Sveta Smirnova
1407b5380b PT-2109 - pt-mysql-summary throws an error when using sql_mode="ANSI_QUOTES" (#696)
* PT-2109 - pt-mysql-summary throws an error when using sql_mode="ANSI_QUOTES"

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

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

- Removed keyring plugin check in the beginning of the test, because
  reported error would show up even on servers that do not have keyring
  plugin installed. Same applies to wsrep_on check and Percona Server
  features checks.
- Removed temporary dir setup, because not needed for this test.
2023-11-03 01:46:32 +03:00
Sveta Smirnova
f8c43118bd PT-2168 pt-osc shouldnt fail while unable to monitor a replica node (#676)
* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Proof of concept
- Fixed regular expression in lib/TableParser.pm mistakenly chaged in the tool's code

* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Added basic test case for PT-2168
- Added more details for replica lag information
- Disconnecting replica if lag is not checked. This prevents "Too many
  connections" error

* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Implemented option --wait-lost-replicas for pt-osc, added test case

* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Added more tests for situations where connection to the replica can
  fail

* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Removed extra checks for wait_no_die variable
- Added test cases for SQL queries that pt-osc sends to replicas

* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Allow to reload dsns table while waiting for missed replica if
  --recursion-method is dsn
- Fixed logic in replica rediscovery, so it works with replicas on the
  same host but with different ports
- Renamed option wait-lost-replicas to fail-on-stopped-replication, so
  it is in line with pt-table-checksum
- Adjusted tests
- Removed debug code for PT-1760
- Added test case for PT-1760
- Added exception for variable Open_tables_with_triggers in
  lib/bash/collect.sh due to failed test in Percona Server 8.0.34+
- Updated pt-stalk

* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Updated modules
- Fixed typo in t/pt-table-sync/bidirectional.t
- Removed trailing whitespaces in lib/MasterSlave.pm

* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Help for option --fail-on-stopped-replication

* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Added check for availability of the simple_rewrite_plugin in t/pt-online-schema-change/pt-2168.t

* PT-2168 - PT-OSC shouldn't fail while unable to monitor a replica node

- Added link to the simple_rewrite_plugin source code
- Removed tests for code that runs only in the beginning of pt-osc
  action, so should not be affected by the option fail-on-stopped-replication
2023-09-19 23:31:33 +03:00
Viktor Szépe
f2f7a7993d Add final newlines and remove trailing spaces (#672)
* Add final newlines and remove trailing spaces

* Replace TAB characters with spaces

* Fix indent
2023-09-15 17:31:40 +03:00
Viktor Szépe
2bd40d8c39 Remove trailing spaces (#665)
* Remove trailing spaces

* PR-665 -  Remove trailing spaces

- Updated not stable test t/pt-online-schema-change/preserve_triggers.t
- Updated utilities in bin directory

* PR-665 -  Remove trailing spaces

- Fixed typos

* PR-665 -  Remove trailing spaces

- Fixed typos

---------

Co-authored-by: Sveta Smirnova <sveta.smirnova@percona.com>
2023-09-06 01:15:12 +03:00
Viktor Szépe
c57441be8c War on typos Act 1 (#655)
* Fix typos in lib/ directory

* Update generated bin/ files

* PR 655 -  War on typos Act 1 #655

- Updated modules in tools that were not updated
- Fixed tests to reflect proposed changes

---------

Co-authored-by: Sveta Smirnova <sveta.smirnova@percona.com>
2023-08-22 16:18:38 +03:00
Sveta Smirnova
9755074cd8 PT-2156 Fix tests for lib, part2 (#650)
* PT-2156 - Fix tests for lib

Fixed tests, broken by putting fix for PT-1554 into the library code, mostly by updating checksums.
Added AutoCommit option for test lib/QueryReview.t
Reset SQL mode to empty to allow TableChunker to work with invalid and zero dates

* PT-2156 - Fix tests for lib

Adjusted t/lib/SchemaIterator.t to work with version 8.0

* PT-2156 - Fix tests for lib

Adjusted b/t/lib/Processlist.t, so it reflects fix for PT-981

* PT-2156 - Fix tests for lib

Adjusted t/lib/HTTP/Micro.t, so it works with different order of parameters, returned at v.percona.com/
Adjusted test for empty files in t/lib/bash/collect.t
Disabled mysqladmin debug test in t/lib/bash/collect.t, because of PT-2242

* PT-2156 - Fix tests for lib

Added LC_NUMERRIC=POSIX into t/lib/bash/report_system_info.sh, so reports in tests are not environment-dependent
Updated expected results in t/lib/bash/report_system_info.sh, so they reflect new information, collected by pt-summary

* PT-2156 - Fix tests for lib

- Improved fix for PT-76, so it handles inline comments
- Added test case for PT-76
- Improved fix for PT-1720, so it ignores unrecognizable option only if it comes from the toolkit-wide files and still errors out if wrong option was passed via command line or the tool-specific option file.

* PT-2156 - Fix tests for lib

- Improved fix for PT-2102, so it finds running instance configuration file using PID and also does not break t/lib/bash/report_mysql_info.t test
- Removed unnecessary copy-paste from t/pt-mysql-summary/pt-2102.t test
- Adjusted number of collected files in t/lib/bash/collect_mysql_info.sh

* PT-2156 - Fix tests for lib

- Fix for PT-1543 and MyRocks collection were originally put only into lib/bash/report_mysql_info.shthat broke the logic of collecting data first, then formatting report from this data. This, in its turn, broke test t/lib/bash/report_mysql_info.sh/t/lib/bash/report_mysql_info.t, because CMD_MYSQL is not defined in this library. I rewrote these fixes, so they follow original logic of the tool (pt-mysql-summary)
- Added tests for keyring plugin, encrypted tables, and MyRocks for t/lib/bash/report_mysql_info.sh and t/pt-mysql-summary/pt-mysql-summary_encryption.t

* PT-2156 - Fix tests for lib

- Added FLUSH TABLES to t/lib/bash/collect.sh, so it does not fail opentables tests if run when more than 1000 tables open in the sandbox environment
- Changed number of expected sample files to reflect keyring colletion file

* PT-2156 - Fix tests for lib

- Added skip to some tests in lib that file when run with PXC, because not supported to work with PXC
- Adjusted configuration files for PXC, so they allow LOAD DATA/SELECT INTO OUTFILE commands
- Adjusted data samples, so they do not depend on auto increment values
- Fixed lib tests, failing with PXC

* PT-2156 - Fix tests for lib

Updated tests for pt-online-schema-change, so they work with PXC and skipped if designed for semi-synchronous replication setup

* PT-2156 - Fix tests for lib

- Added cluster-specific samples for t/lib/SchemaIterator.t
- Removed extra debugging print from t/pt-table-checksum/pt-1728.t

* PT-2156 - Fix tests for lib

Evgeniy's review on July 20

* Update t/lib/TableSyncer.t

Removed comment left after debugging

* Update t/pt-mysql-summary/pt-mysql-summary_encryption.t

Removed extra debug output

* PT-2156 - Fix tests for lib

Tabs to spaces
2023-08-02 14:50:21 +03:00
Yoann La Cancellera
7ecdae6ef6 PT-2102_pt-mysql-summary should support include in config files (#601)
* PT-2102 pt-mysql-summary should support include* in config file

includedir directories are now printed in the order of which they appear in root my.cnf

* PT-2102 pt-mysql-summary should support include* in config file

!include was not supported. Changed 'for' to 'while' to properly
test for '!includedir' and '!include'. Supports extra spaces between
files and !include.

* PT-2102 pt-mysql-summary should support include* in config file

Updates modules, added test case for !include and !includedir
Changed find_my_cnf function to make it try every regexes and only
returned when it find one

* Update pt-mysql-summary

Identation fix as suggested by review

* Update collect_mysql_info.sh

Identation as suggested by review

* PT-2102 pt-mysql-summary should support include* in config file

Fix formatting after review

---------

Co-authored-by: Sveta Smirnova <svetasmirnova@users.noreply.github.com>
2023-02-23 16:00:44 +03:00
Sveta Smirnova
a12d4aecea PT-2150 Fix tests for pt-mysql-summary (#582)
* PT-2150 Fix tests for pt-mysql-summary

- Added POSIX environment to tests, so they do not depend on the local user environment
- Enabled keyring plugin on 8.0
- Fixed encryption information collection in 8.0, see also PT-1588

* PT-2150 Fix tests for pt-mysql-summary

- Added support of the environment variable DISABLE_KEYRING, so we can diable keyring plugin in sandbox/servers/start

* PT-2150 Fix tests for pt-mysql-summary

- Reverted changes in the expected output for tests 006 and 007 made by commit 9190b5e6ac
Because the tool now works properly again and can parse Percona XtraDB Cluster data

* PT-2150 Fix tests for pt-mysql-summary

- Added comment '--read-samples' back to the test cases
2023-02-06 17:11:42 +03:00
グリアンドロ
163376af69 PT-2084 show slave status (#545)
* PT-2084 Readding SHOW SLAVE STATUS outputs to pt-stalk

Before, they were only gathered if version was 5.6 or prior.
Now, they are always gathered, no matter what version.
Since ${mysql_version} is only major.minor, we can't yet add
SHOW REPLICA STATUS, because it starts on 8.0.22 and we have
no way to check that. We will need to wait for 8.1 release.

* PT-2084 Ran update-modules to generate binaries with changes.

* PT-2084 Added checks for preemptive 8.1 SHOW SLAVE STATUS removal.

* PT-2084 Adding test case for SHOW SLAVE STATUS

* Update t/pt-stalk/pt-stalk-replication.t

---------

Co-authored-by: Sveta Smirnova <svetasmirnova@users.noreply.github.com>
2023-02-02 17:08:54 +03:00
Sveta Smirnova
19aa46d1a5 PT-1052 include numa information in pt tool output (#547)
* PT-1052: fix for pt-summary

* Re-added fix from commit 71fae6d117 into proper place: library directory
Added tests for PT-1052 (pt-summary only)

* Fixed tests for pt-summary,
set locale for pt-summary tests, so they are not affected by user environment.
Finished tests for PT-1052

* Added fix for PT-1983 into the proper place: library file

* PT-1052: fix for pt-stalk which now includes numastat data
2022-08-15 15:45:24 +03:00
Sveta Smirnova
ac3843bcb7 Pt 1897 lock information in8.0 in pt stalk (#544)
* PT-1897 pt-stalk on MySQL 8 not collecting lock information

For version prior 8.0 pt-stalk continue using Information Schema INNODB_LOCKS and INNODB_LOCK_WAITS tables for collecting lock information.
For version 8.0 and higher pt-stalk uses tables data_locks and data_lock_waits in Performance Schema

* PT-1897 - Better MariaDB support

We cannot simply compare version number with 8.0 to identify if lock tables are in Performance Schema,
because MariaDB 10.x still have them in the Information Schema.
Therefore added additional flag, indicating which syntax we should use

* Tests for PT-1897
2022-07-25 10:01:14 -03:00
Sveta Smirnova
07ee5eb1bf PS-2033, proof of concept (#540) 2022-07-11 15:51:29 +03:00
Sveta Smirnova
22ed941238 PT-1218: pt-stalk ominous open_tables function (#535)
After discussion change only affects error message that is more user-friendly now.
I also added two tests that check how open_tables function works in both cases:
with number of open tables less tha 1000 and greater than 1000
2022-03-22 09:33:05 -03:00
svetasmirnova
9427c16314 PT-2037 - regression fixes
Re-added fix for PT-1340 that was reverted by fix for PT-1398
2022-01-23 03:55:35 +03:00
svetasmirnova
623fdaec91 PT-2037 - option --system-only for pt-stalk
This commit:
1. Moves all changes to the proper place: lib/bash/collect.sh
2. Refactors pt-stalk so it is more modular
3. Places fix for PT-1734 into the right place: lib/bash/collect.sh
4. Fixes tests for PT-1336
2022-01-22 21:21:05 +03:00
Carlos Salguero
951a333c81 PT-1398 Updated way of getting MySQL PID (#517) 2021-10-01 09:27:20 -03:00
Carlos Salguero
54bee8399a PT-1720 pmp won't error on unknown options 2019-06-27 10:32:23 -03:00
Carlos Salguero
d589034b31 PT-1422 Improved MariaDB support in pt-mysql-summary 2018-07-30 14:45:00 -03:00
Carlos Salguero
f3bca3af41 PT-1554 Fixed library report_mysql_info 2018-05-28 12:07:03 -03:00
Carlos Salguero
e41b68c979 Merge branch '3.0' into PT-1536 2018-05-18 14:30:03 -03:00
Carlos Salguero
e26b567218 PT-1554 Improved jemalloc detection 2018-05-17 14:35:52 -03:00
Carlos Salguero
b6526f6739 PT-1536 Updated samples for mysql-summary tests 2018-05-11 11:58:47 -03:00
Carlos Salguero
a79299bb12 PT-1543 Added --list-encrypted-table to pt-mysql-summary 2018-04-24 14:49:33 -03:00
Carlos Salguero
3eccfcef4d PT-1530 Add support for encryption status to mysql-summary 2018-04-13 15:08:10 -03:00
Carlos Salguero
d2ea011e87 PT-1525 Added support for roles in mysql-summary 2018-04-06 15:10:09 -03:00
Carlos Salguero
f6c01fc5bf PT-1526 Add ndb status to pt-mysql-summary 2018-04-04 09:26:02 -03:00
Carlos Salguero
6e96a1123c Updated bash libraries 2018-04-03 16:37:40 -03:00
Carlos Salguero
fb2a347654 Merge branch 'collect_ndb_status' of https://github.com/fipar/percona-toolkit into fipar-collect_ndb_status 2018-03-19 15:38:17 -03:00
Carlos Salguero
53ce571bf1 PT-633 Added --mysql-only option to pt-stalk 2018-02-12 16:40:30 -03:00