`pt-fingerprint --query` returns non-zero on success

Bug #1583283 reported by Jordan Raine
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
New
Undecided
Unassigned

Bug Description

When running pt-fingerprint with a single query using the --query option, the exit status is 1 instead of 0.

```
$ pt-fingerprint --query "SELECT * FROM users WHERE id = 1"
select * from users where id = ?
$ echo $?
1
```

This is not the case when the query is piped to the command:

```
$ echo "SELECT * FROM users WHERE id = 1" | pt-fingerprint
select * from users where id = ?
$ echo $?
0
```

Additional information:

```
$ pt-fingerprint --version
pt-fingerprint 2.2.16
$ mysql --version
mysql Ver 14.14 Distrib 5.6.24-72.2, for osx10.10 (x86_64) using EditLine wrappe
```

There was no output to STDERR.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1348

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.