Commit Graph

108 Commits

Author SHA1 Message Date
Sveta Smirnova
5100e9b1aa PT-191 - add ssl options to DSN
- Updated ssl tests, so they test option --mysql_ssl and DSN
2025-07-30 17:18:38 +03:00
Sveta Smirnova
b7094dfd09 PT-191 - add ssl options to DSN
- Added test cases to ensure SSL is working in all tools
2025-07-26 14:18:30 +03:00
Sveta Smirnova
f4a324581a PT-2410 - pt-archiver brokes when using output-format=csv and has null values
- Updated t/pt-archiver/file.t
2025-03-13 23:26:56 +03:00
Sveta Smirnova
3cb46e61f7 PT-2410 - pt-archiver brokes when using output-format=csv and has null values
- Added test case
2025-03-13 22:57:46 +03:00
Sveta Smirnova
f57d63ab00 PT-2340 - Support MySQL 8.4
- Added sleep to t/lib/MasterSlave.t, so it does not fail on fast machines
- Disabled SSL tests on versions earlier than 8.0
2024-11-14 22:48:06 +03:00
Sveta Smirnova
a1093ff12c PT-2340 - Support MySQL 8.4
- s/slave lag/replica lag/ in tests
- reverted rename of COM_REGISTER_SLAVE to COM_REGISTER_REPLICA, because the constant still named COM_REGISTER_SLAVE in 8.4
- removed some slave leftovers from pt-replica-find
2024-11-12 15:18:36 +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
5d55904436 PT-2340 - Support MySQL 8.4
- Tests for the minimal SSL support
- Updated util/update-modules, so they don't skip tools with modules, not defined in lib
2024-09-18 15:28:45 +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
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
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
b98b998a2b PT-2295 - Fix tests on distributions
- t/pt-archiver/pt-2064.t does not clean up innodb_lock_wait_timeout
  properly and breaks t/pt-config-diff/basics.t as a result
