Commit Graph

1319 Commits

Author SHA1 Message Date
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
65914c4c87 Version and modules updated for version 3.6.0 2024-05-25 16:13:43 +03:00
Sveta Smirnova
31124b1b1e Added SSL_verifycn_name flag to start_SSL in HTTP::Micro to resolve t/lib/HTTP/Micro.t test failure on bookworm 2024-05-24 16:57:00 +03:00
Michael Coburn
2a2160fff7 pgk -> pkg for OpenSolaris installer 2024-04-23 16:58:21 -06:00
Sveta Smirnova
18d4fe9183 Merge pull request #797 from percona/PT-2327_pt-mysql-summary_fails_to_connect_if_password_has_a_single_quote_character
PT-2327 - pt-mysql-summary fails to connect if password has a single …
2024-04-18 13:15:11 +03:00
Sveta Smirnova
c5cafbb486 PT-2231 - pt-osc + PTDEBUG=1 fails with Use of uninitialized value in concatenation (.) or string at ./pt-online-schema-change line 4309.
- Re-implemented fix for PT-1799 properly
- Added test case
- Updated modules
2024-04-11 21:47:11 +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
b15337dd97 Merge pull request #793 from percona/PT-1194_pt-table-sync_port_problem
PT-1194 - LP #1266896: pt-table-sync port problem
2024-04-11 14:03:16 +03:00
Sveta Smirnova
50bc80c243 Merge pull request #783 from percona/PT-1717_resume_pt-online-schema-change_if_interrupted
PT-1717 resume pt-online-schema-change if interrupted
2024-04-08 18:39:17 +03:00
Sveta Smirnova
a4c2fd3496 PT-1194 - LP #1266896: pt-table-sync port problem
- Fixed typos
2024-04-06 12:46:55 +03:00
Sveta Smirnova
b78c94e826 Merge pull request #784 from percona/PT-2313_pt-diskstat_fails_with_new_kernels_again
PT-2313 - pt-diskstat fails with new kernels again
2024-03-29 10:48:46 +03:00
Sveta Smirnova
e946d26a45 Merge pull request #788 from percona/PT-2264_pt-query-digest_Pipeline_process_11_--output_slowlog_caused_an_error_Wide_character
PT-2264 - pt-query-digest Pipeline process 11 (--output slowlog) caused an error: Wide character
2024-03-29 10:48:16 +03:00
Sveta Smirnova
c8e30e6cc3 Merge pull request #789 from percona/PT-2284_pt-kill_3.5.5_Wide_character_in_printf_at_usr_bin_pt-kill_line_7553
PT-2284 - pt-kill 3.5.5: "Wide character in printf at /usr/bin/pt-kill line 7553."
2024-03-29 10:47:58 +03:00
Sveta Smirnova
d68f56c924 PT-2284 - pt-kill 3.5.5: "Wide character in printf at /usr/bin/pt-kill line 7553."
- Set binmode to utf8 for the Daemon log files
- Added test case
- Run update-modules
2024-03-23 03:23:48 +03:00
Sveta Smirnova
37ca3d2d49 PT-1205 - LP #1275034: pt-table-sync reports 'wide character in print' and terminates
- Added binmode :utf8 for STDERR
- Added test case for PT-1205
- Run update-modules
2024-03-22 01:42:14 +03:00
Sveta Smirnova
1ad44e04da PT-2264 - pt-query-digest Pipeline process 11 (--output slowlog) caused an error: Wide character
- Updated lib/DSNParser.pm, so it sets binmode to character set utf8 since
  MySQL 8.0 if character set is not specified in the DSN
- Added test case
- Run update-modules
2024-03-21 13:01:03 +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
2df691d913 PT-2313 - pt-diskstat fails with new kernels again
- Ported fix for PT-1887
- Added test case
2024-03-15 19:15:51 +03:00
Sveta Smirnova
ab6e5aa1bb PT-1717 - resume pt-online-schema-change if it's interrupted
- Added options --history, --history-table, and --binary-index
- Added code that creates history table to store pt-osc progress
2024-02-20 20:08:20 +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
325809e86f PT-2295 - Fix tests on distributions
- Added regular expressions that match MariaDB Connector/C syntax for
  errors 2006 (Server has gone away) and 2013 (Lost connection)
