213 Commits

Author SHA1 Message Date
Sveta Smirnova
9bb3ab4cbc PT-2440 - Support for MariaDB 10.5
- Added sandbox defaults for MariaDB 11.3
2025-08-23 03:41:22 +03:00
Sveta Smirnova
9f1e50cb58 PT-2340 - Support MySQL 8.4
- Changed replica_parallel_workers in configuration for 8.0 and 8.4 to o, because wiat_for_replicas is buggy for multi-threaded slaves (cherry picked from commit d9b0219d9e)
- Minor tests diagnostic and cleanup
2024-12-16 13:23:41 +03:00
Sveta Smirnova
d03bd604a1 PT-2340 - Support MySQL 8.4
- Fixed typos
- Added tests for MyRocks and TokuDB clustered indexes into t/pt-duplicate-key-checker/clustered_keys.t
- Updated modules
2024-09-04 18:32:58 +03:00
Sveta Smirnova
194bb99ef9 PT-2340 - Support MySQL 8.4
- Fixed 5.7 tests
2024-08-25 04:36:37 +03:00
Sveta Smirnova
e2207ea232 PT-2340 - Support MySQL 8.4
- Removed offensive terminology from library files and their tests
- Removed unused sandbox/prove2junit.pl
- Added option mysql_ssl to DSN and possibility to have DSN of multiple letters
2024-07-25 19:03:33 +03:00
Sveta Smirnova
a530c6f84c PT-2340 - Support MySQL 8.4
- Fixed status check for 8.4 sandbox
- Removed option "reset" from the usage output, because option itself was removed by 92a36715c4
- Fixed sandbox/start-sandbox script, so it can start custom setups with 8.4
2024-07-23 17:33:52 +03:00
Sveta Smirnova
4612cb2b97 PT-2340 - Support MySQL 8.4
- Adjusted sandbox scripts, so they can start MySQL 8.4
- Added MySQL 8.4 configuration file
- Removed empty file sandbox/5.6
- Removed unused files sandbox/set-mysql, sandbox/slave_channels_t.sql, sandbox/jenkins-test
- Removed offensive terminology from the sandbox scripts wherever it is possible
2024-07-23 16:07:38 +03:00
Sveta Smirnova
e2ca142baa PT-2154 - Fix tests for pt-table-sync
- Removed junk comment from t/pt-table-sync/pt-2309.t
- Re-enabled t/pt-table-sync/issue_96.t in 8.0+
- Re-enabled tests in t/pt-table-sync/pt-1256.t in 8.0.14+
- Re-enabled t/pt-table-sync/master_master.t in 8.0+
- Re-enabled t/pt-table-sync/lock_and_rename.t in 8.0+
- Re-enabled t/pt-table-sync/issue_965.t
- Added proper disable comments into t/pt-table-sync/issue_920.t and t/pt-table-sync/issue_996.t
2024-05-15 19:31:27 +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
ea67327ff7 Fix more typos (#658) 2023-08-22 19:34:24 +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
642253ce52 PT-2156 Fix tests for lib (#606)
* PT-2156 - Fix tests for lib

- Fixed tests broken for lib/TableParser.pm after fix for PT-1059
- Updated tests for lib/TableParser.pm that are broken due to SHOW CREATE TABLE output format change in 8.0
- Updated modules for all tools that use lib/TableParser.pm

* Revert "Fixed pt-archiver tests"

This reverts commit a3ab87b12e.

This commit wa needed, because removed code in sandbox/slave_channels.sql broked the test. Proper fix would be to do not remove channel names rather than chaging the test. So revertig it.

* PT-2156 - Fix tests for lib

- Updated test t/lib/TableChecksum.t so it reflects changes, introduced in the fix for PT-2016
- Updated test t/lib/RowChecksum.t so it reflects changes added to in the fix for PT-2138: UTF8 support
- Uncommented SQL in sandbox/slave_channels.sql that made t/lib/MasterSlave.t to fail
- Added check for undef into t/pt-archiver/archive_using_channels.t
- Updated lib/Cxn.pm so it uses $dbh->{Active} after issue with the ping() call, reported at https://github.com/perl5-dbi/DBD-mysql/issues/306

* PT-2156 - Fix tests for lib

- Impoved the fix for PT-2016, so it does not files with keys with USING keyword
- Added brackets to expression in lib/TableNibbler.pm, so it does not crap query wit many indexes with OR keyword
- Adjusted test t/lib/TableNibbler.t, so it reflects above chages
- Modified lib/Cxn.pm, so it has workaround for https://github.com/perl5-dbi/DBD-mysql/issues/306 , introduced in DBD::mysql 4.0.50
- Updated tests: added debugging code and cleanups
- Updated modules for tools
2023-03-27 14:18:26 +03:00
Sveta Smirnova
bfc00b93a8 PT-2160 fix tests for pt online schema change (#602)
* PT-2160 - Fix tests for pt-online-schema-change

Re-enabled tests after MySQL bug #89441 fix in 8.0.14 and later
Updated t/pt-online-schema-change/samples/basic_no_fks_innodb.sql, so its unique index is NOT NULL
Added synchonizations when tests are waiting for too long due to slave catch up
Added innodb_directories option for t/pt-online-schema-change/pt-244.t

* PT-2160 - Fix tests for pt-online-schema-change
PT-2048 - pt-osc spans excessive connections to the replica when executing in the source

t/pt-online-schema-change/slave_lag.t was failing due to PT-2048. I added code that reuses already created connections when checks for slave in the wait loop. It fixes slave_lag.t too.
I also added that prints more detailed error when fails to connect to the replica.

* PT-2160 - Fix tests for pt-online-schema-change

Modified t/pt-online-schema-change/slave_lag.t, so it runs and clean ups faster.

* PT-2160 - Fix tests for pt-online-schema-change

Modified t/pt-online-schema-change/pt-1455.t, so it runs and clean ups faster.

* PT-2160 - Fix tests for pt-online-schema-change

Fixed search for HASH and BTREE keys broken by fix for PT-2123
Updated modules for pt-archiver
Fixed die message for sandbox/start-sandbox
Added global_grants table to list of exceptions for the ok function in lib/Sandbox.pm
Added wait_for_slaves to bugs.t, so changes on the source are copied to replica before pt-osc starts working
Updated PXC tests
Added wait_for_slaves to pt-1455.t
Fixed regular expression in pt-229.t, so it works with both 5.x and 8.0 versions
Added innodb_directories option for pt-244.t, so it does not fail on 8.0
Modified slave_lag.t, so it is more stable and slow enough, so pt-osc can print message about delayed replicas
2023-02-27 01:19:11 +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
Sveta Smirnova
a7efd8c94e PT-2138 - fix tests for pt table checksum (#568)
* PT-2138 - Fix tests for pt-table-checksum

- Updated t/pt-table-checksum/samples/default-results-8.0.txt and
t/pt-table-checksum/samples/static-chunk-size-results-8.0.txt
to support latest MySQL 8.0 version. Tests are now incompatible with elder 8.0 releases.
- Put fix for PT-136 into package RowChecksum
- Added execution bit for pt-online-schema-change

* PT-2138 - Fix tests for pt-table-checksum

- Fixed percona_test.load_data, so it really tests if LOAD DATA LOCAL INFILE is enabled
- Fixed option --[no]create-replicate-table, broken by commit c9836d5962

* PT-2138 - Fix tests for pt-table-checksum

- Enabled t/pt-table-checksum/error_handling.t for MySQL 8.0
- Fixed test t/pt-table-checksum/fnv_64.t and it's samples file
t/pt-table-checksum/samples/fnv64-sakila-city.txt
to reflect new function name convention and
changes after 62d84e5dba

* PT-2138 - Fix tests for pt-table-checksum

- Fixed t/pt-table-checksum/issue_1485195.t, so it checks only one table and
isn't get broken when we add tables into percona_test database
- Fixed typo in error output of bin/pt-table-checksum
- Skipped issue_47.t in 8.0 until https://jira.percona.com/browse/PT-1805 is fixed

* PT-2138 - Fix tests for pt-table-checksum

- Disabled pt-131.t for 8.0, because it does not have the QUERY_RESPONSE_TIME plugins
- Added SLOW_TESTS check to pt-1616.t
- Updated pt-226.t to include the fix for PT-1766
- For replication_filters.t: excluded false positive expression for tests 10 and 11 and added sys schema to the list of checked databases for 8.0
- Changed get_slaves in lib/MasterSlave.pm, so it returns slave's parent, required for wait_for_slaves in pt-table-checksum to work properly with chained slaves

* PT-2138 - Fix tests for pt-table-checksum

- Modified pt-204.t  to support 8.0 and diffs in system tables due to timestamps
Moved the fix for PT-1616 into the proper place: lib/NibbleIterator.pm

* PT-2138 - Fix tests for pt-table-checksum

- pxc.t -added mysql.proxies_priv into ignore list, because its timestamp is different on node
- pxc.t - removed FORK=pxc from statup options for slave (non-cluster) nodes
- pxc.t - disabled wsrep replication with help of the variable wsrep_on: sql_log_bin doesn't disable wsrep replication anymore. See https://jira.percona.com/browse/PXC-3464 for details
- Removed data.tar.gz from 5.7 sandbox configuration, because it has an outdated definition for Performance Schema
- Disabled pxc.t for version 8.0 until PT-1699 is fixed
- start-sandbox - removed the first line (ALTER USER) from the init file, because it was rewritten by the next echo command, and then repeated later.

* PT-2138 - Fix tests for pt-table-checksum

- Adopted issue_1485195.t and basics.t for MyRocks-enabled setup
- replication_filters.t - added sys schema to the list of expected schemas for 5.7 and 8.0
- issue_1485195.t - added checks for the existence of mysql.plugin, func, and proxies_priv tables
- added samples/pt-131-wipe.sql that uninstalls QRT plugin if it was earlier installed by this test
-adjusted return code in pt-204.t, because expected differences in mysql.proxies_priv

* Update lib/PerconaTest.pm

removed diagnostic code

Co-authored-by: Carlos Salguero <carlos.salguero@percona.com>

Co-authored-by: Carlos Salguero <carlos.salguero@percona.com>
2022-12-28 23:09:13 +03:00
Sveta Smirnova
b2860eee31 PT-1336 pt-stalk removes user files from destination (#524)
* PT-1336 Added file name checks and -maxdepth 1 parameter

* PT-1336 pt-stalk removes user files from the destination directory

* Added check that files to be removed were created by pt-stalk

* Added option -maxdepth 1 to find command, so the tool does not search for files in the nested directories

* Added unit tests

* This should fix PT-1812 also
2021-12-10 09:18:18 -03:00
Carlos Salguero
f0ee14d479 WIP 2020-03-30 08:21:05 -03:00
Carlos Salguero
670dd962a9 Merged 3.0 branch 2020-03-26 08:41:25 -03:00
Carlos Salguero
636123bded WIP 2019-09-18 09:20:56 -03:00
Carlos Salguero
905793208a PT-1673 Fix for MariaDB 10.3 2019-01-07 11:16:08 -03:00
Carlos Salguero
348c105639 PT-1638 Fixed MariaDB support
Because https://bugs.mysql.com/bug.php?id=89441 pt-osc with --drop-swap
doesn't work with MySQL 8.0+ (it will be fixed in MySQL 8.0.14) but it
should work with MariaDB 10.
Fixed version comparison to include the MySQL 'flavor'.
2018-11-12 09:34:40 -03:00
Carlos Salguero
9b20208a78 Re-merged PT-242 2018-07-05 11:04:44 -03:00
Tomislav Plavcic
819d41826e Merge pull request #342 from tplavcic/jenkins-report
Fix prove2junit.pl to better catch test errors for jenkins report
2018-05-31 14:31:53 +02:00
Tomislav Plavcic
90d818d574 Fix prove2junit.pl to better catch test errors for jenkins report 2018-05-31 14:13:01 +02:00
Carlos Salguero
f4e7230bbd PT-1554 fixed sandbox script for gtid with 5.6 2018-05-30 00:26:20 -03:00
Tomislav Plavcic
56fb394e32 Update prove2junit.pl to group tests into testsuites in jenkins 2018-05-29 17:15:11 +02:00
Carlos Salguero
68d97edbed Merge pull request #329 from percona/PT-118
PT-118 Modify pt-checksum such that it can report the number of rows of difference between master and slave
2018-05-18 14:27:20 -03:00
Carlos Salguero
4ad46309ea PT-1554 Re-enabled genlog for filters.t 2018-05-17 15:17:30 -03:00
Carlos Salguero
85ab10b695 PT-1554 Updated sandbox config files to run in docker 2018-05-16 22:54:43 -03:00
Carlos Salguero
e8e8d010cb PT-118 Updated tests for MySQL 5.5
Also, sandbox data file (data.tar.gz) was broken.
2018-05-07 16:46:49 -03:00
Carlos Salguero
88e9ded245 PT-1538 Updated sandbox files for MySQL 8.0.11 2018-04-19 12:40:07 -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
263edd7a44 PT-1530 WIP sandbox scripts 2018-04-12 12:06:59 -03:00
Carlos Salguero
5d74b0e765 PT-1530 WIP Added encryption plugins to sandbox start
In order to be able to test encryption support in Percona Server and
MySQL, we need to enable encription plugins in the sandbox.
This commit adds detection of plugin libraries in the MySQL binaries
directory and enables it automatically.
2018-04-12 10:21:25 -03:00
Carlos Salguero
384542e0fe PT-1530 WIP 2018-04-11 15:20:15 -03:00
Carlos Salguero
ec25735ca4 PT-572 More tests fixed 2018-02-21 16:42:26 -03:00
Carlos Salguero
8943e0a9f6 Merge branch '3.0' into mysql-8 2018-02-19 12:11:07 -03:00
Carlos Salguero
75ab0ba653 PT-1256 pt-table-sync does not use the character set for the table it is synchronizing 2018-02-09 16:46:16 -03:00
Carlos Salguero
71e15315f0 PT-572 More tests fixed 2018-02-06 09:00:12 -03:00
Carlos Salguero
51dcca5959 PT-572 Fixes for MySQL 8
- Updated sandbox data file
- Fixes for pt-upgrade since there is no query_cache in MySQL 8
- Updates for SchemaIterator since there are new/renamed tables in MySQL 8
- Disabled some tests due to errors in MySQL 8.0.4-rc
2018-02-01 11:30:12 -03:00
Carlos Salguero
d38a584271 Fixes for DSN parser to use UTF8 2018-01-28 14:46:51 -03:00
Carlos Salguero
f3132d3cee WIP 2018-01-25 00:01:56 -03:00
Carlos Salguero
045c656839 Fixes for MasterSlave.pm 2018-01-22 16:27:36 -03:00
Carlos Salguero
1d1c13fbcb WIP 2018-01-16 11:11:16 -03:00
Carlos Salguero
4b563ef714 WIP 2018-01-09 16:19:05 -03:00
Carlos Salguero
709a13eebb Merge pull request #286 from percona/PT-205
PT-205 pt-online-schema-change show message on rocksdb if binlog_form…
2017-12-15 09:57:19 -03:00
Carlos Salguero
dc6b8c22f0 PT-205 pt-online-schema-change show message on rocksdb if binlog_format != row 2017-12-14 18:15:14 -03:00
Carlos Salguero
ba96aa79a8 PT-214 Added RocksDB section to pt-mysql-summary 2017-12-14 13:31:45 -03:00
Carlos Salguero
e794f06d2b Updated sandbox script to allow enabling TokuDB 2017-12-14 10:50:32 -03:00
Carlos Salguero
6742025dd0 PT-209 Check adding FKs to a RocksDB table 2017-11-13 16:07:12 -03:00