PT-2151 fix tests for pt-query-digest (#631)

* PT-2151 - Fix tests for pt-query-digest

Put fix for PT-1908 into the proper place

* PT-2151 - Fix tests for pt-query-digest

Put fix for PT-1554 into the proper place

* PT-2151 - Fix tests for pt-query-digest

Adjusted expected results for the default test t/pt-table-checksum/basics.t, so they do not depend on number of rows in the help tables

* PT-2151 - Fix tests for pt-query-digest

Added additional check for both replicas into t/pt-online-schema-change/preserve_triggers.t to avoid deadlock when ->ok() is doing CHECKSUM

* PT-2151 - Fix tests for pt-query-digest

Added delay to t/pt-table-sync/wait.t, so it waits for the child process to start lagging

* PT-2151 - Fix tests for pt-query-digest

Updated t/pt-query-digest/samples/issue_1196-output-8.0.txt, so it reflects changes in the latest 8.0

* PT-2151 - Fix tests for pt-query-digest

Updated queries against query history table, so they don't fail after e2cf183762

* PT-2151 - Fix tests for pt-query-digest

Fixed PT-813 by comparing query text. Since order itself does not matter, it is not essential to compare by the fingerprint or use any other function that changes the query.

* PT-2151 - Fix tests for pt-query-digest

Adjusted samples files which now should have consistent order after fix for PT-813

* PT-2151 - Fix tests for pt-query-digest

Fixed typo in the SELECT query in the QueryReview package

* PT-2151 - Fix tests for pt-query-digest

Fix for PT-981

* PT-2151 - Fix tests for pt-query-digest

Updated modules for pt-index-usage and fixed tests, because checksum is calculated differently after fix for PT-1554

* PT-2151 - Fix tests for pt-query-digest

Updated modules for pt-diskstats, pt-fk-error-logger, pt-heartbeat, pt-online-schema-change, pt-slave-delay, pt-slave-find, pt-table-checksum, pt-table-sync, pt-upgrade

* PT-2151 - Fix tests for pt-query-digest

Updated lib/IndexUsage.pm, so fix for pt-index-usage is in the correct place
This commit is contained in:
Sveta Smirnova
2023-06-23 15:48:21 +03:00
committed by GitHub
parent 8ef28f7cf8
commit 25c969542b
31 changed files with 603 additions and 595 deletions

View File

@@ -151,15 +151,15 @@ $rows = $dbh->selectall_arrayref("select * from mk.queries order by query_id");
is_deeply(
$rows,
[
[ "4950186562421969363",
[ "3608BDE3153F5A7544B298738912D1D3",
"select * from sakila.actor where last_name like ?",
"select * from sakila.actor where last_name like 'A%'",
],
[ "10334408417593890092",
[ "6305C691826EDFA28F6B31B3A67D952C",
"select * from sakila.actor where last_name like ? order by actor_id",
"select * from sakila.actor where last_name like 'A%' order by actor_id",
],
[ "10891801448710051322",
[ "CAF7BE5C0CBA7D07972773B5DA7295FA",
"select * from sakila.actor where actor_id>?",
"select * from sakila.actor where actor_id>10",
],
@@ -172,19 +172,19 @@ $res = $exp_plan eq '5.1' ?
# v5.1 and newer
[
[
"4950186562421969363",
"3608BDE3153F5A7544B298738912D1D3",
qw(sakila actor idx_actor_last_name),
"select * from sakila.actor where last_name like 'A%'",
1,
],
[
"10891801448710051322",
"6305C691826EDFA28F6B31B3A67D952C",
qw(sakila actor PRIMARY),
"select * from sakila.actor where actor_id>10",
2,
],
[
"10334408417593890092",
"CAF7BE5C0CBA7D07972773B5DA7295FA",
qw(sakila actor PRIMARY),
"select * from sakila.actor where last_name like 'A%' order by actor_id",
1,
@@ -194,19 +194,19 @@ $res = $exp_plan eq '5.1' ?
# v5.0 and older
[
[
"4950186562421969363",
"3608BDE3153F5A7544B298738912D1D3",
qw(sakila actor idx_actor_last_name),
"select * from sakila.actor where last_name like 'A%'",
1,
],
[
"10334408417593890092",
"6305C691826EDFA28F6B31B3A67D952C",
qw(sakila actor idx_actor_last_name),
"select * from sakila.actor where last_name like 'A%' order by actor_id",
1,
],
[
"10891801448710051322",
"CAF7BE5C0CBA7D07972773B5DA7295FA",
qw(sakila actor PRIMARY),
"select * from sakila.actor where actor_id>10",
2,
@@ -273,15 +273,16 @@ $rows = $dbh->selectall_arrayref("select * from mk.queries order by query_id");
is_deeply(
$rows,
[
[ "4950186562421969363",
[ "3608BDE3153F5A7544B298738912D1D3",
"select * from sakila.actor where last_name like ?",
"select * from sakila.actor where last_name like 'A%'",
],
[ "10334408417593890092",
[ "6305C691826EDFA28F6B31B3A67D952C",
"select * from sakila.actor where last_name like ? order by actor_id",
"select * from sakila.actor where last_name like 'A%' order by actor_id",
],
[ "10891801448710051322",
[
"CAF7BE5C0CBA7D07972773B5DA7295FA",
"select * from sakila.actor where actor_id>?",
"select * from sakila.actor where actor_id>10",
],
@@ -294,19 +295,19 @@ $res = $exp_plan eq '5.1' ?
# v5.1 and newer
[
[
"4950186562421969363",
"3608BDE3153F5A7544B298738912D1D3",
qw(sakila actor idx_actor_last_name),
"select * from sakila.actor where last_name like 'A%'",
2,
],
[
"10891801448710051322",
"6305C691826EDFA28F6B31B3A67D952C",
qw(sakila actor PRIMARY),
"select * from sakila.actor where actor_id>10",
4,
],
[
"10334408417593890092",
"CAF7BE5C0CBA7D07972773B5DA7295FA",
qw(sakila actor PRIMARY),
"select * from sakila.actor where last_name like 'A%' order by actor_id",
2,
@@ -316,19 +317,19 @@ $res = $exp_plan eq '5.1' ?
# v5.0 and older
[
[
"4950186562421969363",
"3608BDE3153F5A7544B298738912D1D3",
qw(sakila actor idx_actor_last_name),
"select * from sakila.actor where last_name like 'A%'",
2,
],
[
"10334408417593890092",
"6305C691826EDFA28F6B31B3A67D952C",
qw(sakila actor idx_actor_last_name),
"select * from sakila.actor where last_name like 'A%' order by actor_id",
2,
],
[
"10891801448710051322",
"CAF7BE5C0CBA7D07972773B5DA7295FA",
qw(sakila actor PRIMARY),
"select * from sakila.actor where actor_id>10",
4,