Bug #66453 MySQL Workbench Scripting lets you open a non-supported file type
Submitted: 19 Aug 2012 6:07 Modified: 11 Feb 2014 8:56
Reporter: Michael McLaughlin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S4 (Feature request)
Version:5.2.42 OS:Any
Assigned to: CPU Architecture:Any
Tags: MySQL Workbench Scripting Feature

[19 Aug 2012 6:07] Michael McLaughlin
Description:
SQL Editor, Scripting, Open Script should have a file chooser that restricts files to .py (Python) or .lua (Lua). At present, it raises an exception dialog that has no Cancel button. Therefore, a user can open a .sql file, which then triggers a disablement of several buttons.

All this code is unnecessary if you only let the user open supported files. 

How to repeat:
Here's a screen shot of the dialog box without a cancel option:

http://blog.mclaughlinsoftware.com/wp-content/uploads/2012/08/MySQLWBOpenScript02.png

Here's a screen shot showing the lighting bolt disabled because a .sql file was opened rather than a .py or .lau file.

http://blog.mclaughlinsoftware.com/wp-content/uploads/2012/08/MySQLWBOpenScript03.png

Suggested fix:
Change the behavior one of two ways:

1. Limit the file chooser to only .py or .lau file types.
2. Provide a Cancel button to skip loading an unsupported file type.
[19 Aug 2012 6:57] Valeriy Kravchuk
Thank you for the problem report.
[11 Feb 2014 8:56] Philip Olson
Fixed as of the upcoming MySQL Workbench 6.1.2 release, and here's the changelog entry:

The "Scripting" file chooser would generate an exception (without an
option to cancel) when an unsupported file type was selected. A new
"Cancel" button was added to this dialog.

Thank you for the bug report.