LP #1583283: `pt-fingerprint --query` returns non-zero on success

Description

**Reported in Launchpad by Jordan Raine last update 18-05-2016 17:51:31

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.

Environment

None

Smart Checklist

Activity

Show:

Lalit Choudhary January 24, 2019 at 4:38 PM

Thank you for the report.

Details

Assignee

Reporter

Priority

Affects versions

Smart Checklist

Created January 24, 2018 at 9:05 PM
Updated March 4, 2024 at 4:41 PM