pt-table-sync accept user variables
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
New
|
Undecided
|
Unassigned |
Bug Description
If pt-table-sync where to remove the SESSION from the SET line of any variable that began with an @ given to --set-vars would it be applied to every MySQL connection made by the tool.
The reason I ask is because user variables could be used to disable triggers and then allow pt-table-sync to bring a slave sync with a master.
Something like the following or would this require more in depth changes?
$ pt-table-sync --version
pt-table-sync 2.2.13
2375,2376c2375,2385
<
< my $sql = "SET SESSION $var=$val";
---
>
> my $setvar = "";
> if ($var =~ /^@.*/){
> PTDEBUG && _d('Not setting session as var', $var,
> 'is a user var');
> $setvar = "SET";
> } else {
> $setvar = "SET SESSION";
> }
>
> my $sql = "$setvar $var=$val";
Thanks
Andy M
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PT-1357