Bug #94393 In shell, when MySQL errors occur, the pager shows up empty
Submitted: 19 Feb 2019 14:00 Modified: 28 May 2019 9:49
Reporter: Kristian Hole Email Updates:
Status: Closed Impact on me:
Category:Shell General / Core Client Severity:S3 (Non-critical)
Version:8.0.15 OS:Ubuntu
Assigned to: CPU Architecture:x86 (x86_64)
Tags: error, pager, shell

[19 Feb 2019 14:00] Kristian Hole
In MySQL shell when using a pager, such as "less", MySQL errors are hidden by the pager displaying an empty page. When quitting the pager the error message becomes visible.

How to repeat:
1. Open connection to MySQL instance using MySQL shell in SQL mode:
    mysqlsh --uri root@localhost --port 13000 --sql
2. Execute a query targeting a table (without selecting a database)
3. Empty pager pops up, and error can be seen only by quitting the pager.

Suggested fix:
- Either display the error message in the pager itself
- or don't invoke the pager at all, and simply display the error like it's done now.
[26 Feb 2019 11:52] MySQL Verification Team
Thanks for the report. Verified as described.

all best
[28 May 2019 9:49] Margaret Fisher
Posted by developer:
Changelog entry added for MySQL Shell 8.0.17:

In SQL mode, when MySQL Shell was configured to use an external pager tool to display output, the pager was invoked whether or not the query result was valid. For an invalid query, this resulted in the pager displaying an empty page, and the error message was only visible after quitting the pager. The pager tool is now only invoked when a query returns a valid result, otherwise the error message is displayed.