Bug #91102 Terminal Background Color is not Reset on Windows when Clearing the Terminal
Submitted: 1 Jun 2018 10:47 Modified: 17 Sep 2018 11:28
Reporter: Mikiya Okuno Email Updates:
Status: Closed Impact on me:
None 
Category:Shell General / Core Client Severity:S3 (Non-critical)
Version:8.0.11 OS:Windows (Windows 10)
Assigned to: CPU Architecture:Any

[1 Jun 2018 10:47] Mikiya Okuno
Description:
Terminal color remains on terminal when the terminal is cleared using Ctrl-L.

How to repeat:
* Open MySQL Shell 8.0.11 on Windows.
* Input several lines.
* Clear the terminal using Ctrl-L.

You can see the background color of prompts remain on the terminal. See the attachments.

Note that the first attempt of Ctrl-L may successfully clear background color. However, it will not from the second attempt.

Suggested fix:
The easiest way to fix the problem is to run "cls" command upon clear. The current implementation of "clear" functionality in mysqlsh is somewhat different from Windows native cls. IMHO, some special handling is required on Windows.
[1 Jun 2018 10:51] MySQL Verification Team
A screenshot before clearing the terminal.

Attachment: screenshot-before-clear.png (image/png, text), 40.29 KiB.

[1 Jun 2018 10:51] MySQL Verification Team
A screenshot after clearing the terminal.

Attachment: screenshot-after-clear.png (image/png, text), 16.10 KiB.

[1 Jun 2018 10:52] MySQL Verification Team
The alternative fix is to stop using colored prompt on Windows.
[17 Sep 2018 11:23] Margaret Fisher
Posted by developer:
 
Changelog entry added for MySQL Shell 8.0.13:

On the Windows platform, the background color was not reset in the MySQL Shell window when the terminal was cleared using Ctrl+L .