pt-query-digest is not escaping the ` char
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
In Progress
|
Medium
|
Carlos Salguero |
Bug Description
pt-query-digest is not escaping the mysql char ` and thus failing to perform some operations like the submodule EXPLAIN
Example:
sudo tcpdump -s 65535 -x -nn -q -tttt -i any -c 10000 port 3306 | pt-query-digest --type tcpdump --explain u=root,h=127.0.0.1
# EXPLAIN failed: DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`yp' at line 1 [for Statement "USE `yp at /usr/bin/
This is the function:
sub quote {
my ( $self, @vals ) = @_;
foreach my $val ( @vals ) {
$val =~ s/`/``/g;
}
return join('.', map { '`' . $_ . '`' } @vals);
}
pt version: 2.2.16
MySQL: Percona Server 5.6.27-75.0-log
Changed in percona-toolkit: | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Frank Cizmich (frank-cizmich) |
milestone: | none → 2.2.17 |
Changed in percona-toolkit: | |
milestone: | 2.2.17 → 2.2.18 |
Changed in percona-toolkit: | |
milestone: | 2.2.18 → 2.2.19 |
Changed in percona-toolkit: | |
milestone: | 2.2.19 → 2.2.20 |
Changed in percona-toolkit: | |
assignee: | Frank Cizmich (frank-cizmich) → Carlos Salguero (carlos-salguero) |
Changed in percona-toolkit: | |
milestone: | 2.2.20 → 2.2.21 |
Changed in percona-toolkit: | |
milestone: | 2.2.21 → 3.0.2 |
Changed in percona-toolkit: | |
milestone: | 3.0.2 → none |
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PT-700