PT-2340 - Support MySQL 8.4

- Removed all unneeded occuriences of the word "master" in lib
This commit is contained in:
Sveta Smirnova
2024-07-25 23:12:43 +03:00
parent e2207ea232
commit b9a5231c9b
16 changed files with 186 additions and 114 deletions

View File

@@ -468,7 +468,7 @@ sub _make_xor_slices {
return join(', ', @slices);
}
# Queries the replication table for chunks that differ from the master's data.
# Queries the replication table for chunks that differ from the source's data.
sub find_replication_differences {
my ($self, %args) = @_;
my @required_args = qw(dbh repl_table);
@@ -484,13 +484,13 @@ sub find_replication_differences {
my $sql
= "SELECT CONCAT(db, '.', tbl) AS `table`, "
. "chunk, chunk_index, lower_boundary, upper_boundary, "
. "COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, "
. "COALESCE(this_cnt-source_cnt, 0) AS cnt_diff, "
. "COALESCE("
. "this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0"
. ") AS crc_diff, this_cnt, master_cnt, this_crc, master_crc "
. "this_crc <> source_crc OR ISNULL(source_crc) <> ISNULL(this_crc), 0"
. ") AS crc_diff, this_cnt, source_cnt, this_crc, source_crc "
. "FROM $repl_table "
. "WHERE (master_cnt <> this_cnt OR master_crc <> this_crc "
. "OR ISNULL(master_crc) <> ISNULL(this_crc)) "
. "WHERE (source_cnt <> this_cnt OR source_crc <> this_crc "
. "OR ISNULL(source_crc) <> ISNULL(this_crc)) "
. ($args{where} ? " AND ($args{where})" : "");
PTDEBUG && _d($sql);
$diffs = $dbh->selectall_arrayref($sql, { Slice => {} });