2024-02-01 22:10: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
5b61ec79b5 Version and release notes updated 2023-12-22 23:34:57 +03:00
Sveta Smirnova
bab154be03 Updated modules and version 2023-12-22 23:11:31 +03:00
Sveta Smirnova
643113540f PT-2268 - pt-online-schema-change 3.5.5 breaks on mysql5.7 with server_id 0
- Better check if server_id is defined
- Added test case
2023-12-22 23:11:31 +03:00
Sveta Smirnova
be2310f2b3 Merge pull request #471 from perfectayush/support-query-explain-in-json-output
Support adding explain output for slow query in JSON report as well
2023-11-12 23:28:49 +03:00
Sveta Smirnova
3e1e9b8425 PT-1860 make pt-osc respect case insesitive lookup on Windows and osx #516
- Run update-modules
- Adjusted fix, so it does not create extra variable to hold $EVAL_ERROR
- Adjusted test case, so it runs on Linux
2023-11-09 17:16:43 +03:00
Sveta Smirnova
e4583b0542 Merge branch '3.x' into HEAD 2023-11-09 13:43:17 +03:00
Ivan Kruglov
8d38d0900a PT-1860 make pt-osc respect case insesitive lookup on Windows and osx 2023-11-08 20:16:31 +01:00
Sveta Smirnova
17820dbf23 PR-471 - Support adding explain output for slow query in JSON report as well
- Put fix into the proper place
- Added test cases
2023-11-06 17:21:28 +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
df73533d29 Changelog for v3.5.5 (#684)
* PT-2255 Release notes for Percona Toolkit version 3.5.5
	modified:   Makefile.PL
	modified:   config/sphinx-build/conf.py
	modified:   docs/release_notes.rst

* PT-2255 Release notes for Percona Toolkit version 3.5.5

- Added missed contributions

* PT-2255 Release notes for Percona Toolkit version 3.5.5

- Added PT-2258

* Changelog for version 3.5.5

Added Changelog, updated version

* Update Changelog

Co-authored-by: Alina Derkach <alina.derkach@percona.com>

---------

Co-authored-by: Alina Derkach <alina.derkach@percona.com>
2023-10-03 16:29:53 +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
Sveta Smirnova
205d7baf5b Release v3.5.4 (#647)
* Version updated

* PT-2232 Release Notes 3.5.4 (#633)

modified:   Changelog
	modified:   Makefile.PL
	modified:   config/sphinx-build/conf.py
	modified:   docs/release_notes.rst

* Updated version in the second place

---------

Co-authored-by: Alina Derkach <alina.derkach@percona.com>
2023-06-30 18:44:59 +03:00
hanzhongzi
b980c6e149 Fix An error occurred when I migrated... (#614)
HI, i am back
An error occurred when I migrated data from MySQL to OceanBase:【 DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near ':= @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE /' at line 1 [for Statement "/!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */"] at /usr/bin/pt-archiver line 1932.】

I'm not a Perl programmer. But by reading the source code and making some changes, the migration was done successfully, so I submit this report


- [x] The contributed code is licensed under GPL v2.0
- [x] Contributor Licence Agreement (CLA) is signed
- [x] util/update-modules has been ran
- [x] Not involved Documention updated
- [x] Not involved Test suite update
2023-06-26 14:54:13 +03:00
Sveta Smirnova
25c969542b PT-2151 fix tests for pt-query-digest (#631)
* PT-2151 - Fix tests for pt-query-digest

Put fix for PT-1908 into the proper place

* PT-2151 - Fix tests for pt-query-digest

Put fix for PT-1554 into the proper place

* PT-2151 - Fix tests for pt-query-digest

Adjusted expected results for the default test t/pt-table-checksum/basics.t, so they do not depend on number of rows in the help tables

* PT-2151 - Fix tests for pt-query-digest

Added additional check for both replicas into t/pt-online-schema-change/preserve_triggers.t to avoid deadlock when ->ok() is doing CHECKSUM

* PT-2151 - Fix tests for pt-query-digest

Added delay to t/pt-table-sync/wait.t, so it waits for the child process to start lagging

* PT-2151 - Fix tests for pt-query-digest

Updated t/pt-query-digest/samples/issue_1196-output-8.0.txt, so it reflects changes in the latest 8.0

* PT-2151 - Fix tests for pt-query-digest

Updated queries against query history table, so they don't fail after e2cf183762

* PT-2151 - Fix tests for pt-query-digest

Fixed PT-813 by comparing query text. Since order itself does not matter, it is not essential to compare by the fingerprint or use any other function that changes the query.

* PT-2151 - Fix tests for pt-query-digest

Adjusted samples files which now should have consistent order after fix for PT-813

* PT-2151 - Fix tests for pt-query-digest

Fixed typo in the SELECT query in the QueryReview package

* PT-2151 - Fix tests for pt-query-digest

Fix for PT-981

* PT-2151 - Fix tests for pt-query-digest

Updated modules for pt-index-usage and fixed tests, because checksum is calculated differently after fix for PT-1554

* PT-2151 - Fix tests for pt-query-digest

Updated modules for pt-diskstats, pt-fk-error-logger, pt-heartbeat, pt-online-schema-change, pt-slave-delay, pt-slave-find, pt-table-checksum, pt-table-sync, pt-upgrade

* PT-2151 - Fix tests for pt-query-digest

Updated lib/IndexUsage.pm, so fix for pt-index-usage is in the correct place
2023-06-23 15:48:21 +03:00