pt-table-sync performs case sensitive match for mariadb

Description

Creating bug on behalf of user from forums: https://forums.percona.com/t/pt-table-sync-unitialized-value-in-concatenation-error/36710/3?u=matthewb

[root@host1 ~]# pt-table-sync --execute --databases=my_database --sync-to-source host1 Use of uninitialized value in concatenation (.) or string at /usr/bin/pt-table-sync line 7086. [root@host1 ~]# pt-table-sync --version pt-table-sync 3.7.0

I added some debugging printouts, and it appears the problem is that it’s looking for source_host and source_port in $source, but these don’t exist; instead master_host and master_port are present. But the ($vp lt ‘8.1’ || $vp->flavor() =~ m/maria/) test is returning false.

Looks like that’s because flavor() returns “MariaDB Server”, which doesn’t match because the test is case sensitive. Changing to m/maria/i fixes that. There are several other places throughout the script where the same check for MariaDB is done (maybe it would be better for it just to be checked once and saved?) so I needed to update all of them.

Environment

None

Activity

Show:

Details

Assignee

Reporter

Priority

Components

Affects versions

Fix versions

Needs QA

Yes

Smart Checklist

Created February 15, 2025 at 4:00 PM
Updated February 15, 2025 at 7:08 PM