Compare commits

...

155 Commits

Author SHA1 Message Date
Carlos Salguero
3ebe939ce7 Fixed small error displaying the advices 2018-10-26 16:08:59 -03:00
Carlos Salguero
b33e63cdf2 Replaced HTTP::Micro by HTTP::Tiny 2018-10-26 16:02:34 -03:00
Carlos Salguero
ab92feb875 Merge pull request #351 from guriandoro/PT-1534
PT-1534 Support for --version
2018-10-07 10:21:33 -03:00
Carlos Salguero
5498a4da81 Merge pull request #371 from percona/PT-1618-b
PT-1618 Fixed documentation typos
2018-09-26 09:52:14 -03:00
Carlos Salguero
45a8579af7 PT-1618 Fixed documentation typos 2018-09-26 09:51:37 -03:00
Carlos Salguero
8ad1481c6c Merge pull request #370 from percona/PT-1573
PT-1573 Fixed General log parser regex
2018-09-26 09:29:45 -03:00
Carlos Salguero
2b5c8f69ab PT-1573 Fixed General log parser regex
The regexp to process log entries was not considering timestamps in +n,
it was only considering timestamps in -n hours
2018-09-26 09:25:33 -03:00
Carlos Salguero
eec92a7387 Updated Percona::Toolkit version to 3.0.13-dev 2018-09-25 17:33:01 -03:00
Carlos Salguero
d3741ca915 Merge pull request #363 from percona/release-3.0.12
RM-387 Updated version, changelog and release notes
2018-09-24 10:52:14 -03:00
Carlos Salguero
36088049cc Merge pull request #365 from percona/PT-1340
PT-1340 removed debug param from default mysqladmin command
2018-09-24 10:15:49 -03:00
Carlos Salguero
964ed4c05c PT-1340 removed debug param from default mysqladmin command 2018-09-24 10:10:18 -03:00
Dmitriy Kostiuk
3e0490dd3a Update rn.3-0-12.txt 2018-09-13 18:46:08 +03:00
Carlos Salguero
e3a693afcf release-3.0.12 fixed release notes 2018-09-13 08:39:13 -03:00
Carlos Salguero
8fa2c63a5c Merge pull request #364 from hrvojem/pt-1613
Fixed PT-1613
2018-09-13 08:31:06 -03:00
hrvojem
c6451a11d2 Fixed PT-1613
Ported the content from the 3.x txt files to release_notes.rst
to make the build work again
2018-09-13 13:22:55 +02:00
hrvojem
41fdd9f46c Cleaned up release notes, and removed duplicate entries 2018-09-13 07:54:50 +02:00
Dmitriy Kostiuk
e623a91511 Update rn.3-0-12.txt 2018-09-11 23:19:51 +03:00
EvgeniyPatlan
2cb3533611 Build repcona-toolkit-3.0.12 2018-09-11 11:22:26 +00:00
Carlos Salguero
ffc0fd9ae2 RM-387 Updated version, changelog and release notes 2018-09-10 17:01:41 -03:00
Carlos Salguero
df20b8af28 PT 3.0.12 fixes tests 2018-09-10 16:31:01 -03:00
Carlos Salguero
11695b5b5c Merge pull request #362 from percona/PT-1611
PT-1611 pt-archiver support writing the output having utf-8 chars
2018-09-10 15:06:51 -03:00
Carlos Salguero
e5724f41cf PT-1611 pt-archiver support writing the output having utf-8 chars 2018-09-10 14:51:53 -03:00
Roma Novikov
43b313f3d5 Merge pull request #361 from fiowro/PT-1605-fix-3.0
PT-1605 doc follow-up enhancement
2018-09-10 19:44:00 +03:00
Dima
39aa83ffca PT-1605 doc follow-up enhancement 2018-09-08 01:19:56 +01:00
Dmitriy Kostiuk
aac8b6a85a Fix PT-1605, 3.0 version, documenting data collected... (#359)
* Fix PT-1605, 3.0 version, documenting data collected with --version-check

* Made text more general and less PT based
2018-08-30 23:30:10 +03:00
Carlos Salguero
f0539f7e34 Merge pull request #360 from fiowro/PT-1321-3.0
Fix PT-1321 documenting required MySQL privileges for pt-online-schem…
2018-08-29 12:38:19 -03:00
fiowro
e1548d953f Fix PT-1321 documenting required MySQL privileges for pt-online-schema-change 2018-08-29 11:46:16 +03:00
Carlos Salguero
672be1a2b2 Merge pull request #356 from percona/PT-1574
PT-1574 Improved detection of nullable keys
2018-08-13 12:45:35 -03:00
Carlos Salguero
022dc7377b Merge pull request #355 from percona/PT-1572
PT-1572 Better usage of ENUM fields in keys
2018-08-13 12:45:03 -03:00
Carlos Salguero
bc90a923b1 PT-1572 removed --force-concat-enums in pt-table-sync 2018-08-09 14:00:39 -03:00
Carlos Salguero
8c806df658 PT-1572 Fixed issue with --chunk-index-columns 2018-08-09 13:58:31 -03:00
Carlos Salguero
dc9edf7cda PT-1574 Fixed undefs handling 2018-08-07 14:21:44 -03:00
Carlos Salguero
b5a1775bad PT-1574 PT-1590 Fixed test 2018-08-07 09:40:05 -03:00
Carlos Salguero
7260bab2dc PT-1574 Added a test case 2018-08-07 01:03:58 -03:00
Carlos Salguero
83923a6ac3 Merge pull request #357 from percona/PT-1422
PT-1422 Improved MariaDB support in pt-mysql-summary
2018-08-06 16:18:05 -03:00
Carlos Salguero
287224d6de Merge pull request #343 from percona/additional_mongodb_versions
Update .travis.yml with current Go version
2018-07-31 12:41:35 -03:00
Roma Novikov
dcd83a3e57 Update .travis.yml 2018-07-30 21:27:52 +03:00
Carlos Salguero
d589034b31 PT-1422 Improved MariaDB support in pt-mysql-summary 2018-07-30 14:45:00 -03:00
Carlos Salguero
03ff3c314a PT-1572 Fixed MySQL 8 tests 2018-07-30 11:41:10 -03:00
Carlos Salguero
d2c4f57a52 PT-1572 Updated tests 2018-07-28 16:08:27 -03:00
Carlos Salguero
ea4886ad9d PT-1572 WIP 2018-07-27 22:16:02 -03:00
Carlos Salguero
2b45f192b0 PT-1574 Improved detection of nullable keys 2018-07-27 13:34:19 -03:00
borys-belinsky
909125faf9 Merge pull request #353 from borys-belinsky/release.3-0-11.release-notes
Change the implementation of release notes
2018-07-10 18:17:38 +03:00
Roma Novikov
6c4c30ce28 remove tip and 1.8 2018-07-10 18:13:07 +03:00
Borys Belinsky
2ec16a0ece Merge branch '3.0' into release.3-0-11.release-notes 2018-07-10 15:16:25 +03:00
Borys Belinsky
85dedaed92 Change release notes implementation 2018-07-10 14:05:02 +03:00
Carlos Salguero
6d9afc9507 Merge pull request #352 from percona/release-3.0.11
Release 3.0.11
2018-07-06 15:51:30 -03:00
Evgeniy Patlan
6e5c5c5e6d Build percon-toolkit-3.0.11 2018-07-06 15:09:17 +00:00
Carlos Salguero
7cea40255b Updated changelog 2018-07-06 11:09:48 -03:00
Carlos Salguero
d4d9d74543 Updated rn y changelog 2018-07-06 11:05:44 -03:00
Carlos Salguero
faad4f5445 Updated release_notes 2018-07-06 09:56:15 -03:00
Carlos Salguero
a584680406 Updated fix for PT-242 2018-07-06 09:39:15 -03:00
Carlos Salguero
a52a6438ce Updated travis.yml 2018-07-05 11:41:44 -03:00
Carlos Salguero
e4263ae173 Merge branch 'release-3.0.11' of percona.github.com:percona/percona-toolkit into release-3.0.11 2018-07-05 11:06:03 -03:00
Carlos Salguero
9b20208a78 Re-merged PT-242 2018-07-05 11:04:44 -03:00
Roma Novikov
19719a1c2c Merge pull request #350 from borys-belinsky/release-3.0.11
Update release notes fixing minor errors
2018-07-05 15:58:13 +03:00
Borys Belinsky
51b9c91a98 Change release notes based on feedback 2018-07-05 14:55:51 +03:00
guriandoro
8e90b31b3b PT-1534 Adding support for --version argument 2018-07-04 18:13:07 -04:00
Borys Belinsky
66277e6304 Update release notes fixing minor errors 2018-07-04 14:32:49 +03:00
guriandoro
57bb51f467 Changed pt-secure-data in readme file 2018-07-03 22:42:02 -04:00
guriandoro
d3644bd2e8 Refactored pt-secure-data to pt-secure-collect 2018-07-03 21:19:23 -04:00
guriandoro
9d8410c915 PT-1535 Changed tool name in --help output message 2018-07-03 20:53:18 -04:00
Evgeniy Patlan
f0981642e5 Build percona-toolkit-3.0.11 2018-07-03 12:57:01 +00:00
Carlos Salguero
fbf67524f0 Merge pull request #347 from borys-belinsky/release-3.0.11
Update release notes for 3.0.11
2018-07-03 09:35:00 -03:00
Borys Belinsky
d0bebbdc04 Update release notes for 3.0.11 2018-07-03 15:29:54 +03:00
Carlos Salguero
440194097e Updated changelog and release notes 2018-07-02 10:26:05 -03:00
Carlos Salguero
c221d10789 PT-1571 Improved hostname recognition regex 2018-07-02 09:53:58 -03:00
Carlos Salguero
53278a9d18 Fixed test for MySQL 5.6 2018-06-27 23:24:05 -03:00
Carlos Salguero
d1cc7bfee7 Fixed test for MySQL 5.6 2018-06-27 23:23:23 -03:00
Carlos Salguero
345b7c1d0a Fixed test for MySQL 5.6 2018-06-27 23:21:26 -03:00
Carlos Salguero
9ee287ffdb Updated sample files for table-checksum 5.7 2018-06-27 15:50:59 -03:00
Carlos Salguero
41df469802 Update changelog for 3.0.11 2018-06-26 16:32:42 -03:00
Carlos Salguero
d58d9e9fc4 Updated version to 3.0.11 (pre-release) 2018-06-25 12:34:35 -03:00
Carlos Salguero
9ac2445550 Merge pull request #346 from percona/PT-1554-more-MySQL8-tests
PT-1554 tests for MySQL 8
2018-06-22 17:07:15 -03:00
Carlos Salguero
6776631ec0 PT-1554 Fixed typo 2018-06-22 15:47:47 -03:00
Carlos Salguero
1b802d56df Merge branch '3.0' into PT-1554-more-MySQL8-tests 2018-06-22 14:56:39 -03:00
Carlos Salguero
4f017cc61a PT-1554 Fixed tests for MySQL 8 2018-06-22 14:56:02 -03:00
Carlos Salguero
d9142df0f6 PT-1551 New wait for master method to pt-table-checksum
This is part of PT-1554. While I was testing pt-table-checksum
ignore_columns.t was failing and it was because the original method in
pt-table-checksum to wait for the slaves to catch up, wasn't enough.
I added a new method who calls MySQL's SELECT MASTER_POS_WAIT from the
MasterSlave package.
2018-06-22 13:00:41 -03:00
Carlos Salguero
c1d0134525 PT-1554 Made tests for table checksum reliable under MySQL 8 2018-06-20 15:23:04 -03:00
Carlos Salguero
6d30d18834 PT-1554 Fixed tests for rebuild_constraints in MySQL 8 2018-06-20 12:12:28 -03:00
Carlos Salguero
2bb073e218 Updated TableParser in all programs 2018-06-15 00:00:42 -03:00
Carlos Salguero
a90e5a78a0 PT-1554 Improved MySQL 8 support on pt-osc 2018-06-15 00:00:04 -03:00
Carlos Salguero
14c1365a42 Merge branch '3.0' into PT-1554-more-MySQL8-tests 2018-06-14 14:37:35 -03:00
Carlos Salguero
82a3cda72d Merge pull request #345 from percona/PT-1570
PT-1570 pt-archiver fails to detect columns with the word GENERATED as part of the comment
2018-06-14 14:18:59 -03:00
Carlos Salguero
ed4268836f PT-1570 Removed debugging code 2018-06-14 14:17:30 -03: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
07a149f9a7 PT-1554 More tests fixed for pt-duplicate-key-checker 2018-06-14 11:05:32 -03:00
Carlos Salguero
5a47bac4d4 PT-1554 Fixed tests for duplicate key checker 2018-06-14 10:45:36 -03:00
Carlos Salguero
accdd7712b Merge pull request #344 from percona/PT-1554-MySQL8-tests
PT-1554 PT-1569 Fixed tests for MySQL 8
2018-06-13 16:49:43 -03:00
Carlos Salguero
f5fd795fda PT-1559 pt-osc --alter-foreign-keys-method=drop_swap doesn't work with MySQL 8.0+ 2018-06-13 16:46:40 -03:00
Carlos Salguero
588714cfad Updated Changelog for PT-241 & PT-242 2018-06-13 12:01:16 -03:00
Carlos Salguero
5188d6836f Merge branch '3.0' of percona.github.com:percona/percona-toolkit into 3.0 2018-06-13 11:56:21 -03:00
Carlos Salguero
5299572b31 Merge pull request #294 from altmannmarcelo/3.0
Adjusted 2 issues with slave_status
2018-06-13 11:55:58 -03:00
Carlos Salguero
0758e2c714 Revert "Merge branch '3.0' of https://github.com/altmannmarcelo/percona-toolkit into 3.0"
This reverts commit 82464dc256, reversing
changes made to 42b20e1ee0.
2018-06-13 11:48:57 -03:00
Carlos Salguero
82464dc256 Merge branch '3.0' of https://github.com/altmannmarcelo/percona-toolkit into 3.0 2018-06-13 11:48:08 -03:00
Carlos Salguero
f95d448e03 PT-1554 Updated pt-query-digest to use a proper checksum
Now, the checksum field is a CHAR(32) instead of a BIGINT.

Previously it was failing on some MySQL versions since the truncated int
it was storing is not consistent. Now, by having an MD5 stored as a
CHAR(32) the checksum is consistent across MySQL and OS versions.

This is a breaking change and pt-query-digest history and review tables
are not backwards compatible.
2018-06-13 11:25:47 -03:00
Carlos Salguero
81582f3ce3 PT-1554 Fixed test for pt-query-digest + MySQL 8 2018-06-01 09:35:09 -03:00
Carlos Salguero
9d02b690e0 PT-1154 Fixed /pt-duplicate-key-checker/basics.t for MySQL 8 2018-06-01 09:32:26 -03:00
Roma Novikov
aa82c9c318 Update .travis.yml 2018-05-31 17:04:05 +03:00
Carlos Salguero
42b20e1ee0 Merge branch 'PT-1554_tests_for_ubuntu14' into 3.0 2018-05-31 10:57:30 -03:00
Carlos Salguero
97cdc1d14d PT-1554 Fixes for Ubuntu 14.04 tests 2018-05-31 10:57:00 -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
0004bb7bbc PT-1554 (WIP) Tests for MySQL 8
There are tests failing but the sandbox doesn't crash
2018-05-30 21:25:28 -03:00
Carlos Salguero
b801dfa156 PT-1554 Fixed 2 tests for MySQL 5.7 2018-05-30 09:09:42 -03:00
Carlos Salguero
1a4c471a46 PT-1554 Fixed unstable test alter_active_table.t 2018-05-30 02:01:27 -03:00
Carlos Salguero
d62c2d0692 Merge pull request #341 from percona/PT-1554-ps5.6
PT-1554 Updated tests for MySQL 5.6
2018-05-30 00:32:55 -03:00
Carlos Salguero
47fe4379fa PT-1554 Fixed tests for slave-delay & 5.6 2018-05-30 00:32:06 -03:00
Carlos Salguero
4bfca1ac00 PT-1554 Fixed digest tests for 5.6 2018-05-30 00:28:46 -03:00
Carlos Salguero
f4e7230bbd PT-1554 fixed sandbox script for gtid with 5.6 2018-05-30 00:26:20 -03:00
Carlos Salguero
af62172435 PT-1554 Fixed test for pt-244 (change data dir) 2018-05-29 19:57:08 -03:00
Carlos Salguero
08b00e7fab PT-1554 Fix to run tests in a tmpfs 2018-05-29 18:07:05 -03:00
Carlos Salguero
6e9828795d Merge branch '3.0' into PT-1554-ps5.6 2018-05-29 17:48:53 -03:00
Carlos Salguero
6a39b12f4e PT-1554 Test for 5.6 2018-05-29 17:41:37 -03:00
Carlos Salguero
d3685c1ca8 Merge pull request #340 from tplavcic/jenkins-report
Update prove2junit.pl to group tests into testsuites in jenkins
2018-05-29 12:30:10 -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
123a599d3e Merge pull request #339 from percona/PT-1563
PT-1563 Fixed pt-show-grants for MySQL 5.6
2018-05-28 15:32:13 -03:00
Carlos Salguero
77afc948fc PT-1563 Updated changelog 2018-05-28 15:31:40 -03:00
Carlos Salguero
7666af3fbb PT-1563 Fixed pt-show-grants for MySQL 5.6
Also updated tests for MySQL 8.0+
2018-05-28 15:29:18 -03:00
Carlos Salguero
b2decb0f82 Merge branch '3.0' of percona.github.com:percona/percona-toolkit into 3.0 2018-05-28 12:49:23 -03:00
Carlos Salguero
a4293bbe9e Updated changelog 2018-05-28 12:49:06 -03:00
Carlos Salguero
eb689ef253 Merge pull request #338 from percona/PT-1554-ps-5.7
PT-1554 Fixed tests for Percona Server 5.7
2018-05-28 12:48:31 -03:00
Carlos Salguero
88ae2c3783 Merge pull request #337 from percona/fix_CMD_MYSQL_and_CMD_MYSQLDUMP
PMM-2569: Fix passing CMD_MYSQL and CMD_MYSQLDUMP.
2018-05-28 12:37:07 -03:00
Carlos Salguero
f3bca3af41 PT-1554 Fixed library report_mysql_info 2018-05-28 12:07:03 -03:00
Kamil Dziedzic
f5ed3d987c PMM-2569: Fix passing CMD_MYSQL and CMD_MYSQLDUMP. 2018-05-28 14:10:04 +02:00
Carlos Salguero
cb5e0077fd PT-1554 Trying to debug to find why t/pt-table-checksum/pt-136.t fails on docker 2018-05-26 21:58:28 -03:00
Carlos Salguero
abd84d03a8 PT-1554 Trying to debug to find why t/pt-table-checksum/pt-136.t fails on docker 2018-05-26 19:52:12 -03:00
Carlos Salguero
0be68be892 PT-1554 Test a fix for pt-136 & ps 5.7 2018-05-26 17:36:06 -03:00
Carlos Salguero
445d38f359 PT-1554 Test a fix for pt-136 & ps 5.7 2018-05-26 17:10:14 -03:00
Carlos Salguero
b9b152a395 PT-1554 Tests for ps 5.7 2018-05-26 15:07:38 -03:00
Carlos Salguero
b79a6c621b Merge pull request #336 from percona/PT-1554-ubuntu-16.04
PT-1554 Fixed tests for Ubuntu 16.04
2018-05-25 16:35:27 -03:00
Carlos Salguero
5afd9615de PT-1554 Updated test for pt-upgrade/save_results 2018-05-25 15:21:50 -03:00
Carlos Salguero
4c4ba955b7 PT-1554 Updated test for pt-upgrade/save_results 2018-05-25 15:15:43 -03:00
Carlos Salguero
6a4c4508d4 PT-1554 Fixed tests for pt-upgrade 2018-05-24 23:10:53 -03:00
Carlos Salguero
b345824169 PT-1554 Updated all tests for query-digest checksums 2018-05-24 20:29:11 -03:00
Carlos Salguero
e2cf183762 PT-1554 Updated pt-table-checksum var type
In different OSes, using BIGINT to store the checksum for a query, will
produce collisions and/or unstable values.
Because of this, I changed the type for the checksum field in the history
table from BIGINT to CHAR(32) and the checksum function is no longer
truncating the MD5_HEX result to 16 chars.
2018-05-24 15:57:21 -03:00
Carlos Salguero
b6040629cd PT-1554 Test a fix for query-digest checksums 2018-05-24 15:50:22 -03:00
Carlos Salguero
285588546d PT-1554 Test a fix for query-digest checksums 2018-05-24 15:46:46 -03:00
Carlos Salguero
2493c2485f PT-1554 Fix query digest history checksum 2018-05-24 15:02:12 -03:00
Carlos Salguero
dc5491e13e PT-1554 Tests query digest history 2018-05-24 14:36:36 -03:00
Carlos Salguero
b1663d0f20 PT-1554 Tests query digest history 2018-05-24 14:21:35 -03:00
Carlos Salguero
09cd07f58e PT-1554 Make QueryFormater consistent
In some OSes/Perl versions, the 'filtered' row is being printed with or
without decimals.
For example, in Ubuntu 16.04/Perl 5.22 it is 100.00 while in Ubuntu
18.04/Perl 5.26 it is 100.
To make it consistent for tests, add a default formating string for the
filtered row.
2018-05-23 15:28:28 -03:00
Carlos Salguero
cbe2333e92 PT-1554 Test fixes for QueryReportFormatter 2018-05-23 11:32:03 -03:00
Carlos Salguero
f0c947d9cf PT-1554 Test fixes for pt-archiver 2018-05-23 10:59:50 -03:00
Carlos Salguero
6679596b3b PT-1554 4th attempt to fix ExplainAnalyzer.t 2018-05-22 15:26:56 -03:00
Carlos Salguero
b547b7c21c PT-1554 3rd attempt to fix ExplainAnalyzer.t 2018-05-22 15:25:33 -03:00
Carlos Salguero
9d1c67613b PT-1554 2nd attempt to fix ExplainAnalyzer.t 2018-05-22 15:20:06 -03:00
Carlos Salguero
f9f05b7289 PT-1554 Test fixes for ExplainAnalyzer.t 2018-05-22 15:11:30 -03:00
Carlos Salguero
b9447bf8c5 Merge pull request #333 from percona/release-3.0.10
RM-358 Release branch for 3.0.10
2018-05-22 14:21:55 -03:00
Evgeniy Patlan
a4db86e026 Build percona-toolkit-3.0.10 2018-05-21 17:38:57 +00:00
Carlos Salguero
0e7fc6d159 Merge pull request #335 from borys-belinsky/release-3.0.10
Update the release notes
2018-05-21 12:24:21 -03:00
Borys Belinsky
c2fd796654 Remove the date from the version heading 2018-05-21 18:15:37 +03:00
Borys Belinsky
910c2f0f3f Update the release notes 2018-05-21 17:06:30 +03:00
Marcelo Altmann
df7744e4b1 include SHOW SLAVE STATUS on 5.7 version PT-242 2018-01-05 17:55:06 -05:00
Marcelo Altmann
feb15958db fixed missing fully qualified database name on slave_status PT-241 2018-01-05 17:34:32 -05:00
252 changed files with 26133 additions and 41010 deletions

View File

@@ -2,6 +2,7 @@ language: go
go:
- 1.9.x
- 1.10.x
services:
- docker
@@ -15,13 +16,6 @@ env:
- MONGODB_IMAGE=percona/percona-server-mongodb:3.2
- MONGODB_IMAGE=percona/percona-server-mongodb:3.4
matrix:
include:
- go: 1.8.x
env:
- go: tip
env:
install:
- go get -u github.com/golang/dep/cmd/dep
@@ -39,6 +33,9 @@ before_script:
script:
- go test -timeout 1m ./src/...
allow_failures:
- tip
notifications:
email: false
slack:

View File

@@ -1,6 +1,23 @@
Changelog for Percona Toolkit
v3.0.10
* Fixed bug PT-1611: pt-archiver fails with UTF-8 chars
* Fixed bug PT-1574: pt-online-schema-change fails on UK and NULLs
* Fixed bug PT-1572: Better usage of ENUM fields in keys in NibbleIterator
* Fixed bug PT-1422: pt-mysql-summary may get stuck when Time: NULL in processlist
* Improvement PT-1321: Add required MySQL privileges to pt-online-schema-change documentation
v3.0.11 released 2018-07-06
* Improvement PT-1571 : Improved hostname recognition in pt-secure-collect
* Fixed bug PT-1570 : pt-archiver fails to detect columns with the word GENERATED as part of the comment
* Improvement PT-1569 : Disabled --alter-foreign-keys-method=drop_swap in pt-osc
* Fixed bug PT-1563 : Fixed pt-show-grants for MySQL 5.6
* Improvement PT-1562 : pt-mysql-summary: Fix mysqld command for Travis
* Fixed bug PT-1551 : pt-table-checksum fails on MySQL 8.0.11
* Improvement PT-242 : (pt-stalk) Include SHOW SLAVE STATUS on 5.7 (Thanks Marcelo Altmann)
* Fixed bug PT-241 : (pt-stalk) Slave queries doesn't run on 5.7 (Thanks Marcelo Altmann)
v3.0.10 released 2018-05-21
* Fixed bug PT-1556 : pt-table-checksum 3.0.9 doesn't change binlog_format to statement anymore
* Improvement PT-1546 : Improved support of MySQL 8 roles

View File

@@ -2,7 +2,7 @@ use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'percona-toolkit',
VERSION => '3.0.9',
VERSION => '3.0.12',
EXE_FILES => [ <bin/*> ],
MAN1PODS => {
'docs/percona-toolkit.pod' => 'blib/man1/percona-toolkit.1p',

View File

@@ -1359,6 +1359,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-align 3.0.9
pt-align 3.0.12
=cut

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1648,6 +1648,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-fifo-split 3.0.9
pt-fifo-split 3.0.12
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -2239,6 +2239,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-fingerprint 3.0.9
pt-fingerprint 3.0.12
=cut

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1127,7 +1127,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-ioprofile 3.0.9
pt-ioprofile 3.0.12
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -804,7 +804,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-mext 3.0.9
pt-mext 3.0.12
=cut

View File

@@ -827,7 +827,7 @@ setup_data_dir () {
get_var () {
local varname="$1"
local file="$2"
awk -v pattern="${varname}" '$1 == pattern { if (length($2)) { len = length($1); print substr($0, len+index(substr($0, len+1), $2)) } }' "${file}"
awk -v pattern="${varname}" '$1 == pattern { if (length($2)) { len = length($1); print substr($0, len+index(substr($0, len+1), $2)) } }' "${file}" | tr -d '\r'
}
# ###########################################################################
@@ -1366,6 +1366,9 @@ summarize_processlist () {
}
\$1 == \"Time:\" {
t = \$2;
if ( t == \"NULL\" ) {
t = 0;
}
}
\$1 == \"Command:\" {
c = \$2;
@@ -2265,7 +2268,7 @@ report_jemalloc_enabled() {
local GENERAL_JEMALLOC_STATUS=0
local JEMALLOC_LOCATION=''
for PID in $(pidof mysqld); do
for pid in $(pidof mysqld); do
grep -qc jemalloc /proc/${pid}/environ || ldd $(which mysqld) 2>/dev/null | grep -qc jemalloc
jemalloc_status=$?
if [ $jemalloc_status = 1 ]; then
@@ -2580,14 +2583,14 @@ check_mysql () {
# Check that mysql and mysqldump are in PATH. If not, we're
# already dead in the water, so don't bother with cmd line opts,
# just error and exit.
[ -n "$(mysql --help 2>/dev/null)" ] \
[ -n "$(${CMD_MYSQL} --help 2>/dev/null)" ] \
|| die "Cannot execute mysql. Check that it is in PATH."
[ -n "$(mysqldump --help 2>/dev/null)" ] \
[ -n "$(${CMD_MYSQLDUMP} --help 2>/dev/null)" ] \
|| die "Cannot execute mysqldump. Check that it is in PATH."
# Now that we have the cmd line opts, check that we can actually
# connect to MySQL.
[ -n "$(mysql $EXT_ARGV -e 'SHOW STATUS')" ] \
[ -n "$(${CMD_MYSQL} ${EXT_ARGV} -e 'SHOW STATUS')" ] \
|| die "Cannot connect to MySQL. Check that MySQL is running and that the options after -- are correct."
}
@@ -3287,7 +3290,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-mysql-summary 3.0.9
pt-mysql-summary 3.0.12
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -897,7 +897,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-pmp 3.0.9
pt-pmp 3.0.12
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -1912,11 +1912,14 @@ sub main {
# MySQL 8 roles must be excluded from the regular users list.
# Roles can be identified because the user password is expired, the authentication
# string is empty and the account is locked
my $mysql8_where = '';
if (VersionCompare::cmp($version, '8.0.0') >= 0) {
$mysql8_where = ' WHERE NOT ( `account_locked`="Y" AND ' .
' `password_expired`="Y" AND ' .
' `authentication_string`="" ) ';
}
my $users = $o->get('only') || $dbh->selectall_arrayref(
'SELECT DISTINCT User, Host FROM mysql.user WHERE NOT (`account_locked`="Y"
AND `password_expired`="Y"
AND `authentication_string`=""
) ORDER BY User, Host',
"SELECT DISTINCT User, Host FROM mysql.user $mysql8_where ORDER BY User, Host",
{ Slice => {} });
if ( scalar @all_hosts ) {
my $where = join(' OR ', map { "User='$_'" } @all_hosts);
@@ -2588,6 +2591,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-show-grants 3.0.9
pt-show-grants 3.0.12
=cut

View File

@@ -1245,7 +1245,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-sift 3.0.9
pt-sift 3.0.12
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -4482,6 +4482,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-slave-find 3.0.9
pt-slave-find 3.0.12
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -833,7 +833,7 @@ collect() {
tail -f "$mysql_error_log" >"$d/$p-log_error" &
tail_error_log_pid=$!
$CMD_MYSQLADMIN $EXT_ARGV debug
$CMD_MYSQLADMIN $EXT_ARGV
else
log "Could not find the MySQL error log"
fi
@@ -916,7 +916,7 @@ collect() {
local ps_instrumentation_enabled=$($CMD_MYSQL $EXT_ARGV -e 'SELECT ENABLED FROM performance_schema.setup_instruments WHERE NAME = "transaction";' \
| sed "2q;d" | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/')
if [ $ps_instrumentation_enabled != "yes" ]; then
if [ !$ps_instrumentation_enabled = "yes" ]; then
log "Performance Schema instrumentation is disabled"
fi
@@ -1162,26 +1162,25 @@ slave_status() {
local outfile=$1
local mysql_version=$2
if [ "${mysql_version}" '<' "5.7" ]; then
local sql="SHOW SLAVE STATUS\G"
echo -e "\n$sql\n" >> $outfile
$CMD_MYSQL $EXT_ARGV -e "$sql" >> $outfile
else
local sql="SHOW SLAVE STATUS\G"
echo -e "\n$sql\n" >> $outfile
$CMD_MYSQL $EXT_ARGV -e "$sql" >> $outfile
if [ "${mysql_version}" '>' "5.6" ]; then
local sql="SELECT * FROM performance_schema.replication_connection_configuration JOIN performance_schema.replication_applier_configuration USING(channel_name)\G"
echo -e "\n$sql\n" >> $outfile
$CMD_MYSQL $EXT_ARGV -e "$sql" >> $outfile
sql="SELECT * FROM replication_connection_status\G"
sql="SELECT * FROM performance_schema.replication_connection_status\G"
echo -e "\n$sql\n" >> $outfile
$CMD_MYSQL $EXT_ARGV -e "$sql" >> $outfile
sql="SELECT * FROM replication_applier_status JOIN replication_applier_status_by_coordinator USING(channel_name)\G"
sql="SELECT * FROM performance_schema.replication_applier_status JOIN performance_schema.replication_applier_status_by_coordinator USING(channel_name)\G"
echo -e "\n$sql\n" >> $outfile
$CMD_MYSQL $EXT_ARGV -e "$sql" >> $outfile
fi
}
collect_mysql_variables() {
local outfile=$1
@@ -2283,6 +2282,10 @@ of editing the source, you can call pt-stalk as
which will do exactly what you need. Combined with the plugin hooks, this
gives you a fine-grained control of what the tool does.
It is possible to enable C<debug> mode in mysqladmin specifying:
C<CMD_MYSQLADMIN='mysqladmin debug' pt-stalk params ...>
=head1 SYSTEM REQUIREMENTS
This tool requires Bash v3 or newer. Certain options require other programs:
@@ -2376,7 +2379,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-stalk 3.0.9
pt-stalk 3.0.12
=cut

View File

@@ -2723,7 +2723,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-summary 3.0.9
pt-summary 3.0.12
=cut

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -6850,7 +6850,7 @@ sub remove_quoted_text {
my ($string) = @_;
$string =~ s/[^\\]`[^`]*[^\\]`//g;
$string =~ s/[^\\]"[^"]*[^\\]"//g;
$string =~ s/[^\\]"[^"]*[^\\]"//g;
$string =~ s/[^\\]'[^']*[^\\]'//g;
return $string;
}
@@ -8487,6 +8487,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-table-usage 3.0.9
pt-table-usage 3.0.12
=cut

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -3281,6 +3281,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-visual-explain 3.0.9
pt-visual-explain 3.0.12
=cut

View File

@@ -1,3 +1,45 @@
percona-toolkit (3.0.12-1) unstable; urgency=low
* Fixed bug PT-1611: pt-archiver fails with UTF-8 chars
* Fixed bug PT-1603: pt-table-sync is not considering unsorted enum fields in indexes for calculating chunk boundaries
* Fixed bug PT-1574: pt-online-schema-change fails on UK and NULLs
* Fixed bug PT-1572: Better usage of ENUM fields in keys in NibbleIterator
* Fixed bug PT-1422: pt-mysql-summary may get stuck when Time: NULL in processlist
* Improvement PT-1321: Add required MySQL privileges to pt-online-schema-change documentation
-- Percona Toolkit Developers <toolkit-dev@percona.com> Tue, 11 Sep 2018 11:20:08 +0000
percona-toolkit (3.0.11-1) unstable; urgency=low
* Improvement PT-1571 : Improved hostname recognition in pt-secure-collect
* Fixed bug PT-1570 : pt-archiver fails to detect columns with the word GENERATED as part of the comment
* Improvement PT-1569 : Disabled --alter-foreign-keys-method=drop_swap in pt-osc
* Fixed bug PT-1563 : Fixed pt-show-grants for MySQL 5.6
* Improvement PT-1562 : pt-mysql-summary: Fix mysqld command for Travis
* Fixed bug PT-1551 : pt-table-checksum fails on MySQL 8.0.11
* Improvement PT-242 : (pt-stalk) Include SHOW SLAVE STATUS on 5.7 (Thanks Marcelo Altmann)
* Fixed bug PT-241 : (pt-stalk) Slave queries doesn't run on 5.7 (Thanks Marcelo Altmann)
-- Percona Toolkit Developers <toolkit-dev@percona.com> Fri, 06 Jul 2018 15:07:41 +0000
percona-toolkit (3.0.11-1) unstable; urgency=low
* Improvement PT-1571 : Improved hostname recognition in pt-secure-collect
* Fixed bug PT-1570 : pt-archiver fails to detect columns with the word GENERATED as part of the comment
* Improvement PT-1569 : Disabled --alter-foreign-keys-method=drop_swap in pt-osc
* Fixed bug PT-1563 : Fixed pt-show-grants for MySQL 5.6
* Improvement PT-1562 : pt-mysql-summary: Fix mysqld command for Travis
* Fixed bug PT-1551 : pt-table-checksum fails on MySQL 8.0.11
* Improvement PT-242 : (pt-stalk) Include SHOW SLAVE STATUS on 5.7 (Thanks Marcelo Altmann)
* Fixed bug PT-241 : (pt-stalk) Slave queries doesn't run on 5.7 (Thanks Marcelo Altmann)
-- Percona Toolkit Developers <toolkit-dev@percona.com> Tue, 03 Jul 2018 12:54:53 +0000
percona-toolkit (3.0.10-1) unstable; urgency=low
-- Percona Toolkit Developers <toolkit-dev@percona.com> Mon, 21 May 2018 17:36:10 +0000
percona-toolkit (3.0.9-1) unstable; urgency=low

View File

@@ -50,7 +50,7 @@ copyright = u'2017, Percona LLC and/or its affiliates'
# The short X.Y version.
version = '3.0'
# The full version, including alpha/beta/rc tags.
release = '3.0.9'
release = '3.0.12'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@@ -46,6 +46,7 @@ Configuration
.. toctree::
:maxdepth: 1
version-check
configuration_files
dsn_data_source_name_specifications
environment

View File

@@ -102,10 +102,6 @@ Aggregate GDB stack traces for a selected program.
Analyze MySQL queries from logs, processlist, and tcpdump.
=item pt-secure-collect
Collect, sanitize, pack and encrypt pt-tools outputs.
=item pt-show-grants
Canonicalize and print MySQL grants so you can effectively replicate, compare and version-control them.
@@ -564,6 +560,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
Percona Toolkit v3.0.9 released 2018-04-17
Percona Toolkit v3.0.12 released 2018-09-11
=cut

File diff suppressed because it is too large Load Diff

26
docs/rn.3-0-1.txt Normal file
View File

@@ -0,0 +1,26 @@
v3.0.1 released 2017-02-20
==========================
Percona Toolkit 3.0.1 GA includes the following changes:
* Added requirement to run ``pt-mongodb-summary`` as a user with the ``clusterAdmin`` or ``root`` built-in roles.
v3.0 released 2017-02-06
========================
Percona Toolkit 3.0.0 RC includes the following changes:
New Features
* Added ``pt-mongodb-summary`` tool
* Added ``pt-mongodb-query-digest`` tool
Bug fixes
* 1402776: Updated ``MySQLProtocolParser`` to fix error when parsing ``tcpdump`` capture with ``pt-query-digest``
* 1632522: Fixed failure of ``pt-online-schema-change`` when altering a table with a self-referencing foreign key (Thanks Amiel Marqeta)
* 1654668: Fixed failure of ``pt-summary`` on Red Hat and derivatives (Thanks Marcelo Altmann)

19
docs/rn.3-0-10.txt Normal file
View File

@@ -0,0 +1,19 @@
v3.0.10 released 2018-05-21
===========================
New Features
* :jirabug:`PT-131`: ``pt-table-checksum`` disables the QRT plugin
* :jirabug:`PT-118`: ``pt-table-checksum`` report the number of rows
of difference between master and slave.
Improvements
* :jirabug:`PT-1546`: Improved support of MySQL 8 roles
* :jirabug:`PT-1543`: The encrypted table status query causes high load over multiple minutes
* :jirabug:`PT-1536`: Added info about encrypted tablespaces in ``pt-mysql-summary``
Bug Fixes
* :jirabug:`PT-1556`: ``pt-table-checksum`` 3.0.9 does not change ``binlog_format`` to statement any more.

30
docs/rn.3-0-11.txt Normal file
View File

@@ -0,0 +1,30 @@
v3.0.11 released 2018-07-06
===========================
New features
* :jirabug:`PT-1571`: Improved hostname recognition in ``pt-secure-collect``
* :jirabug:`PT-1569`: Disabled ``--alter-foreign-keys-method=drop_swap`` in ``pt-online-schema-change``
* :jirabug:`PT-242`: (``pt-stalk``) Include ``SHOW SLAVE STATUS`` on MySQL 5.7 (Thanks `Marcelo Altmann <https://www.percona.com/blog/author/marcelo-altmann/>`_)
Fixed bugs
* :jirabug:`PT-1570`: ``pt-archiver`` fails to detect columns with the word *GENERATED* as part of the comment
* :jirabug:`PT-1563`: ``pt-show-grants`` fails for MySQL 5.6 producing an error which reports that an unknown column **account_locked** has been detected.
* :jirabug:`PT-1551`: ``pt-table-checksum`` fails on MySQL 8.0.11
* :jirabug:`PT-241`: (``pt-stalk``) Slave queries don\'t run on MySQL 5.7 because the FQDN is missing (Thanks `Marcelo Altmann <https://www.percona.com/blog/author/marcelo-altmann/>`_)
Breaking changes:
Starting with this version, the queries checksum in ``pt-query-digest`` will
store the full MD5 field as a CHAR(32) field instead of storing just the least
significant bytes of the checksum as a BIGINT field. The reason for this
change is that storing only the least significant bytes as a BIGINT was
producing inconsistent results in MySQL 8 compared to MySQL 5.6+.
``pt-online-schema-change`` in MySQL 8:
Due to a `bug in MySQL 8.0+ <https://bugs.mysql.com/bug.php?id=89441>`_, it
is not possible to use the ``drop_swap`` method to rebuild constraints because
renaming a table will result in losing the foreign keys. You must specify a
different method explicitly.

18
docs/rn.3-0-12.txt Normal file
View File

@@ -0,0 +1,18 @@
Fixed bugs
* :jirabug:`PT-1611`: ``pt-archiver`` failed to output UTF-8 characters.
* :jirabug:`PT-1574`: ``pt-online-schema-change`` failed on tables with a nullable unique key and a row with NULL values.
* :jirabug:`PT-1572`: ENUM fields usage in keys was improved, resulting in higher speed for expressions with sorted ENUM items.
* :jirabug:`PT-1422`: ``pt-mysql-summary`` could hang when NULL values appear in the processlist Time column.
Documentation changes
* :jirabug:`PT-1321`: The required MySQL privileges were detailed in `pt-online-schema-change`` documentation
Changelog
---------
* Fixed bug PT-1611: pt-archiver fails with UTF-8 chars
* Fixed bug PT-1574: pt-online-schema-change fails on UK and NULLs
* Fixed bug PT-1572: Better usage of ENUM fields in keys in NibbleIterator
* Fixed bug PT-1422: pt-mysql-summary may get stuck when Time: NULL in processlist
* Improvement PT-1321: Add required MySQL privileges to pt-online-schema-change documentation

31
docs/rn.3-0-2.txt Normal file
View File

@@ -0,0 +1,31 @@
v3.0.2 released 2017-03-27
==========================
Percona Toolkit 3.0.2 includes the following changes:
New Features
* PT-73: Added support for SSL connections to ``pt-mongodb-summary`` and ``pt-mongodb-query-digest``
* 1642751: Enabled gathering of information about locks and transactions by ``pt-stalk`` using Performance Schema if it is enabled (Thanks Agustin Gallego)
Bug Fixes
* PT-74: Fixed gathering of security settings when running ``pt-mongodb-summary`` on a mongod instance that is specified as the host
* PT-75: Changed the default sort order in ``pt-mongodb-query-digest`` output to descending
* PT-76: Added support of ``&`` and ``#`` symbols in passwords for ``pt-mysql-summary``
* PT-77: Updated ``Makefile`` to support new MongoDB tools
* PT-89: Fixed ``pt-stalk`` to run ``top`` more than once to collect useful CPU usage
* PT-93: Fixed ``pt-mongodb-query-digest`` to make query ID match query key (Thanks Kamil Dziedzic)
* PT-94: Fixed ``pt-online-schema-change`` to not make duplicate rows in ``_t_new`` when updating primary key. Also see 1646713.
* PT-101: Fixed ``pt-table-checksum`` to correctly use the ``--slave-user`` and ``--slave-password`` options. Also see 1651002.
* PT-105: Fixed ``pt-table-checksum`` to continue running if a database is dropped in the process

29
docs/rn.3-0-3.txt Normal file
View File

@@ -0,0 +1,29 @@
v3.0.3 released 2017-05-18
==========================
Percona Toolkit 3.0.3 includes the following changes:
New Features
* Added the ``--skip-check-slave-lag`` option for ``pt-table-checksum``, ``pt-online-schema-change``, and ``pt-archiver``.
This option can be used to specify list of servers where to skip checking for slave lag.
* 1642754: Added support for collecting replication slave information in ``pt-stalk``.
* PT-111: Added support for collecting information about variables from Performance Schema in ``pt-stalk``. For more information, see 1642753.
* PT-116: Added the ``--[no]use-insert-ignore`` option for ``pt-online-schema-change`` to force or prevent using ``IGNORE`` on ``INSERT`` statements. For more information, see 1545129.
Bug Fixes
* PT-115: Fixed ``OptionParser`` to accept repeatable DSNs.
* PT-126: Fixed ``pt-online-schema-change`` to correctly parse comments. For more information, see 1592072.
* PT-128: Fixed ``pt-stalk`` to include memory usage information. For more information, see 1510809.
* PT-130: Fixed ``pt-mext`` to work with non-empty RSA public key. For more information, see 1587404.
* PT-132: Fixed ``pt-online-schema-change`` to enable ``--no-drop-new-table`` when ``--no-swap-tables`` and ``--no-drop-triggers`` are used.

81
docs/rn.3-0-4.txt Normal file
View File

@@ -0,0 +1,81 @@
v3.0.4 released 2017-08-02
==========================
Percona Toolkit 3.0.4 includes the following changes:
New Features
* :jirabug:`PT-90`: Added collection of information about prepared statements
by ``pt-stalk`` when Performance Schema is enabled.
For more information, see :lpbug:`1642750`.
* :jirabug:`PT-91`: Added the ``--preserve-triggers`` option
for ``pt-online-schema-change`` to support ``AFTER`` triggers.
* :jirabug:`PT-138`: Added ``--output-format`` option
for ``pt-mongodb-summary`` to choose between JSON format
and the default plain text.
* :jirabug:`PT-141`: Added the ``--output-format=csv`` parameter
for ``pt-archiver`` to archive rows in CSV format.
* :jirabug:`PT-142`: Added the ``--only-same-schema-fks`` option
for ``pt-online-schema-change`` to check foreigns keys only on tables
with the same schema as the original table.
This should speed up the tool's execution,
but keep in mind that if you have foreign keys
referencing tables in other schemas,
they won't be detected.
For more information, see :lpbug:`1690122`.
* :jirabug:`PT-153`: Added the ``--check-unique-key-change`` option
for ``pt-online-schema-change`` to abort
if the specified statement for ``--alter`` is trying to add a unique index.
This is supposed to avoid adding duplicate keys
that might lead to silently losing data.
* :jirabug:`PT-173`: Added the ``--truncate-replicate-table`` option
for ``pt-table-checksum`` to ensure stale data is removed.
Bug fixes
* :jirabug:`PT-136`: Fixed ``pt-table-checksum`` to support tables
that have columns with different collations or charsets.
For more information, see :lpbug:`1674266`.
* :jirabug:`PT-143`: Fixed primary key handling by ``pt-archiver``.
For more information, see :lpbug:`1691630`.
* :jirabug:`PT-144`: Limited constraint name in the new table
when running ``pt-online-schema-change``.
For more information, see :lpbug:`1491674`.
* :jirabug:`PT-146`: Fixed the ``--no-check-binlog-format`` option
for ``pt-table-checksum`` to work as expected.
* :jirabug:`PT-148`: Fixed the use of uninitialized value in ``printf()``
for ``pt-online-schema-change``.
For more information, see :lpbug:`1693614`.
* :jirabug:`PT-151`: Fixed ``pt-table-sync`` to prevent field type ``point``
to be taken as decimal.
* :jirabug:`PT-154`: Reverted :jirabug:`PT-116`
to remove the ``--use-insert-ignore`` option
from ``pt-online-schema-change``.
* :jirabug:`PT-161`: Fixed the ``--skip-check-slave-lag`` feature
for ``pt-table-checksum`` to safely check for undefined values.
* :jirabug:`PT-178`: Fixed regression in ``--check-slave-lag`` option
for ``pt-online-schema-change``.
* :jirabug:`PT-180`: Fixed regression in ``--skip-check-slave-lag`` option
for ``pt-online-schema-change``.
* :jirabug:`PT-181`: Fixed syntax error in ``pt-online-schema-change``.
Other Improvements
* :jirabug:`PT-162`: Updated list of tables ignored by ``pt-table-checksum``.

28
docs/rn.3-0-5.txt Normal file
View File

@@ -0,0 +1,28 @@
v3.0.5 released 2017-11-20
==========================
Percona Toolkit 3.0.5 includes the following changes:
New Features
* :jirabug:`PMM-1590`: Improve MongoDB Profiler for ``PMM`` and ``PT``
* :jirabug:`PT-216`: The ``mongodb-query-digest`` supports ``MongoDB`` versions lower than 3.2; incorrect output was fixed.
* :jirabug:`PT-182`: The ``pt-summary``, ``pt-mysql-summary``, ``pt-mongodb-summary`` commands provide output in the the JSON format.
* :jirabug:`PT-152`: ``pt-mysql-summary`` shows the output of the *Show Slave Hosts* command.
* :jirabug:`PT-139`: ``pt-table-sync`` supports replication channels (requires MySQL version 5.7.6 or higher)
Bug fixes
* :jirabug:`PT-211`: ``pt-mext`` fails if the ``Rsa_public_key`` variable is empty.
* :jirabug:`PT-212`: ``pt-mongodb-query-digest --version`` produced incorrect values.
* :jirabug:`PT-202`: ``pt-online-schema-change`` incorrectly processed virtual columns.
* :jirabug:`PT-200`: ``pt-online-schema-change`` command reported an error when the name of an index contained 'unique' as as the prefix or suffix.
* :jirabug:`PT-199`: ``pt-table-checksum`` did not detect differences on a system with the ROW based replication active.
* :jirabug:`PT-196`: ``pt-onine-schema-change --max-load`` paused if a status variable was passed **0** as the value.
* :jirabug:`PT-193`: ``pt-table-checksum`` reported a misleading error if a column comment contained an apostrophe. For more information, see :lpbug:`1708749`.
* :jirabug:`PT-187`: In some cases, ``pt-table-checksum`` did not report that the same table contained different values on the master and slave.
* :jirabug:`PT-186`: ``pt-online-schema-change --alter`` could fail if field names contained upper case characters. For more information, see :lpbug:`1705998`.
* :jirabug:`PT-183`: In some cases ``pt-mongodb-query-digest`` could not connect to a db using authentication.
* :jirabug:`PT-167`: In some cases, ``pt-kill`` could ignore the value of the ``--busy-time`` parameter. For more information, see :lpbug:`1016272`.
* :jirabug:`PT-161`: When run with the ``--skip-check-slave-lag``, the ``pt-table-checksum`` could fail in some cases.

25
docs/rn.3-0-6.txt Normal file
View File

@@ -0,0 +1,25 @@
v3.0.6 released 2018-01-04
==========================
Percona Toolkit 3.0.6 includes the following changes:
New Features
* :jirabug:`PT-221`: Improve ``pt-table-sync`` support for ``MyRocks``
* :jirabug:`PT-218`: ``pt-stalk`` now checks the ``RocksDB`` status
* :jirabug:`PT-214`: ``pt-mysql-summary`` contains the ``RocksDB`` section
* :jirabug:`PT-205`: ``pt-osc`` shows a message if trying to set the engine to
``rocksdb`` and ``binlog_format != row``.
* :jirabug:`PT-204`: ``pt-table-checksum`` skips ``RocksDB`` tables.
Known Issues
* :jirabug:`PT-238`: The information message implemented for :jirabug:`PT-204` has a typo when referring to the ``--ignore-engines`` parameter. This problem is planned to be fixed in the next release.
* :jirabug:`PT-240`: It has been detected that the implementation of :jirabug:`PT-205` is not complete and ``pt-osc`` may fail when altering tables. This problem is planned to be fixed in the next release.
Bug Fixes
* :jirabug:`PT-234`: The general log parser cannot handle timestamps which include time zones
* :jirabug:`PT-229`: ``pt-online-schema-change`` does not retry on a deadlock error when using ``Percona Server`` 5.7
* :jirabug:`PT-225`: ``pt-table-checksum`` ignores generated columns

21
docs/rn.3-0-7.txt Normal file
View File

@@ -0,0 +1,21 @@
v3.0.7 released 2018-03-01
==========================
New Features
* :jirabug:`PT-633`: Added --mysql-only option to ``pt-stalk`` for RDS
Bug Fixes
* :jirabug:`PT-244`: The ``--data-dir`` option of ``pt-online-schema-change`` is broken for partitioned table
* :jirabug:`PT-1256`: ``pt-table-sync`` does not use the character set for the table it is synchronizing
* :jirabug:`PT-1455`: ``pt-osc`` is stuck when filtering out on the slave the table that is being altered
* :jirabug:`PT-1485`: The *Security* section of ``pt-mysql-summary`` is broken in versions bigger than 5.6
* :jirabug:`PMM-1905`: ``Explain`` fails if it encounters a negative ``ntoreturn``
Known Issues:
* pt-online-schema-change will lock forever if using ``--drop-swap`` under MySQL 8.0.3-rc and 8.0.4-rc due to an error in MySQL: https://bugs.mysql.com/bug.php?id=8948
* pt-online-schema-change will lose FK constraints under MySQL 8.0.2-dmr, 8.0.3-rc 8.0.4-rc due to an error in MySQL: https://bugs.mysql.com/bug.php?id=89441
* pt-show-grants can't handle MySQL 8 roles yet

12
docs/rn.3-0-8.txt Normal file
View File

@@ -0,0 +1,12 @@
v3.0.8 released 2018-03-13
==========================
New Features
* :jirabug:`PT-1500`: Added --output=secure-slowlog option to ``pt-query-digest``
Buf Fixes
* :jirabug:`PT-1503`: The post-install script fails on VM due to improper UUID file detection
* :jirabug:`PT-1492`: ``pt-kill`` in version 3.0.7 ignores the value of the ``--busy-time``

25
docs/rn.3-0-9.txt Normal file
View File

@@ -0,0 +1,25 @@
v3.0.9 released 2018-04-20
==========================
New Tools
* :jirabug:`PT-1501`: ``pt-secure-collect`` - New tool to collect and sanitize pt-tools outputs
New Features
* :jirabug:`PT-1530`: Add support for encryption status to ``pt-mysql-summary``
* :jirabug:`PT-1526`: Add ndb status to ``pt-mysql-summary`` (Thanks Fernando Ipar)
* :jirabug:`PT-1525`: Add support for MySQL 8 roles into ``pt-mysql-summary``
* :jirabug:`PT-1509`: Make ``pt-table-sync`` only set binlog_format when necessary (Thanks Moritz Lenz)
* :jirabug:`PT-1508`: Add ``--read-only-interval`` and ``--fail-successive-errors`` flags to ``pt-heartbeat`` (Thanks Shlomi Noach)
* :jirabug:`PT-243`: Add ``--max-hostname-length`` and ``--max-line-length`` flags to ``pt-query-digest``
Bug Fixes
* :jirabug:`PT-1527`: Fixed ``pt-table-checksum`` ignores ``--nocheck-binlog-format``
Improvements
* :jirabug:`PT-1507`: ``pt-summary`` does not reliably read in the transparent huge pages setting (Thanks Nick Veenhof)
* :jirabug:`PT-1488`: ``pt-show-grants`` support for MySQL 8.0

118
docs/version-check.rst Normal file
View File

@@ -0,0 +1,118 @@
.. _version-check:
================================================================================
Version Checking
================================================================================
Some Percona software contains “version checking” functionality which is a
feature that enables Percona software users to be notified of available software
updates to improve your environment security and performance. Alongside this,
the version check functionality also provides Percona with information relating
to which software versions you are running, coupled with the environment
confirmation which the software is running within. This helps enable Percona to
focus our development effort accordingly based on trends within our customer
community.
The purpose of this document is to articulate the information that is
collected, as well as to provide guidance on how to disable this functionality
if desired.
Usage
=====
*Version Check* was implemented in |pt| 2.1.4, and was enabled by default in
version 2.2.1. Currently it is supported as a ``--[no]version-check`` option
by `a number of tools in Percona Toolkit <https://www.percona.com/doc/percona-toolkit/LATEST/genindex.html>`_,
|pxb|, and |pmm|.
When launched with Version Check enabled, the tool that supports this feature
connects to a Percona's *version check service* via a secure HTTPS channel. It
compares the locally installed version for possible updates, and also checks
versions of the following software:
* Operating System
* Percona Monitoring and Management (PMM)
* MySQL
* Perl
* MySQL driver for Perl (DBD::mysql)
* Percona Toolkit
Then it checks for and warns about versions with known problems if they are
identified as running in the environment.
Each version check request is logged by the server. Stored information consists
of the checked system unique ID followed by the software name and version.
The ID is generated either at installation or when the |version-check| query is
submitted for the first time.
.. note::
Prior to version 3.0.7 of |pt|, the system ID was calculated as an MD5 hash
of a hostname, and starting from |pt| 3.0.7 it is generated as an MD5
hash of a random number. |pxb| continues to use hostname-based MD5 hash.
As a result, the content of the sent query is as follows::
85624f3fb5d2af8816178ea1493ed41a;DBD::mysql;4.044
c2b6d625ef3409164cbf8af4985c48d3;MySQL;MySQL Community Server (GPL) 5.7.22-log
85624f3fb5d2af8816178ea1493ed41a;OS;Manjaro Linux
85624f3fb5d2af8816178ea1493ed41a;Percona::Toolkit;3.0.11-dev
85624f3fb5d2af8816178ea1493ed41a;Perl;5.26.2
Disabling Version Check
=======================
Although the |version-check| feature does not collect any personal information,
you might prefer to disable this feature, either one time or permanently.
To disable it one time, use ``--no-version-check`` option when invoking the
tool from a Percona product which supports it. Here is a simple example which
shows running `pt-diskstats <https://www.percona.com/doc/percona-toolkit/LATEST/pt-diskstats.html>`_
tool from the |pt| with |version-check| turned off::
pt-diskstats --no-version-check
Disabling |version-check| permanently can be done by placing
``no-version-check`` option into the configuration file of a Percona product
(see correspondent documentation for exact file name and syntax). For example,
in case of |pt| `this can be done <https://www.percona.com/doc/percona-toolkit/LATEST/configuration_files.html>`_ in a global configuration file ``/etc/percona-toolkit/percona-toolkit.conf``::
# Disable Version Check for all tools:
no-version-check
In case of |pxb| this can be done `in its configuration file <https://www.percona.com/doc/percona-xtrabackup/2.4/using_xtrabackup/configuring.htm>`_ in a similar way::
[xtrabackup]
no-version-check
Frequently Asked Questions
==========================
.. contents::
:local:
Why is this functionality enabled by default?
---------------------------------------------
We believe having this functionality enabled improves security and performance
of environments running Percona Software and it is good choice for majority of
the users.
Why not rely on Operating System's built in functionality for software updates?
-----------------------------------------------------------------------------
In many environments the Operating Systems repositories may not carry the
latest version of software and newer versions of software often installed
manually, so not being covered by operating system wide check for updates.
Why do you send more information than just the version of software being run as a part of version check service?
-----------------------------------------------------------------------------------------------------------------------
Compatibility problems can be caused by versions of various components in the
environment, for example problematic versions of Perl, DBD or MySQL could cause
operational problems with Percona Toolkit.
.. |pmm| replace:: PMM (Percona Monitoring and Management)
.. |pt| replace:: Percona Toolkit
.. |pxb| replace:: Percona XtraBackup
.. |version-check| replace:: *version checking*

View File

@@ -532,12 +532,12 @@ sub diff_rows {
$left_dbh->do("DROP TABLE IF EXISTS $left_tbl");
$left_dbh->do("CREATE TABLE $left_tbl $table_ddl");
$left_dbh->do("LOAD DATA LOCAL INFILE '$left_outfile' "
$left_dbh->do("LOAD DATA INFILE '$left_outfile' "
. "INTO TABLE $left_tbl");
$right_dbh->do("DROP TABLE IF EXISTS $right_tbl");
$right_dbh->do("CREATE TABLE $right_tbl $table_ddl");
$right_dbh->do("LOAD DATA LOCAL INFILE '$right_outfile' "
$right_dbh->do("LOAD DATA INFILE '$right_outfile' "
. "INTO TABLE $right_tbl");
PTDEBUG && _d('Loaded', $left_outfile, 'into table', $left_tbl, 'and',

View File

@@ -43,7 +43,7 @@ sub new {
my $genlog_line_1= qr{
\A
(?:(\d{6}\s+\d{1,2}:\d\d:\d\d|\d{4}-\d{1,2}-\d{1,2}T\d\d:\d\d:\d\d\.\d+(?:Z|-?\d\d:\d\d)?))? # Timestamp
(?:(\d{6}\s+\d{1,2}:\d\d:\d\d|\d{4}-\d{1,2}-\d{1,2}T\d\d:\d\d:\d\d\.\d+(?:Z|[-+]?\d\d:\d\d)?))? # Timestamp
\s+
(?:\s*(\d+)) # Thread ID
\s

1401
lib/HTTP/Tiny.pm Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -134,14 +134,40 @@ sub new {
);
PTDEBUG && _d('Ascend params:', Dumper($asc));
# Check if enum fields items are sorted or not.
# If they are sorted we can skip adding CONCAT to improve the queries eficiency.
my $force_concat_enums = $o->has('force-concat-enums') && $o->get('force-concat-enums');
my $i=0;
for my $index (@{$index_cols}) {
last if $args{n_chunk_index_cols} && $i >= $args{n_chunk_index_cols};
$i++;
if ($tbl->{tbl_struct}->{type_for}->{$index} eq 'enum') {
if ($tbl->{tbl_struct}->{defs}->{$index} =~ m/enum\s*\((.*?)\)/) {
my @items = split(/,\s*/, $1);
my $sorted = 1; # Asume the items list is sorted to later check if this is true
for (my $i=1; $i < scalar(@items); $i++) {
if ($items[$i-1] gt $items[$i]) {
$sorted = 0;
last;
}
}
if (!$force_concat_enums && !$sorted) {
die "The index " . $index . " in table " . $tbl->{name} .
" has unsorted enum items.\nPlease read the documentation for the --force-concat-enums parameter\n";
}
}
}
}
# Make SQL statements, prepared on first call to next(). FROM and
# ORDER BY are the same for all statements. FORCE IDNEX and ORDER BY
# are needed to ensure deterministic nibbling.
my $from = "$tbl->{name} FORCE INDEX(`$index`)";
my $order_by = join(', ', map { $tbl->{tbl_struct}->{type_for}->{$_} eq 'enum'
my $order_by = join(', ', map { $tbl->{tbl_struct}->{type_for}->{$_} eq 'enum' && $force_concat_enums
? "CONCAT(".$q->quote($_).")" : $q->quote($_)} @{$index_cols});
my $order_by_dec = join(' DESC,', map { $tbl->{tbl_struct}->{type_for}->{$_} eq 'enum'
my $order_by_dec = join(' DESC,', map { $tbl->{tbl_struct}->{type_for}->{$_} eq 'enum' && $force_concat_enums
? "CONCAT(".$q->quote($_).")" : $q->quote($_)} @{$index_cols});
# The real first row in the table. Usually we start nibbling from

View File

@@ -18,7 +18,7 @@
# ###########################################################################
package Percona::Toolkit;
our $VERSION = '3.0.10';
our $VERSION = '3.0.13-dev';
use strict;
use warnings FATAL => 'all';

View File

@@ -1332,7 +1332,8 @@ sub explain_report {
$explain .= "# *************************** $i. "
. "row ***************************\n";
foreach my $j ( 0 .. $#row ) {
$explain .= sprintf "# %13s: %s\n", $sth->{NAME}->[$j],
my $value_format = $sth->{NAME}->[$j] eq 'filtered' ? "%.02f" : "%s";
$explain .= sprintf "# %13s: $value_format\n", $sth->{NAME}->[$j],
defined $row[$j] ? $row[$j] : 'NULL';
}
$i++; # next row number

View File

@@ -220,7 +220,7 @@ sub remove_quoted_text {
my ($string) = @_;
$string =~ s/[^\\]`[^`]*[^\\]`//g;
$string =~ s/[^\\]"[^"]*[^\\]"//g;
$string =~ s/[^\\]"[^"]*[^\\]"//g;
$string =~ s/[^\\]'[^']*[^\\]'//g;
return $string;
}

View File

@@ -45,7 +45,7 @@ use FindBin qw();
eval {
require Percona::Toolkit;
require HTTP::Micro;
require HTTP::Tiny;
};
my $home = $ENV{HOME} || $ENV{HOMEPATH} || $ENV{USERPROFILE} || '.';
@@ -171,7 +171,7 @@ sub version_check {
else {
print "\n# A software update is available:\n";
}
print join("\n", map { "# * $_" } @$advice), "\n\n";
print join("\n", map { "# * ".($_ || '') } @$advice), "\n\n";
}
};
if ( $EVAL_ERROR ) {
@@ -384,7 +384,7 @@ sub pingback {
my $instances = $args{instances};
# Optional args
my $ua = $args{ua} || HTTP::Micro->new( timeout => 3 );
my $ua = $args{ua} || HTTP::Tiny->new( timeout => 3 );
# GET https://upgrade.percona.com, the server will return
# a plaintext list of items/programs it wants the tool

View File

@@ -332,6 +332,9 @@ summarize_processlist () {
}
\$1 == \"Time:\" {
t = \$2;
if ( t == \"NULL\" ) {
t = 0;
}
}
\$1 == \"Command:\" {
c = \$2;
@@ -1269,7 +1272,7 @@ report_jemalloc_enabled() {
local GENERAL_JEMALLOC_STATUS=0
local JEMALLOC_LOCATION=''
for PID in $(pidof mysqld); do
for pid in $(pidof mysqld); do
grep -qc jemalloc /proc/${pid}/environ || ldd $(which mysqld) 2>/dev/null | grep -qc jemalloc
jemalloc_status=$?
if [ $jemalloc_status = 1 ]; then
@@ -1576,7 +1579,7 @@ report_mysql_summary () {
local keyring_plugins="$(collect_keyring_plugins)"
local encrypted_tables=""
local encrypted_tablespaces=""
if [ ${OPT_LIST_ENCRYPTED_TABLES} == 'yes' ]; then
if [ "${OPT_LIST_ENCRYPTED_TABLES}" = 'yes' ]; then
encrypted_tables="$(collect_encrypted_tables)"
encrypted_tablespaces="$(collect_encrypted_tablespaces)"
fi

View File

@@ -5,21 +5,52 @@ use warnings;
my $file = $ARGV[0];
my $testcase = "";
my $testsuite = "";
my $error_collect = "";
my $error_print = "";
my $open_error = 0;
if (not defined $file) {
die "Need filename as parameter!\n";
}
sub close_error {
if ( $open_error == 1 ) {
print "$error_collect ]]></system-err></testcase>\n";
$error_collect=""; $open_error=0;
}
return;
}
open (my $info, $file) or die "Could not open $file: $!";
print "<testsuite name=\"PT MySQL Test\">\n";
print "<testsuites name=\"PT-MySQL\">\n";
while(my $line = <$info>) {
if ($line =~ /^(t\/\S+).* (\.*) (skipped:) (.*)$/) { print "<testcase name=\"$1\"><skipped/><system-out>Skip reason:<![CDATA[ $4 ]]></system-out></testcase>\n"; }
elsif ($line =~ /^ok (\d+) - (.*)$/) { print "<testcase name=\"$testcase - test $1\"><system-out>Test description:<![CDATA[ $2 ]]></system-out></testcase>\n"; }
elsif ($line =~ /^not ok (\d+) - (.*)$/) { print "<testcase name=\"$testcase - test $1\"><failure/><system-out>Test description:<![CDATA[ $2 ]]></system-out><system-err><![CDATA[ $error_print ]]></system-err></testcase>\n"; }
elsif ($line =~ /^(t\/\S+).* (\.*) $/) { $testcase = "$1"; $error_print = $error_collect; $error_collect = ""; }
elsif ($line !~ /^ok$/ && $line !~ /^\d+..\d+$/) { $error_collect = $error_collect . $line; }
if ($line =~ /^(t\/)(\S+)(\/)(\S+).* (\.*) (skipped:) (.*)$/) {
close_error();
print "<testcase name=\"$4\"><skipped/><system-out>Skip reason:<![CDATA[ $7 ]]></system-out></testcase>\n";
}
elsif ($line =~ /^ok (\d+) - (.*)$/) {
close_error();
print "<testcase name=\"$testcase - test $1\"><system-out>Test description:<![CDATA[ $2 ]]></system-out></testcase>\n";
}
elsif ($line =~ /^not ok (\d+) - (.*)$/) {
close_error();
print "<testcase name=\"$testcase - test $1\"><failure/><system-out>Test description:<![CDATA[ $2 ]]></system-out><system-err><![CDATA[ ";
$open_error=1;
}
elsif ($line =~ /^(t\/)(\S+)(\/)(\S+).* (\.*) $/) {
close_error();
if ( "$2" eq "$testsuite" ) {
$testcase="$4"; $error_collect="";
}
else {
if ( "$testsuite" ne "" ) { print "</testsuite>\n"; }
$testsuite="$2"; $testcase="$4"; $error_collect=""; print "<testsuite name=\"$testsuite\">\n";
}
}
elsif ($line !~ /^ok$/ && $line !~ /^\d+..\d+$/) {
$error_collect=$error_collect . $line;
}
}
print "</testsuite>\n"
print "</testsuite>\n</testsuites>\n";

View File

@@ -0,0 +1,15 @@
STOP SLAVE FOR CHANNEL '';
SET GLOBAL master_info_repository = 'TABLE';
SET @@GLOBAL.relay_log_info_repository = 'TABLE';
SET @@GLOBAL.ENFORCE_GTID_CONSISTENCY=ON;
SET @@GLOBAL.GTID_MODE = OFF_PERMISSIVE;
SET @@GLOBAL.GTID_MODE = ON_PERMISSIVE;
SET @@GLOBAL.GTID_MODE = ON;
CHANGE MASTER TO master_host='127.0.0.1', master_port=2900, master_user='msandbox', master_password='msandbox', master_auto_position=1 FOR CHANNEL 'masterchan1';
CHANGE MASTER TO master_host='127.0.0.1', master_port=2901, master_user='msandbox', master_password='msandbox', master_auto_position=1 FOR CHANNEL 'masterchan2';
START SLAVE for channel 'masterchan1';
START SLAVE for channel 'masterchan2';

View File

@@ -122,8 +122,12 @@ make_sandbox() {
fi
if [ -n "$GTID" ]; then
#echo "gtid_mode=on" >> ${TMP_DIR}/$port/my.sandbox.cnf
echo "gtid_mode=ON_PERMISSIVE" >> ${TMP_DIR}/$port/my.sandbox.cnf
if [ "$version" "<" '5.7' ]; then
echo "gtid_mode=on" >> ${TMP_DIR}/$port/my.sandbox.cnf
fi
if [ ! "$version" "<" '5.7' ]; then
echo "gtid_mode=ON_PERMISSIVE" >> ${TMP_DIR}/$port/my.sandbox.cnf
fi
echo "enforce_gtid_consistency" >> ${TMP_DIR}/$port/my.sandbox.cnf
fi
if [ -n "$REPLICATION_THREADS" ]; then
@@ -143,7 +147,7 @@ make_sandbox() {
if [ $generating_database -eq 1 ]; then
echo "Creating default databases ..."
if [ "$version" > "5.6" ]; then
if [ "$version" ">" "5.6" ]; then
rm -f ${TMP_DIR}/empty-defaults.txt
touch ${TMP_DIR}/empty-defaults.txt
rm -rf ${TMP_DIR}/$port/data

View File

@@ -1,6 +1,6 @@
GO := go
pkgs = $(shell find . -type d -name "pt-*" -exec basename {} \;)
VERSION="3.0.9"
VERSION="3.0.12"
BUILD=$(shell date +%FT%T%z)
GOVERSION=$(shell go version | cut --delimiter=" " -f3)
GOUTILSDIR ?= $(GOPATH)/bin

View File

@@ -10,7 +10,7 @@ GOPATH ?=${HOME}/go
MAKE_TARS = ''
CUR_DIR=$(shell pwd)
BIN_DIR=${CUR_DIR}/build
SOURCES=collect encryptor pt-secure-data
SOURCES=collect encryptor pt-secure-collect
LDFLAGS="-X main.Version=${VERSION} -X main.Build=${BUILD} -X main.Commit=${COMMIT} -X main.Branch=${BRANCH} -X main.GoVersion=${GOVERSION} -s -w"
ifeq (${GOPATH},)
@@ -22,7 +22,7 @@ $(error Invalid GOPATH. There is no src dir in the GOPATH)
endif
ifeq ($(findstring ${GOPATH},${CUR_DIR}), )
$(error Wrong directorry for the project. It must be in $GOPATH/github/Percona-Lab/pt-secure-data)
$(error Wrong directorry for the project. It must be in $GOPATH/github/Percona-Lab/pt-secure-collect)
endif
$(info )
@@ -37,7 +37,7 @@ default: prepare
@rm -f ${BIN_DIR}/collect_*.tar.gz
@echo
@$(info Building in ${BIN_DIR})
@go build -ldflags ${LDFLAGS} -o ${BIN_DIR}/pt-secure-data *.go
@go build -ldflags ${LDFLAGS} -o ${BIN_DIR}/pt-secure-collect *.go
prepare:
@$(info Checking if ${BIN_DIR} exists)
@@ -47,31 +47,31 @@ all: clean darwin-amd64-tar linux-amd64-tar windows-amd64-tar
clean: prepare
@$(info Cleaning binaries and tar.gz files in dir ${BIN_DIR})
@rm -f ${BIN_DIR}/pt-secure-data
@rm -f ${BIN_DIR}/pt-secure-data.exe
@rm -f ${BIN_DIR}/pt-secure-data_*.tar.gz
@rm -f ${BIN_DIR}/pt-secure-collect
@rm -f ${BIN_DIR}/pt-secure-collect.exe
@rm -f ${BIN_DIR}/pt-secure-collect_*.tar.gz
linux-amd64: prepare
@echo "Building linux/amd64 binaries in ${BIN_DIR}"
@GOOS=linux GOARCH=amd64 go build -ldflags ${LDFLAGS} -o ${BIN_DIR}/pt-secure-data *.go
@GOOS=linux GOARCH=amd64 go build -ldflags ${LDFLAGS} -o ${BIN_DIR}/pt-secure-collect *.go
linux-amd64-tar: linux-amd64
@tar cvzf ${BIN_DIR}/pt-secure-data_linux_amd64.tar.gz -C ${BIN_DIR} pt-secure-data
@tar cvzf ${BIN_DIR}/pt-secure-collect_linux_amd64.tar.gz -C ${BIN_DIR} pt-secure-collect
darwin-amd64:
@echo "Building darwin/amd64 binaries in ${BIN_DIR}"
@mkdir -p ${BIN_DIR}
@GOOS=darwin GOARCH=amd64 go build -ldflags ${LDFLAGS} -o ${BIN_DIR}/pt-secure-data *.go
@GOOS=darwin GOARCH=amd64 go build -ldflags ${LDFLAGS} -o ${BIN_DIR}/pt-secure-collect *.go
darwin-amd64-tar: darwin-amd64
@tar cvzf ${BIN_DIR}/pt-secure-data_darwin_amd64.tar.gz -C ${BIN_DIR} pt-secure-data
@tar cvzf ${BIN_DIR}/pt-secure-collect_darwin_amd64.tar.gz -C ${BIN_DIR} pt-secure-collect
windows-amd64: prepare
@echo "Building windows/amd64 binaries in ${BIN_DIR}"
@GOOS=windows GOARCH=amd64 go build -ldflags ${LDFLAGS} -o ${BIN_DIR}/pt-secure-data.exe *.go
@GOOS=windows GOARCH=amd64 go build -ldflags ${LDFLAGS} -o ${BIN_DIR}/pt-secure-collect.exe *.go
windows-amd64-tar: windows-amd64
@tar cvzf ${BIN_DIR}/pt-secure-data_windows_amd64.tar.gz -C ${BIN_DIR} pt-secure-data.exe
@tar cvzf ${BIN_DIR}/pt-secure-collect_windows_amd64.tar.gz -C ${BIN_DIR} pt-secure-collect.exe
style:
@echo ">> checking code style"

View File

@@ -9,7 +9,7 @@ Internal variables placeholders will be replaced with the corresponding flag va
Usage:
```
pt-secure-data [<flags>] <command> [<args> ...]
pt-secure-collect [<flags>] <command> [<args> ...]
```

View File

@@ -67,6 +67,8 @@ type myDefaults struct {
}
const (
TOOLNAME = "pt-secure-collect"
decryptCmd = "decrypt"
encryptCmd = "encrypt"
collectCmd = "collect"
@@ -81,6 +83,10 @@ var (
"pt-summary",
"pt-mysql-summary --host=$mysql-host --port=$mysql-port --user=$mysql-user --password=$mysql-pass",
}
Build string = "01-01-1980"
GoVersion string = "1.8"
Version string = "3.0.1"
)
func main() {
@@ -164,12 +170,15 @@ func processCliParams(baseTempPath string, usageWriter io.Writer) (*cliOptions,
}
msg += "\n "
app := kingpin.New("pt-secure-data", msg)
app := kingpin.New(TOOLNAME, msg)
if usageWriter != nil {
app.UsageWriter(usageWriter)
app.Terminate(nil)
}
// Add support for --version flag
app.Version(TOOLNAME + "\nVersion " + Version + "\nBuild: " + Build + " using " + GoVersion)
opts := &cliOptions{
CollectCommand: app.Command(collectCmd, "Collect, sanitize, pack and encrypt data from pt-tools."),
DecryptCommand: app.Command(decryptCmd, "Decrypt an encrypted file. The password will be requested from the terminal."),

View File

@@ -8,7 +8,7 @@ import (
)
var (
hostnameRE = regexp.MustCompile(`(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)+([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-][A-Za-z0-9]){2,3}(?:\W)`)
hostnameRE = regexp.MustCompile(`(([a-zA-Z0-9]|[a-zA-Z0-9\-]*[a-zA-Z0-9])\.)+([A-Za-z]+)|([0-9]{1,3}\.){3}[0-9]{1,3}`)
queryLineRe []*regexp.Regexp
queryInLineRe []*regexp.Regexp
)

View File

@@ -0,0 +1,54 @@
package sanitize
import (
"reflect"
"testing"
"github.com/kr/pretty"
)
func TestSanitizeHostnames(t *testing.T) {
want := []string{
"top - 20:05:17 up 10 days, 16:27, 1 user, load average: 0.01, 0.15, 0.19",
"Tasks: 115 total, 1 running, 114 sleeping, 0 stopped, 0 zombie",
"%Cpu(s): 1.0 us, 0.3 sy, 0.0 ni, 98.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st",
"KiB Mem : 3881748 total, 147324 free, 1892824 used, 1841600 buff/cache",
"KiB Swap: 1572860 total, 1572748 free, 112 used. 1609372 avail Mem",
"",
"PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND",
"5304 vagrant 20 0 1983280 1.327g 12272 S 2.3 35.8 456:34.90 prometheus",
"5313 root 20 0 142100 16952 5428 S 1.0 0.4 189:16.81 node_exporter ",
}
lines := make([]string, len(want))
copy(lines, want)
sanitizeHostnames(lines)
if !reflect.DeepEqual(lines, want) {
pretty.Println(want)
pretty.Println(lines)
t.Error("structures don't match")
}
lines = []string{
"top - 20:05:17 up 10 days, 16:27, 1 user, load average: 0.01, 0.15, 0.19",
"Tasks: 115 total, 1 running, 114 sleeping, 0 stopped, 0 zombie",
"%Cpu(s): 1.0 us, 0.3 sy, 0.0 ni, 98.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st",
"lets put a host name here: domain.com",
"and put an ip address here: 10.0.0.1",
"and put a non ip address here: 10.0",
}
want = []string{
"top - 20:05:17 up 10 days, 16:27, 1 user, load average: 0.01, 0.15, 0.19",
"Tasks: 115 total, 1 running, 114 sleeping, 0 stopped, 0 zombie",
"%Cpu(s): 1.0 us, 0.3 sy, 0.0 ni, 98.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st",
"lets put a host name here: hostname",
"and put an ip address here: hostname",
"and put a non ip address here: 10.0",
}
sanitizeHostnames(lines)
if !reflect.DeepEqual(lines, want) {
t.Error("structures don't match")
pretty.Println(want)
pretty.Println(lines)
}
}

View File

@@ -256,9 +256,11 @@ SKIP: {
is($d->{S}, '/tmp/12345/mysql_sandbox12345.sock', 'Filled in socket');
is($d->{h}, '127.0.0.1', 'Left hostname alone');
my $want = $sandbox_version lt '8.0' ? [ qw(utf8 utf8 utf8) ]: [ qw(utf8mb4 utf8mb4 utf8mb4) ];
warn Data::Dumper::Dumper($want);
is_deeply(
$dbh->selectrow_arrayref('select @@character_set_client, @@character_set_connection, @@character_set_results'),
[qw(utf8 utf8 utf8)],
$want,
'Set charset'
);
$dbh->disconnect();
@@ -276,7 +278,7 @@ SKIP: {
};
is_deeply(
$dbh->selectrow_arrayref('select @@character_set_client, @@character_set_connection, @@character_set_results'),
[qw(utf8 utf8 utf8)],
$want,
'Set utf8 charset case-insensitively (issue 1282)'
);
};

View File

@@ -73,20 +73,27 @@ if ( $sandbox_version gt '5.6' ) {
];
}
is_deeply(
$exa->explain_query(
my $got = $exa->explain_query(
dbh => $dbh,
query => 'select * from actor where actor_id = 5',
),
);
$got->[0]->{filtered} = int($got->[0]->{filtered}) if (defined($got->[0]->{filtered}));
is_deeply(
$got,
$want,
'Got a simple EXPLAIN result',
);
is_deeply(
$exa->explain_query(
$got = $exa->explain_query(
dbh => $dbh,
query => 'delete from actor where actor_id = 5',
),
);
$got->[0]->{filtered} = int($got->[0]->{filtered}) if (defined($got->[0]->{filtered}));
is_deeply(
$got,
$want,
'Got EXPLAIN result for a DELETE',
);

View File

@@ -270,6 +270,61 @@ test_log_parser(
],
);
# Customer issue from Ernie.
test_log_parser(
parser => $p,
file => $sample.'pt-1573-general-log-system.log',
oktorun => sub { $oktorun = $_[0]; },
result => [
{
Query_time => 0,
Thread_id => '257426',
arg => 'administrator command: Connect',
bytes => 30,
cmd => 'Admin',
host => '127.0.0.1',
pos_in_log => 0,
ts => '2018-09-07T18:45:40.098124+08:00',
user => 'mysqlha_common'
},
{
Query_time => 0,
Thread_id => '257426',
arg => 'set autocommit=0',
bytes => 16,
cmd => 'Query',
pos_in_log => 285,
ts => '2018-09-07T18:45:40.098511+08:00'
},
{
Query_time => 0,
Thread_id => '257426',
arg => 'set autocommit=1',
bytes => 16,
cmd => 'Query',
pos_in_log => 411,
ts => '2018-09-07T18:45:40.098613+08:00'
},
{
Query_time => 0,
Thread_id => '257426',
arg => 'show global status like \'Threads_connected\'',
bytes => 43,
cmd => 'Query',
pos_in_log => 501,
ts => '2018-09-07T18:45:40.098769+08:00'
},
{
Query_time => 0,
Thread_id => '257426',
arg => 'administrator command: Quit',
bytes => 27,
cmd => 'Admin',
pos_in_log => 547,
ts => '2018-09-07T18:45:40.101009+08:00'
}
],
);
# #############################################################################
# Done.
# #############################################################################

View File

@@ -173,9 +173,9 @@ SKIP: {
d => $DBD::mysql::VERSION ge '4.001' ? undef : '(7)',
dt => undef,
ts => undef,
c => '(3)',
c2 => '(45)',
v => '(96)',
c => $sandbox_version ge '8.0' ? '(4)' : '(3)',
c2 => $sandbox_version ge '8.0' ? '(60)' : '(45)',
v => $sandbox_version ge '8.0' ? '(128)' : '(96)',
t => undef,
},
},

View File

@@ -38,6 +38,8 @@ my $dbh = $sb->get_dbh_for('master');
if ( !$dbh ) {
plan skip_all => 'Cannot connect to sandbox master';
} else {
plan tests => 62;
}
my $q = new Quoter();
@@ -65,6 +67,7 @@ my $in = "/t/lib/samples/NibbleIterator/";
sub make_nibble_iter {
my (%args) = @_;
if (my $file = $args{sql_file}) {
$sb->load_file('master', "$in/$file");
}
@@ -83,18 +86,19 @@ sub make_nibble_iter {
1 while $si->next();
my $ni = new NibbleIterator(
Cxn => $cxn,
tbl => $schema->get_table(lc($args{db}), lc($args{tbl})),
chunk_size => $o->get('chunk-size'),
chunk_index => $o->get('chunk-index'),
callbacks => $args{callbacks},
select => $args{select},
one_nibble => $args{one_nibble},
resume => $args{resume},
order_by => $args{order_by},
comments => $args{comments},
pause_file => $o->get('pause-file'),
sleep => $args{sleep} || 60,
Cxn => $cxn,
tbl => $schema->get_table(lc($args{db}), lc($args{tbl})),
chunk_size => $o->get('chunk-size'),
chunk_index => $o->get('chunk-index'),
callbacks => $args{callbacks},
select => $args{select},
one_nibble => $args{one_nibble},
resume => $args{resume},
order_by => $args{order_by},
comments => $args{comments},
n_chunk_index_cols => $o->get('chunk-index-columns'),
pause_file => $o->get('pause-file'),
sleep => $args{sleep} || 60,
%common_modules,
);
@@ -879,7 +883,7 @@ is_deeply(
# #############################################################################
diag(`/tmp/12345/use < $trunk/t/lib/samples/cardinality.sql >/dev/null`);
$dbh->do('analyze table bad_tables.inv');
$ni = make_nibble_iter(
db => 'cardb',
tbl => 't',
@@ -892,6 +896,76 @@ is(
"Use non-unique index with highest cardinality (bug 1199591)"
);
$sb->load_file('master', "t/lib/samples/NibbleIterator/enum_keys.sql");
$ni = undef;
eval {
$ni = make_nibble_iter(
db => 'test',
tbl => 't1',
argv => [qw(--databases test --chunk-size 3)],
);
};
like(
$EVAL_ERROR,
qr/The index f3 in table `test`.`t1` has unsorted enum items/,
"PT-1572 Die on unsorted enum items in index",
);
eval {
$ni = make_nibble_iter(
db => 'test',
tbl => 't1',
argv => [qw(--databases test --force-concat-enums --chunk-size 3)],
);
};
like(
$ni->{explain_first_lb_sql},
qr/ORDER BY `f1`, `f2`, CONCAT\(`f3`\)/,
"PT-1572 Use of CONCAT for unsorted ENUM field items without --",
);
eval {
$ni = make_nibble_iter(
db => 'test',
tbl => 't2',
argv => [qw(--databases test --chunk-size 3)],
);
};
is(
$EVAL_ERROR,
'',
"PT-1572 No errors on sorted enum items in index",
);
like(
$ni->{explain_first_lb_sql},
qr/ORDER BY `f1`, `f2`, `f3`/,
"PT-1572 Don't use CONCAT for sorted ENUM field items without --force-concat-enums",
);
eval {
$ni = make_nibble_iter(
db => 'test',
tbl => 't1',
argv => [qw(--databases test --chunk-size 3 --chunk-index-columns 2)],
);
};
is(
$EVAL_ERROR,
'',
"PT-1572 No errors on unsorted enum items in index and --chunk-index-columns",
);
like(
$ni->{explain_first_lb_sql},
qr/ORDER BY `f1`, `f2`, `f3`/,
"PT-1572 Don't use CONCAT for sorted ENUM field items without --force-concat-enums & --chunk-index-columns",
);
# #############################################################################
# Done.
# #############################################################################
@@ -900,11 +974,15 @@ is(
open STDERR, '>', \$output;
$ni->_d('Complete test coverage');
}
like(
$output,
qr/Complete test coverage/,
'_d() works'
);
$dbh->do("DROP DATABASE test");
$sb->wipe_clean($dbh);
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
done_testing;

View File

@@ -1220,9 +1220,11 @@ SKIP: {
: $sandbox_version ge '5.1' ? "t/lib/samples/QueryReportFormatter/report025.txt"
: "t/lib/samples/QueryReportFormatter/report026.txt");
# 30
# 32
my $explain_report = $qrf->explain_report("select * from qrf.t where i=2", 'qrf');
$explain_report =~ s/filtered: 100(\s+)/filtered: 100.00$1/;
is(
$qrf->explain_report("select * from qrf.t where i=2", 'qrf'),
$explain_report,
$explain,
"explain_report()"
);

View File

@@ -23,8 +23,9 @@ my $dbh = $sb->get_dbh_for('master');
if ( !$dbh ) {
plan skip_all => "Cannot connect to sandbox master";
}
else {
} elsif ($sandbox_version ge '8.0') {
plan skip_all => "There is no NO_AUTO_CREATE_USER in MySQL 8.0+";
} else {
plan tests => 4;
}

View File

@@ -624,9 +624,10 @@ is_deeply(
'Type and length of CRC32'
);
my $want = $sandbox_version ge '8.0' ? [qw(varchar 128)] : [qw(varchar 96)];
is_deeply(
[$c->get_crc_type($dbh, 'MD5')],
[qw(varchar 96)],
$want,
'Type and length of MD5'
);

View File

@@ -1188,6 +1188,85 @@ SKIP: {
) or die Data::Dumper::Dumper($tbl);
}
# Test that the GENERATED word in a column comment doesn't make that column
# to be detected as a MySQL 5.7+ generated column.
$tbl = $tp->parse( load_file('t/lib/samples/generated_cols_comments.sql') );
is_deeply(
$tbl,
{
charset => 'latin1',
clustered_key => 'PRIMARY',
col_posn => {
id => 0,
source => 1,
tso_id => 2
},
cols => [
'id',
'source',
'tso_id'
],
defs => {
id => ' `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT \'The unique id of the audit record.\'',
source => ' `source` enum(\'val1\',\'val2\') NOT NULL COMMENT \'Transaction originator\'',
tso_id => ' `tso_id` int(11) unsigned NOT NULL DEFAULT \'0\' COMMENT \'An internally generated transaction.\''
},
engine => 'InnoDB',
is_autoinc => {
id => 1,
source => 0,
tso_id => 0
},
is_col => {
id => 1,
source => 1,
tso_id => 1
},
is_generated => {},
is_nullable => {},
is_numeric => {
id => 1,
tso_id => 1
},
keys => {
PRIMARY => {
col_prefixes => [
undef
],
colnames => '`id`',
cols => [
'id'
],
ddl => 'PRIMARY KEY (`id`),',
is_col => {
id => 1
},
is_nullable => 0,
is_unique => 1,
name => 'PRIMARY',
type => 'BTREE'
}
},
name => 't1',
non_generated_cols => [
'id',
'source',
'tso_id'
],
null_cols => [],
numeric_cols => [
'id',
'tso_id'
],
type_for => {
id => 'int',
source => 'enum',
tso_id => 'int'
}
},
'Column having the word "generated" as part of the comment is OK',
) or diag Data::Dumper::Dumper($tbl);
# #############################################################################
# Done.
# #############################################################################

View File

@@ -0,0 +1,47 @@
DROP DATABASE IF EXISTS test;
CREATE DATABASE test;
USE test;
-- Don't change the comments. The enum word inside the comment is there to test the table parser
CREATE TABLE `test`.`t1` (
f1 DATE NOT NULL,
f2 INT(10) UNSIGNED NOT NULL,
f3 ENUM('c','a','b','d') NOT NULL DEFAULT 'c' COMMENT "unsorted enum items",
f4 INT(10) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`f1`,`f2`,`f3`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `t1` VALUES
('2018-07-27',165910161,'c',1375471152),
('2018-07-27',393713658,'d',1382302491),
('2018-07-27',472875023,'c',525456967),
('2018-07-27',543582931,'c',1657080267),
('2018-07-27',583532949,'d',280366509),
('2018-07-27',1396416465,'d',1252007743),
('2018-07-27',1705409249,'c',1714682759),
('2018-07-27',1801160058,'a',1022430181),
('2018-07-27',1898674299,'c',1310715836),
('2018-07-27',2011751560,'a',109015753);
CREATE TABLE `test`.`t2` (
f1 DATE NOT NULL,
f2 INT(10) UNSIGNED NOT NULL,
f3 ENUM('a','b','c','d') NOT NULL DEFAULT 'c' COMMENT "sorted enum items",
f4 INT(10) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`f1`,`f2`,`f3`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `t2` VALUES
('2018-07-27',165910161,'c',1375471152),
('2018-07-27',393713658,'d',1382302491),
('2018-07-27',472875023,'c',525456967),
('2018-07-27',543582931,'c',1657080267),
('2018-07-27',583532949,'d',280366509),
('2018-07-27',1396416465,'d',1252007743),
('2018-07-27',1705409249,'c',1714682759),
('2018-07-27',1801160058,'a',1022430181),
('2018-07-27',1898674299,'c',1310715836),
('2018-07-27',2011751560,'a',109015753);

View File

@@ -9,5 +9,5 @@
# key_len: 4
# ref: const
# rows: 1
# filtered: 100
# filtered: 100.00
# Extra: NULL

View File

@@ -6,7 +6,7 @@ CREATE TABLE `columns_priv` (
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 COMMENT='Column privileges'
@@ -23,25 +23,25 @@ CREATE TABLE `db` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '',
`Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Select_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Insert_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Update_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Delete_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Create_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Drop_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Grant_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`References_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Index_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Alter_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Create_view_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Show_view_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Create_routine_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Execute_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
PRIMARY KEY (`Host`,`Db`,`User`),
KEY `User` (`User`)
) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 COMMENT='Database privileges'
@@ -63,7 +63,7 @@ CREATE TABLE `engine_cost` (
`cost_value` float DEFAULT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`comment` varchar(1024) DEFAULT NULL,
`default_value` float GENERATED ALWAYS AS ((case `cost_name` when _utf8'io_block_read_cost' then 1.0 when _utf8'memory_block_read_cost' then 0.25 else NULL end)) VIRTUAL,
`default_value` float GENERATED ALWAYS AS ((case `cost_name` when _utf8mb3'io_block_read_cost' then 1.0 when _utf8mb3'memory_block_read_cost' then 0.25 else NULL end)) VIRTUAL,
PRIMARY KEY (`cost_name`,`engine_name`,`device_type`)
) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0
@@ -72,7 +72,7 @@ CREATE TABLE `func` (
`name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`ret` tinyint(1) NOT NULL DEFAULT '0',
`dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
`type` enum('function','aggregate') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`name`)
) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 COMMENT='User defined functions'
@@ -80,8 +80,8 @@ mysql.global_grants
CREATE TABLE `global_grants` (
`USER` char(32) COLLATE utf8_bin NOT NULL DEFAULT '',
`HOST` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`PRIV` char(32) CHARACTER SET utf8 NOT NULL DEFAULT '',
`WITH_GRANT_OPTION` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`PRIV` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`WITH_GRANT_OPTION` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
PRIMARY KEY (`USER`,`HOST`,`PRIV`)
) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 COMMENT='Extended global grants'
@@ -122,29 +122,6 @@ CREATE TABLE `help_topic` (
UNIQUE KEY `name` (`name`)
) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='help topics'
mysql.innodb_ddl_log
CREATE TABLE `innodb_ddl_log` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`thread_id` bigint(20) unsigned NOT NULL,
`type` int(10) unsigned NOT NULL,
`space_id` int(10) unsigned DEFAULT NULL,
`page_no` int(10) unsigned DEFAULT NULL,
`index_id` bigint(20) unsigned DEFAULT NULL,
`table_id` bigint(20) unsigned DEFAULT NULL,
`old_file_path` varchar(512) COLLATE utf8_bin DEFAULT NULL,
`new_file_path` varchar(512) COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `thread_id` (`thread_id`)
) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB AUTO_INCREMENT=478 DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC
mysql.innodb_dynamic_metadata
CREATE TABLE `innodb_dynamic_metadata` (
`table_id` bigint(20) unsigned NOT NULL,
`version` bigint(20) unsigned NOT NULL,
`metadata` blob NOT NULL,
PRIMARY KEY (`table_id`)
) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC
mysql.password_history
CREATE TABLE `password_history` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
@@ -166,10 +143,10 @@ CREATE TABLE `procs_priv` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '',
`Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '',
`Routine_name` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL,
`Grantor` char(93) COLLATE utf8_bin NOT NULL DEFAULT '',
`Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
KEY `Grantor` (`Grantor`)
@@ -194,7 +171,7 @@ CREATE TABLE `role_edges` (
`FROM_USER` char(32) COLLATE utf8_bin NOT NULL DEFAULT '',
`TO_HOST` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`TO_USER` char(32) COLLATE utf8_bin NOT NULL DEFAULT '',
`WITH_ADMIN_OPTION` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`WITH_ADMIN_OPTION` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
PRIMARY KEY (`FROM_HOST`,`FROM_USER`,`TO_HOST`,`TO_USER`)
) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 COMMENT='Role hierarchy and role grants'
@@ -204,7 +181,7 @@ CREATE TABLE `server_cost` (
`cost_value` float DEFAULT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`comment` varchar(1024) DEFAULT NULL,
`default_value` float GENERATED ALWAYS AS ((case `cost_name` when _utf8'disk_temptable_create_cost' then 20.0 when _utf8'disk_temptable_row_cost' then 0.5 when _utf8'key_compare_cost' then 0.05 when _utf8'memory_temptable_create_cost' then 1.0 when _utf8'memory_temptable_row_cost' then 0.1 when _utf8'row_evaluate_cost' then 0.1 else NULL end)) VIRTUAL,
`default_value` float GENERATED ALWAYS AS ((case `cost_name` when _utf8mb3'disk_temptable_create_cost' then 20.0 when _utf8mb3'disk_temptable_row_cost' then 0.5 when _utf8mb3'key_compare_cost' then 0.05 when _utf8mb3'memory_temptable_create_cost' then 1.0 when _utf8mb3'memory_temptable_row_cost' then 0.1 when _utf8mb3'row_evaluate_cost' then 0.1 else NULL end)) VIRTUAL,
PRIMARY KEY (`cost_name`)
) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0
@@ -230,8 +207,8 @@ CREATE TABLE `tables_priv` (
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Grantor` char(93) COLLATE utf8_bin NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
KEY `Grantor` (`Grantor`)
) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 COMMENT='Table privileges'
@@ -239,7 +216,7 @@ CREATE TABLE `tables_priv` (
mysql.time_zone
CREATE TABLE `time_zone` (
`Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N',
`Use_leap_seconds` enum('Y','N') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
PRIMARY KEY (`Time_zone_id`)
) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Time zones'
@@ -279,36 +256,36 @@ mysql.user
CREATE TABLE `user` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '',
`Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Select_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Insert_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Update_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Delete_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Create_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Drop_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Reload_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Shutdown_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Process_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`File_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Grant_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`References_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Index_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Alter_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Show_db_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Super_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Execute_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Repl_client_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Create_view_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Show_view_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Create_routine_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Create_user_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`ssl_cipher` blob NOT NULL,
`x509_issuer` blob NOT NULL,
`x509_subject` blob NOT NULL,
@@ -318,12 +295,12 @@ CREATE TABLE `user` (
`max_user_connections` int(11) unsigned NOT NULL DEFAULT '0',
`plugin` char(64) COLLATE utf8_bin NOT NULL DEFAULT 'caching_sha2_password',
`authentication_string` text COLLATE utf8_bin,
`password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`password_expired` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`password_last_changed` timestamp NULL DEFAULT NULL,
`password_lifetime` smallint(5) unsigned DEFAULT NULL,
`account_locked` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_role_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Drop_role_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`account_locked` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Create_role_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Drop_role_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Password_reuse_history` smallint(5) unsigned DEFAULT NULL,
`Password_reuse_time` smallint(5) unsigned DEFAULT NULL,
PRIMARY KEY (`Host`,`User`)
@@ -334,19 +311,19 @@ CREATE TABLE `checksums` (
`db_tbl` varchar(128) NOT NULL,
`checksum` int(10) unsigned NOT NULL,
PRIMARY KEY (`db_tbl`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
percona_test.load_data
CREATE TABLE `load_data` (
`i` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
percona_test.sentinel
CREATE TABLE `sentinel` (
`id` int(11) NOT NULL,
`ping` varchar(64) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
sakila.actor
CREATE TABLE `actor` (
@@ -571,5 +548,5 @@ CREATE TABLE `sys_config` (
`set_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`set_by` varchar(128) DEFAULT NULL,
PRIMARY KEY (`variable`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci

View File

@@ -2,36 +2,36 @@ mysql.user
CREATE TABLE `user` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '',
`Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Select_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Insert_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Update_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Delete_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Create_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Drop_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Reload_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Shutdown_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Process_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`File_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Grant_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`References_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Index_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Alter_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Show_db_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Super_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Execute_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Repl_client_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Create_view_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Show_view_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Create_routine_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Create_user_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`ssl_cipher` blob NOT NULL,
`x509_issuer` blob NOT NULL,
`x509_subject` blob NOT NULL,
@@ -41,12 +41,12 @@ CREATE TABLE `user` (
`max_user_connections` int(11) unsigned NOT NULL DEFAULT '0',
`plugin` char(64) COLLATE utf8_bin NOT NULL DEFAULT 'caching_sha2_password',
`authentication_string` text COLLATE utf8_bin,
`password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`password_expired` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`password_last_changed` timestamp NULL DEFAULT NULL,
`password_lifetime` smallint(5) unsigned DEFAULT NULL,
`account_locked` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_role_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Drop_role_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`account_locked` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Create_role_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Drop_role_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Password_reuse_history` smallint(5) unsigned DEFAULT NULL,
`Password_reuse_time` smallint(5) unsigned DEFAULT NULL,
PRIMARY KEY (`Host`,`User`)

View File

@@ -0,0 +1,6 @@
CREATE TABLE `t1` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The unique id of the audit record.',
`source` enum('val1','val2') NOT NULL COMMENT 'Transaction originator',
`tso_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'An internally generated transaction.',
PRIMARY KEY (`id`),
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='some comment here generated'

View File

@@ -0,0 +1,8 @@
/usr/local/mysql-5.7.21/bin/mysqld, Version: 5.7.21-log (MySQL Community Server (GPL)). started with:
Tcp port: 5721 Unix socket: /tmp/mysql5721.sock
Time Id Command Argument
2018-09-07T18:45:40.098124+08:00 257426 Connect mysqlha_common@127.0.0.1 on using TCP/IP
2018-09-07T18:45:40.098511+08:00 257426 Query set autocommit=0
2018-09-07T18:45:40.098613+08:00 257426 Query set autocommit=1
2018-09-07T18:45:40.098769+08:00 257426 Query show global status like 'Threads_connected'
2018-09-07T18:45:40.101009+08:00 257426 Quit

View File

@@ -46,7 +46,6 @@ is($output, <<EOF
2\t\\N\t3\t4
3\t2\t3\t\\\t
4\t2\t3\t\\
EOF
, 'File has the right stuff');
`rm -f archive.test.table_1`;
@@ -124,8 +123,8 @@ $output = output(
);
$output = `cat archive.test.table_2`;
is($output, <<EOF
1, 2, 3, "4"
2, "\\N", 3, "4"
1, 2, 3, 4
2, "\\N", 3, 4
3, 2, 3, "\\\t"
4, 2, 3, "\\\n"
5, 2, 3, "Zapp \\"Brannigan"

View File

@@ -140,10 +140,11 @@ ok(
$sb->load_file('master', 't/lib/samples/dupekeys/simple_dupe_bug_1217013.sql', 'test');
my $want = $sandbox_version lt '8.0' ? "$sample/simple_dupe_bug_1217013.txt" : "$sample/simple_dupe_bug_1217013_80.txt";
ok(
no_diff(
sub { pt_duplicate_key_checker::main(@args, qw(-t test.domains -v)) },
"$sample/simple_dupe_bug_1217013.txt"),
$want),
'Exact unique dupes (bug 1217013)'
) or diag($test_diff);
@@ -152,10 +153,11 @@ ok(
# https://bugs.launchpad.net/percona-toolkit/+bug/1402730
# #############################################################################
$want = $sandbox_version lt '8.0' ? "$sample/simple_dupe_bug_1402730.txt" : "$sample/simple_dupe_bug_1402730_80.txt";
ok(
no_diff(
sub { pt_duplicate_key_checker::main(@args, qw(-t test.domains --verbose)) },
"$sample/simple_dupe_bug_1217013.txt", keep_output=>1),
"$want", keep_output=>1),
q[--verbose option doesn't skip dupes reporting (bug 1402730)]
) or diag($test_diff);

View File

@@ -0,0 +1,25 @@
# ########################################################################
# test.domains
# ########################################################################
# PRIMARY (`id`)
# domain (`domain`)
# unique_key_domain (`domain`)
# Uniqueness of domain ignored because unique_key_domain is a duplicate constraint
# domain is a duplicate of unique_key_domain
# Key definitions:
# UNIQUE KEY `domain` (`domain`),
# UNIQUE KEY `unique_key_domain` (`domain`)
# Column types:
# `domain` varchar(175) character set utf8 collate utf8_bin not null
# To remove this duplicate index, execute:
ALTER TABLE `test`.`domains` DROP INDEX `domain`;
# ########################################################################
# Summary of indexes
# ########################################################################
# Size Duplicate Indexes 527
# Total Duplicate Indexes 1
# Total Indexes 3

View File

@@ -0,0 +1,25 @@
# ########################################################################
# test.domains
# ########################################################################
# PRIMARY (`id`)
# domain (`domain`)
# unique_key_domain (`domain`)
# Uniqueness of domain ignored because unique_key_domain is a duplicate constraint
# domain is a duplicate of unique_key_domain
# Key definitions:
# UNIQUE KEY `domain` (`domain`),
# UNIQUE KEY `unique_key_domain` (`domain`)
# Column types:
# `domain` varchar(175) collate utf8_bin not null
# To remove this duplicate index, execute:
ALTER TABLE `test`.`domains` DROP INDEX `domain`;
# ########################################################################
# Summary of indexes
# ########################################################################
# Size Duplicate Indexes 527
# Total Duplicate Indexes 1
# Total Indexes 3

View File

@@ -0,0 +1,25 @@
# ########################################################################
# test.domains
# ########################################################################
# PRIMARY (`id`)
# domain (`domain`)
# unique_key_domain (`domain`)
# Uniqueness of domain ignored because unique_key_domain is a duplicate constraint
# domain is a duplicate of unique_key_domain
# Key definitions:
# UNIQUE KEY `domain` (`domain`),
# UNIQUE KEY `unique_key_domain` (`domain`)
# Column types:
# `domain` varchar(175) character set utf8 collate utf8_bin not null
# To remove this duplicate index, execute:
ALTER TABLE `test`.`domains` DROP INDEX `domain`;
# ########################################################################
# Summary of indexes
# ########################################################################
# Size Duplicate Indexes 527
# Total Duplicate Indexes 1
# Total Indexes 3

View File

@@ -260,7 +260,12 @@ is(
# --check-read-only
# #############################################################################
diag(`/tmp/12345/use -u root -e "GRANT ALL ON *.* TO 'bob'\@'%' IDENTIFIED BY 'msandbox'"`);
if ($sandbox_version ge '8.0') {
diag(`/tmp/12345/use -u root -e "CREATE USER 'bob'\@'%' IDENTIFIED WITH mysql_native_password BY 'msandbox'"`);
} else {
diag(`/tmp/12345/use -u root -e "CREATE USER 'bob'\@'%' IDENTIFIED BY 'msandbox'"`);
}
diag(`/tmp/12345/use -u root -e "GRANT ALL ON *.* TO 'bob'\@'%'"`);
diag(`/tmp/12345/use -u root -e "REVOKE SUPER ON *.* FROM 'bob'\@'%'"`);
if ($sandbox_version ge '8.0') {
diag(`/tmp/12345/use -u root -e "REVOKE CONNECTION_ADMIN ON *.* FROM 'bob'\@'%'"`);

View File

@@ -65,7 +65,12 @@ my $create_table_sql = <<__EOQ;
__EOQ
$sb->do_as_root('master', "$create_table_sql");
$sb->do_as_root('slave1', 'GRANT SELECT, INSERT, UPDATE, REPLICATION CLIENT ON *.* TO "unprivileged"@"localhost" IDENTIFIED BY "password"');
if ($sandbox_version ge '8.0') {
$sb->do_as_root('slave1', 'CREATE USER "unprivileged"@"localhost" IDENTIFIED WITH mysql_native_password BY "password"');
} else {
$sb->do_as_root('slave1', 'CREATE USER "unprivileged"@"localhost" IDENTIFIED BY "password"');
}
$sb->do_as_root('slave1', 'GRANT SELECT, INSERT, UPDATE, REPLICATION CLIENT ON *.* TO "unprivileged"@"localhost"');
$sb->do_as_root('slave1', "FLUSH TABLES WITH READ LOCK;");
$sb->do_as_root('slave1', "SET GLOBAL read_only = 1;");

View File

@@ -87,9 +87,13 @@ like(
"InnoDB section present"
);
my $users_count = 2;
if ($ENV{FORK} || "" eq 'mariadb') {
$users_count = 8;
}
like(
$out,
qr/Users \| 2/,
qr/Users \| $users_count/,
"Security works"
);

View File

@@ -105,7 +105,7 @@ for my $i (2..7) {
},
"t/pt-mysql-summary/samples/expected_output_temp_enc00$i.txt",
),
"--read-samples works for t/pt-mysql-summary/temp00$i",
"--read-samples works for t/pt-mysql-summary/temp_enc00$i",
) or diag($test_diff);
}
@@ -153,6 +153,8 @@ like(
"Encrypted tablespaces included in report"
) or diag $out;
$master_dbh->do("DROP TABLE IF EXISTS test.t1");
$master_dbh->do("DROP TABLE IF EXISTS test.t2");
$master_dbh->do("DROP DATABASE IF EXISTS test");
$master_dbh->do("DROP TABLESPACE foo");

View File

@@ -277,3 +277,4 @@ report-port = 12345
log-error = mysqld.log
innodb_lock_wait_timeout = 3
# Memory management library ##################################
# The End ####################################################

View File

@@ -220,3 +220,4 @@ report-port = 12345
log-error = mysqld.log
innodb_lock_wait_timeout = 3
# Memory management library ##################################
# The End ####################################################

View File

@@ -219,3 +219,4 @@ report-port = 12345
log-error = mysqld.log
innodb_lock_wait_timeout = 3
# Memory management library ##################################
# The End ####################################################

View File

@@ -292,3 +292,4 @@ report-port = 12345
log-error = mysqld.log
innodb_lock_wait_timeout = 3
# Memory management library ##################################
# The End ####################################################

View File

@@ -341,3 +341,4 @@ log_queries_not_using_indexes | OFF
# Configuration File #########################################
Config File | Cannot autodetect or find, giving up
# Memory management library ##################################
# The End ####################################################

Some files were not shown because too many files have changed in this diff Show More