35 Commits

Author SHA1 Message Date
Sveta Smirnova
194bb99ef9 PT-2340 - Support MySQL 8.4
- Fixed 5.7 tests
2024-08-25 04:36:37 +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
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
8261dbc543 PT-2295 - Fix tests on distributions
- Removed mysql_ssl=1 from t/lib/TableParser.t, because it breaks with
  DBI 1.642
2024-02-01 18:03:18 +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
Carlos Salguero
e570cecbab PT-1914 Column data lost when 'Generated' is in the column comment (#482)
* PMM-1914 Fixed column parsing having generated

Fixed table parser code that errouneously considered a column as
generated when the default was empty DEFAULT '' and the COMMENT had
the word 'Generated'.

* PMM-1914 Updated TableParser in all programs

* PT-1914 Updated changelog

* PT-1914 Added test
2021-03-09 11:46:05 -03:00
Carlos Salguero
9190b5e6ac Tests passed with MySQL 5.7 2019-09-03 15:26:26 -03:00
Carlos Salguero
5c4a6bd5e1 PT-1728 Fixed missing Quoter pkg 2019-05-30 09:56:26 -05:00
Carlos Salguero
602c1f0ea2 PT-1570 pt-archiver fails to detect columns with the word GENERATED as part of the comment 2018-06-14 14:15:20 -03:00
Carlos Salguero
1d1c13fbcb WIP 2018-01-16 11:11:16 -03:00
Carlos Salguero
6742025dd0 PT-209 Check adding FKs to a RocksDB table 2017-11-13 16:07:12 -03:00
Carlos Salguero
b51d09d811 PT-202 pt-online-schema-change fails with virtual columns
Modified TableParser to ignore GENERATED columns from the columns list
used to construct SELECTs/INSERTs
2017-10-05 15:19:57 -03:00
Carlos Salguero
c375fd068b PT-193 Fixed regex in TableParser
TableParser's parse function was failing while trying to lowercase
column names in the provided 'SHOW CREATE TABLE'.
The problem was it was trying to lowercase everything between backticks
but lines like these:

`field_name` int comment "here is a ` in the comment"
`second_field_name` int

made the original regex to fail, matching `in the coment"` as an
expression to be lowercased while second_file_name was considered as
outside backticks.
2017-08-14 21:01:30 -03:00
Carlos Salguero
f6d2e89027 Fixed all tests for MySQL 5.7
Most of the failing tests were failing due to changes in MySQL 5.7
default sql_mode and because of invalid timestamps ('0000-00-00')
2017-05-03 15:48:11 -03:00
frank-cizmich
2134e3f1b4 Merge branch 'handle-literal-backticks-lp-1462904' into release-2.2.15 2015-09-08 15:45:39 -03:00
frank-cizmich
b408fcfd01 misc test and sandbox fixes 2015-08-03 17:26:51 -03:00
Daniel Nichter
32dba7e7f2 Test and fix parsing literal backticks in TableParser:parse() (lp 1462904). 2015-06-25 13:20:00 -07:00
Brian Fraser
511a402911 Merged fix-1047335-crashed-tables 2012-11-09 13:48:17 -03:00
Brian Fraser
173a5766be Fixes per Daniel's review 2012-11-09 12:07:14 -03:00
Daniel Nichter
a0cd575c95 Merge fix-1009510-1039569-ptc-check-table-on-replicas 2012-11-05 10:54:21 -07:00
Daniel Nichter
0cffac95de Simplify how ptc checks slave tables. Move that code from TableParser to pt_table_checksum::check_slave_tables. Change --[no]check-replicate-table-columns to --[no]check-slave-tables. Move tests to error_handling.t. 2012-11-02 15:22:47 -06:00
Brian Fraser
35f5f8d1e4 Fix for 1047335: SchemaIterator fails when it encounters a crashed table 2012-10-30 18:35:49 -03:00
Daniel Nichter
4a494d1a20 Remove all_privs tests. Update Percona::Toolkit::VERSION. 2012-10-20 17:59:28 -06:00
Brian Fraser
c444384c6c Fix for 1009510 and 1039569: pt-table-checksum doesn't check that tables exist on all replicas / shouldn't die if it can't create db/table 2012-08-23 03:14:14 -03:00
Baron Schwartz
f7c97e749e Make TableParser.pm handle ANSI quotes 2012-06-07 00:59:59 -04: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
dac0731251 Remove PerconaTest::wait_for_table() after calls to Sandbox::load_file() which now implicitly calls Sandbox::wait_for_slaves(). 2012-06-07 10:25:44 -04:00
Daniel Nichter
04d6a51074 Fix TableParser.t modifying mysql.user and mysql.db, and pt-online-schema-change/basics.t modifying mysql.proc. 2012-06-05 11:51:33 -07:00
Daniel Nichter
bdbb66d22b Re-add calls to Sandbox::ok(). 2012-06-03 13:54:32 -04:00
Daniel Nichter
8e9e8eb7a6 Test and fix space-flattening bug. 2012-02-21 13:22:56 -07:00
Daniel Nichter
c40e5db1bf Fix lib tests for MySQL 5.0. 2012-02-02 10:56:55 -07:00
Daniel Nichter
756142c1d1 Remove MySQLDump; move get_create_table() and get_table_status() to TableParser and remove saving results in each function. 2011-09-15 09:39:32 -06:00
Daniel Nichter
b805f7c92d Remove $Revision$ and finish re-branding modules. Rename MaatkitTest.pm to PerconaTest.pm. Put copyrights on one line. 2011-07-12 15:47:07 -06:00
Daniel Nichter
6c501128e6 Add lib/, t/lib/, and sandbox/. All modules are updated and passing on MySQL 5.1. 2011-06-24 11:22:06 -06:00