- Added cleanup to t/pt-stalk/pt-stalk.t
2024-01-31 20:14:35 +03:00
Sveta Smirnova
cadf35abc4 PT-2083 - Pt-archiver --charset option is not working for MySQL8.0
- Changed logic, introduced by commit 1d1c13f
- Added test case
2023-12-22 23:11:31 +03:00
Sveta Smirnova
9b347dd466 Revert "PT-2083 - Pt-archiver --charset option is not working for MySQL8.0"
This reverts commit 284a1f945e.
2023-12-22 23:11:31 +03:00
Sveta Smirnova
1682aa202c PT-2083 - Pt-archiver --charset option is not working for MySQL8.0
- Changed logic, introduced by commit 1d1c13fbcb
- Added test case
2023-12-22 23:11:31 +03:00
Sveta Smirnova
a4cf465087 Merge pull request #706 from percona/Follow_PR-429_unstop_option_with_testcase
Follow PR-429 unstop option with testcase
2023-12-22 23:11:31 +03:00
Sveta Smirnova
2b440638c4 Merge pull request #604 from mikrobi/patch-1
Only rollback destination if it's defined
2023-11-12 23:28:13 +03:00
Sveta Smirnova
c1b751927c Follow_PR-429_unstop_option_with_testcase
- Added information message about removing sentinel file
- Added cross-links for options --stop and --unstop in docs
- Added test case
2023-11-07 16:25:50 +03:00
Sveta Smirnova
f0af7114e7 PT-2279 - Option --charset is confusing when set to utf8mb4
- Added pattern check for utf8 character set instead of eq
- Added test cases
2023-11-06 23:26:54 +03:00
Sveta Smirnova
d268165df0 PT-2064 - pt-archiver: Can't call method "rollback" on an undefined value
- Added regression test
2023-11-06 19:34:28 +03:00
Sveta Smirnova
817673755f PT-2207 - pt-archiver doesn't work when ANSI_QUOTES is set in sql_mode (#694)
- Implemented suggestion from the bug report
- Added test case
2023-11-02 15:06:46 +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
91ef89f904 PT-2114 Incorrect casting of bit columns by pt archiver (#587)
* PT-2114 Incorrect casting of BIT columns by pt-archiver

Added special handling of BIT columns, because by default Perl does not properly recognizes
this type and creates invalid query for MySQL.
Removed debugging comment from t/pt-table-checksum/pt-226.t
Added test case.

* PT-2114 Incorrect casting of BIT columns by pt-archiver

Removed debugging comments from t/pt-deadlock-logger/standard_options.t and t/pt-table-checksum/fnv_64.t

* PT-2114 Incorrect casting of BIT columns by pt-archiver

Added test for archiving BIT columns.

* PT-2114 Incorrect casting of BIT columns by pt-archiver

Added test for bulk operations

* PT-2114 Incorrect casting of BIT columns by pt-archiver

Added more tests for BIT columns

* PT-2114 Incorrect casting of BIT columns by pt-archiver

- Improved fix for PT-2123, so it works with 5.7
- Fixed tests for PT-2114, so they work with 5.7
2023-02-22 18:59:05 +03:00
Sveta Smirnova
798eaaa208 PT-2123 wide character in print for pt archiver (#583)
* PT-2123 pt-archiver gives error "Wide character in print at /usr/bin/pt-archiver line 6815" when using --bulk-insert while using character set alias

Added check if source DSN has character set UTF specified while option --charset is not provided
In this case it is safe to open bulk insert data file in utf8 mode.

* PT-2123 pt-archiver gives error "Wide character in print at /usr/bin/pt-archiver line 6815" when using --bulk-insert while using character set alias

Removed unrelated row in t/pt-archiver/samples/pt-2123.sql

* PT-2123 pt-archiver gives error "Wide character in print at /usr/bin/pt-archiver line 6815" when using --bulk-insert while using character set alias

util/update-modules for pt-archiver
2023-02-07 18:00:32 +03:00
Sveta Smirnova
01de987154 PT-2141 fix tests for pt-archiver (#581)
* PT-2141 Fix tests for pt-archiver

Fixed tests t/pt-archiver/bulk_insert.t, t/pt-archiver/issue_1225.t, t/pt-archiver/issue_1229.t
Their failures were due to change of utf8 alias from utf8mb3 in MySQL 5.7 to utf8mb4 in MySQL 8.0.
And also due to character set match check between connection ad source table.

* PT-2141 Fix tests for pt-archiver

Removed test for PT-1898, because it was broken from the beginning:
- it called pt-online-schema-change instead of pt-archiver
- it announced it will run 6 tests while was running only 2
- the test case itself did not test the issue, described in PT-1898
2023-02-02 17:09:34 +03:00
Sveta Smirnova
2f584c85db PT-2140 - Update modules in the main branch (#570)
* PT-2140 - Update modules in the main branch

Updated modules for:
- pt-align
- pt-archiver
- pt-config-diff
- pt-deadlock-logger
- pt-diskstats
- pt-duplicate-key-checker
- pt-fifo-split
- pt-find
- pt-fingerprint
- pt-fk-error-logger
- pt-heartbeat
- pt-index-usage
- pt-ioprofile
- pt-kill
- pt-mext
- pt-mysql-summary
- pt-online-schema-change
- pt-pmp
- pt-query-digest
- pt-show-grants
- pt-sift
- pt-slave-delay
- pt-slave-find
- pt-slave-restart
- pt-summary
- pt-table-sync
- pt-upgrade
- pt-variable-advisor

Added execute bit for pt-query-digest

* PT-2140 Update modules in the main branch

Fixed Daemon.pm plugin usage
Updated all tests, related to the Daemon plugin.
I intentionally did not fix failing tests, not related to Daemon plugin,
to avoid making this PR too big.

- bin/pt-archiver
	- PT-2141 - Fixed usage of Daemon.pm
	- PT-2141 - Updated t/pt-archiver/standard_options.t
- bin/pt-deadlock-logger
	- PT-2143 - Fixed usage of Daemon.pm
	- PT-2143 - Updated t/pt-deadlock-logger/standard_options.t
- bin/pt-fifo-split
	- PT-2144 - Fixed usage of Daemon.pm
	- PT-2144 - Updated t/pt-fifo-split/pt-fifo-split.t
- bin/pt-find
	- PT-2145 - Fixed usage of Daemon.pm
	- PT-2145 - Updated t/pt-find/pt-find.t
- bin/pt-fk-error-logger
	- PT-2146 - Fixed usage of Daemon.pm
	- PT-2146 - Updated t/pt-fk-error-logger/basics.t
- bin/pt-heartbeat
	- PT-2147 - Fixed usage of Daemon.pm
	- PT-2147 - Updated t/pt-heartbeat/standard_options.t, t/pt-heartbeat/basics.t
- bin/pt-kill
	- PT-2148 - Fixed usage of Daemon.pm
	- PT-2148 - Updated t/pt-kill/standard_options.t
- bin/pt-show-grants
	- PT-2152 - Fixed usage of Daemon.pm
	- PT-2152 - Updated t/pt-show-grants/standard_options.t
- bin/pt-slave-delay
	- Fixed usage of Daemon.pm
	- Updated t/pt-slave-delay/standard_options.t
- bin/pt-slave-find
	- PT-2153 - Fixed usage of Daemon.pm
	- PT-2153 -Updated t/pt-slave-find/pt-slave-find.t
- bin/pt-slave-restart
	- Fixed usage of Daemon.pm
	- Updated t/pt-slave-restart/pt-slave-restart.t
- bin/pt-table-sync
	- PT-2154 - Fixed usage of Daemon.pm
	- PT-2154 -Updated t/pt-table-sync/standard_options.t
2023-01-06 15:04:10 +03:00
Carlos Salguero
71c9902532 PT-1898 pt archiver keeps transaction open (#479)
* PT-1898 WIP

* PT-1898 Added commit for open txns

* PT-1898 Added commit for open txns

* PT-1898 removed dev leftover
2021-01-12 13:40:51 -03:00
Carlos Salguero
45522dea28 Renamed dubious tests 2020-04-01 15:39:16 -03:00
Carlos Salguero
a3ab87b12e Fixed pt-archiver tests 2020-03-30 14:57:02 -03:00
Carlos Salguero
f0ee14d479 WIP 2020-03-30 08:21:05 -03:00
Roma Novikov
4c28e71092 Merge pull request #376 from percona/PT-157
PT-157 Specifying the index to use for pt-archiver ignores --primary-key-only
2019-01-03 11:50:15 +02:00
Carlos Salguero
152712f799 PT-1667 Added replication channels support to pt-archiver 2018-12-05 14:15:51 -03:00
Carlos Salguero
4230f411e4 PT-157 Specifying the index to use for pt-archiver ignores --primary-key-only 2018-11-27 12:25:47 -03:00
Carlos Salguero
f0c947d9cf PT-1554 Test fixes for pt-archiver 2018-05-23 10:59:50 -03:00
Carlos Salguero
16df170671 PT-1554 Fixed tests for pt-archiver/utf8 2018-05-15 15:19:41 -03:00
Carlos Salguero
d73624e22b PT-1554 Fixed tests for pt-archiver/utf8 2018-05-15 15:17:34 -03:00
Carlos Salguero
1d1c13fbcb WIP 2018-01-16 11:11:16 -03:00
Carlos Salguero
0917acb1ff Fixed JSONFormater tests and dev env scripts 2017-07-12 13:01:57 -03:00
Carlos Salguero
163a7b095f Merge branch '3.0' into PT-143 2017-05-23 16:59:30 -03:00
Carlos Salguero
a4ecd9678f PT-143 Fixed key handling
When tehre is a table having a key like:
PRIMARY KEY (`id`,`start`,`end`,`user_id`(13),`interval`),
DBI driver is taking (13) as part of the field name.
Fixed the way pt-archiver composes the key using DBI cols field
instead of the colnames field since the cols field has the correct
field names for the key.
2017-05-18 12:03:02 -03:00
Carlos Salguero
e305c40f52 PT-141 added --output-format to pt-archiver 2017-05-15 13:51:58 -03:00
Carlos Salguero
020771b419 Updated changelog 2017-01-16 09:56:39 -03:00
Carlos Salguero
01daf0030e bug-1593265 Fixed pt-archiver deletes wrong rows
In the case we are trying to migrate a table with no PK nor an unique
key, pt-archiver was failing to select the correct rows for deletion.
This fix implemented here is to add ALL columns in the WHERE clause of
the DELETE command. This way, we are deleting only the exact same row we
just migrated but using columns instead of an index.
2016-06-22 13:17:57 -03:00
frank-cizmich
6433c99713 various 5.7 test and tool compatibility fixes 2015-12-24 09:49:17 -03:00
frank-cizmich
4d4605cc99 fixed basics.t test for pt-archiver 2015-08-25 12:17:29 -03:00
Frank Cizmich
5051753c6f removed trailing space in code and tests 2014-11-05 18:30:58 -02:00
Frank Cizmich
c99f271649 fixed pt-archiver row skipping on partitioned tables - 1376561 2014-10-10 19:20:39 -02:00
Daniel Nichter
dc2ac4a9f1 Failing test case: t/pt-archiver/bugs.t. 2013-08-07 19:18:51 -07:00
Brian Fraser
e3dae6cc50 bulk_insert.t: Stop using Encode::_utf8_on(), use utf8::decode() instead 2013-04-19 20:45:19 -03:00