Bug #87851 MySQL Workbench crashes when using USE prior to SELECT
Submitted: 23 Sep 2017 23:19 Modified: 24 Sep 2017 1:16
Reporter: Cameron Landers Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:6.3 OS:Windows (Windows 10)
Assigned to: CPU Architecture:Any
Tags: MySQL, SELECT, Use, workbench

[23 Sep 2017 23:19] Cameron Landers
Description:
With the target schema and table selected, simply typing a separate USE statement prior to a SELECT statement cases a fatal crash of MySQL Workbench. 

To be clear, specifying the query like this causes the crash: 

USE my_database_name;
SELECT * FROM my_table_name;

... whereas specifying the query like this works perfectly:

SELECT * FROM my_database_name.my_table_name;

While the second method provides a work-around, this bug has significant impact when testing existing queries, stored procedures, views, etc. that include the USE syntax, because you have to rewrite them to use the simplified syntax. That's a non-starter for companies that have hundreds or even thousands of stored procedures and queries already in production.

This a solid failure here on several Windows 10 platforms, and does not happen on any of our Ubuntu platforms.

How to repeat:
MySQL Workbench version 6.3 on Windows 10

Our Windows platforms are Windows 10 Pro build 10.0.14393
I do not have any other versions of Windows, so I can't test other versions. 

Run any simple query that specifies a USE prior to the SELECT:

USE my_database_name;
SELECT * FROM my_table_name;

Suggested fix:
Investigate why this is happening on Windows 10. Determine whether reproduces for you. If you can't reproduce it, please let me know - that would call into question the specific installations of Workbench on our windows boxes.

I have just a small lab here, so can't test on more than a few machines.
[24 Sep 2017 1:01] MySQL Verification Team
use and select

Attachment: crash_use_select_bug.png (image/png, text), 120.15 KiB.

[24 Sep 2017 1:01] MySQL Verification Team
use and select

Attachment: crash_use_select_bug.png (image/png, text), 120.15 KiB.

[24 Sep 2017 1:02] MySQL Verification Team
Thank you for the bug report. I couldn't repeat with version 6.3.9 on Windows 10 Pro.
[24 Sep 2017 1:09] Cameron Landers
OK thanks Miguel. We will reinstall our Workbench instances and retest.
[24 Sep 2017 1:16] Cameron Landers
To be thorough, the build of Workbench we have on our Windows platforms is:

6.3.7 build 1199 CE Community Edition