Bug #61632 Missing SQL during "Apply SQL Script" force-closes Workbench
Submitted: 24 Jun 2011 15:47 Modified: 26 Aug 2011 6:58
Reporter: Mike Reid Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.34 OS:MacOS (10.6.7)
Assigned to: CPU Architecture:Any
Tags: close, force, SQL, workbench

[24 Jun 2011 15:47] Mike Reid
Description:
Empty or missing SQL in the "Apply SQL Script" window will force-close Workbench if you click "Apply".

How to repeat:
1. Open Workbench
2. Connect to server
3. Right-click and select "Create Schema..."
4. Click "Apply" button
5. DELETE SQL "CREATE SCHEMA `new_schema`;"
6. Click  "Apply" button (with no SQL present)
7. If it says "succeessful", you can can hit Go Back and click "Apply" again... Workbench will then terminate itself.

Suggested fix:
Apply SQL window could check that (valid) SQL exists or is at least not empty before executing to prevent force closing.

In the event no SQL is present, an alert box could prompt to enter some SQL, or the Apply button could also be disabled as a precaution.
[24 Jun 2011 17:49] Valeriy Kravchuk
Thank you for the bug report.
[26 Aug 2011 6:58] Philip Olson
This is fixed as of 5.2.35:

        &workbench; would crash when pressing <guimenu>Apply</guimenu>
        to an empty SQL field under the <literal>Review the SQL Script
        to be Applied to the Database</literal> form, the second time,
        after selecting <guimenu>Go Back</guimenu>.