Commit Graph

54 Commits

Author SHA1 Message Date
Nyele93
a97c422851 PT-2465 patch fix for erroneous flavour mismatch in mariadb-10.5.x and above. This patch includes the fixed regex for checking DB flavour to include the case-insensitive marker i on the searches for MariaDB 2025-08-18 17:42:10 +03:00
Sveta Smirnova
bb66ab0845 PT-2340 - Support MySQL 8.4
- Implemented functions get_replica_name and get_source_name in lib/MasterSlave.pm I did not implement similar functions in other places, because they set other variables as well, not only replica_name or source_name.
2024-11-13 02:04:39 +03:00
Sveta Smirnova
86fe021434 PT-2340 - Support MySQL 8.4
- Updated modules
2024-10-04 19:06:01 +03:00
Sveta Smirnova
33086769a1 PT-2340 - Support MySQL 8.4
- Added test for replica lag check for pt-archiver
- Re-added deprecated slave- options
- Added tests for deprecation warnings and for legacy options for pt-archiver
- Removed practically not supported options --replica-user and --replica-password from pt-archiver, pt-kill, pt-query-digest
- Added legacy source/replica options (master/slave) variants and tests for pt-heartbeat, pt-online-schema-change, pt-replica-find, pt-replica-restart, pt-table-checksum, pt-table-sync
- Updated modules after lib/MasterSlave.pm change
2024-10-04 18:27:00 +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
e3e352d1d6 PT-2340 - Support MySQL 8.4
- Fixed comparison operators for VersionCheck calls
2024-08-27 13:45:37 +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
76c1202cb5 PT-2340 - Support MySQL 8.4
- Updated modules and tests for pt-online-schema-change
- Removed typo from lib/MasterSlave.pm
2024-07-30 18:20:50 +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
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
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
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
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
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
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
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
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
Mateus Dubiela Oliveira
d6ada6a7bf PT-1869: Enable slave list reloading (#456)
* PT-1869: Enable slave list reloading

* PT-1869: Fix pt-osc/slave_lag sample sizes for more consistent testing results

* PT-1869: Move slaves_to_skip to get_slaves_cb
2020-08-12 11:30:56 -03:00
Carlos Salguero
53213e0582 Merge branch '3.0' into PT-1707 2019-10-29 08:57:38 -03:00
Carlos Salguero
e656274493 PT-1707 Updated DSNParser in all apps 2019-10-29 08:53:26 -03:00
Carlos Salguero
2b3217a77a PT-1760 MasterSlave fix for rep channels 2019-10-15 18:45:43 -03:00
Carlos Salguero
636123bded WIP 2019-09-18 09:20:56 -03:00
Carlos Salguero
a83fbebf8d PBM-144 Updated MasterSlave to support hosts without port 2019-07-18 12:03:39 -03:00
Carlos Salguero
a97e24be71 PT-1707 IPV6 support for recursion method processlist 2019-04-11 17:44:17 -03:00
Carlos Salguero
af65e82ab7 MasterSlave check for errors on get_slave_status calls 2017-11-09 11:40:58 -03:00
Carlos Salguero
e428fa5187 3.0.5 Testing 2017-11-07 17:52:14 -03:00
Carlos Salguero
8ca82d085e PT-139 Detect only 1 slave using rep channels
If there is only one slave but it is using replication channels but
--channel was not specified as a parameter, get_slave_status will
return null.
2017-05-22 15:48:32 -03:00
Carlos Salguero
820448fca3 PT-139 wait_for_master returns error if no channel was specified in a multi master env 2017-05-12 15:44:57 -03:00
Carlos Salguero
5744fdf583 PT-139 Added replication channels suport to pt-table-sync 2017-05-12 11:55:52 -03:00
Carlos Salguero
84bf6b4396 PT-101 Fixed --slave-user in pt-table-checksum 2017-03-15 17:37:34 -03:00
Carlos Salguero
26cf65015c BUG-1595678 Updated MasterSlave lib into binaries
Also updated a 'SHOW PROCESSLIST' to 'SHOW FULL PROCESSLIST' because
pt-kill needs more than 100 chars in the info field.
2016-07-06 20:41:42 -03:00
Carlos Salguero
2c1db036b5 BUG-1595678 Added --slave-user, --slave-password params 2016-07-06 19:04:21 -03:00
frank-cizmich
6186f942b2 pt-osc fixed recursion method dsn - lp1523685 2015-12-14 00:40:16 -03:00
Daniel Nichter
b0cacd15f4 Improve MasterSlave::check_recursion_method() tests. 2013-10-02 11:15:58 -07:00
Brian Fraser
7d5da6e6f5 Rebased the branch to trunk 2013-04-12 12:58:10 -03:00
Brian Fraser
db0a29561c Fixes per Daniel's review 2013-04-09 10:21:15 -03:00
Daniel Nichter
feab2f0925 s/Percona Inc/Percona Ireland Ltd/g 2013-01-02 17:19:16 -07:00
Daniel Nichter
e6d31a666a Rewrite how MasterSlave handles --recursion-methods. 2012-08-02 10:57:36 -06:00
Brian Fraser fraserb@gmail.com
a25b9eab40 MasterSlave: Rework how the recursion methods are checked & resolved
In part by removing the OptionParser usage out from get_slaves
and recurse_to_slaves and making them expect arrayrefs, thus
forcing our callers to deal with that, and in part by
splitting out the method-checking to MasterSlave::check_recursion_method
and the resolving (originally in find_slave_hosts) into
_resolve_recursion_methods.
2012-08-01 17:39:12 -03:00
Brian Fraser
1d00866669 MasterSlave: Drop dependency on VersionParser 2012-07-13 01:16:04 -03:00
Brian Fraser
f30c50be44 Updated the fles in /lib to use the new VersionParser 2012-07-11 15:10:33 -03:00
Baron Schwartz
b9304dabb5 Fix a number of SQL queries to work with ANSI_QUOTES 2012-06-06 23:14:20 -04:00
Daniel Nichter
e969d8d9f7 Implement and test --recursion-method=none in MasterSlave.pm and pt-table-checksum. 2012-05-17 08:11:30 -06:00
Daniel Nichter
1a619cc47c Test and fix typo in MasterSlave.pm and update that module in all tools. 2012-01-31 09:53:06 -07:00
Daniel Nichter
88304e69fb Replace MKDEBUG with PTDEBUG in modules. 2012-01-19 12:46:56 -07:00
Daniel Nichter
e2e40488c5 Add Cxn.pm. Make MasterSlave, NibbleIterator, and ReplicaLagWaiter use Cxn. Rewrite, simplify Retry. 2011-10-06 12:47:35 -06:00
Daniel Nichter
5f2cdad299 Implement MasterSlave::get_slaves() to get cxns from a DSN table. Add comments explaining use_repl_db(). 2011-09-13 09:27:59 -06:00
Daniel Nichter
ff59f479e6 Add parentheses to avoid ambiguity. 2011-08-23 08:29:47 -06:00
Daniel Nichter
1e6c4daf23 Fix debug statement. 2011-08-02 16:24:59 -06:00