From fef02540feaba77f18a7055e97802567fa9601e6 Mon Sep 17 00:00:00 2001 From: Sveta Smirnova Date: Tue, 9 Sep 2025 16:10:45 +0300 Subject: [PATCH] PT-2346 - t/pt-table-sync/specify_column_or_index.t fails with 5.7 - Adjusted regular expression, so it is independent from randomness of the query plan calculation by EXPLAIN: we test if specified index or column used, not the range of values. --- t/pt-table-sync/specify_column_or_index.t | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/pt-table-sync/specify_column_or_index.t b/t/pt-table-sync/specify_column_or_index.t index 23ad16db..527ed32c 100644 --- a/t/pt-table-sync/specify_column_or_index.t +++ b/t/pt-table-sync/specify_column_or_index.t @@ -44,16 +44,16 @@ $output = `$trunk/bin/pt-table-sync --sync-to-source h=127.1,P=12346,u=msandbox, # and EXPLAIN does not guarantee accuracy of results. like( $output, - qr/FROM `issue_375`.`t` FORCE INDEX \(`updated_at`\) WHERE \(`updated_at` > 0 AND `updated_at` < '2009-09-05 02:\d\d:\d\d'/, + qr/FROM `issue_375`.`t` FORCE INDEX \(`updated_at`\) WHERE \(`updated_at` > 0 AND `updated_at` < '2009-09-05 \d\d:\d\d:\d\d'/, '--chunk-index', -); +) or diag($output); $output = `$trunk/bin/pt-table-sync --sync-to-source h=127.1,P=12346,u=msandbox,p=msandbox -d issue_375 --print -v -v --chunk-size 50 --chunk-column updated_at`; like( $output, - qr/FROM `issue_375`.`t` FORCE INDEX \(`updated_at`\) WHERE \(`updated_at` > 0 AND `updated_at` < '2009-09-05 02:\d\d:\d\d'/, + qr/FROM `issue_375`.`t` FORCE INDEX \(`updated_at`\) WHERE \(`updated_at` > 0 AND `updated_at` < '2009-09-05 \d\d:\d\d:\d\d'/, '--chunk-column', -); +) or diag($output); # ############################################################################# # Done.