Bug #76578 error on alter table
Submitted: 2 Apr 2015 10:23 Modified: 16 May 2015 2:18
Reporter: Liang Xue Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:6.2.5, 6.3.2 OS:Windows (Microsoft Windows 8.1 China)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[2 Apr 2015 10:23] Liang Xue
Description:
18:13:24 [ERR][  GRTDispatcher]: exception in grt execute_task, continuing: Exception: There was an error while applying the SQL script to the database.
18:13:24 [ERR][  GRTDispatcher]: worker: task 'wizard task' has failed with error:.There was an error while applying the SQL script to the database.
18:16:37 [INF][  TableEditorBE]: Creating stub schema and table game_dev.game for foreign key
18:16:52 [INF][  TableEditorBE]: Creating stub schema and table game_dev.player for foreign key

How to repeat:
1,create table with any comment
2,alter table, delete table comment,click btn "apply", error.(workbeanch create a wrong sql to alter table)

[my english not well....]

Suggested fix:
esay, just create a right sql~~~_~
[2 Apr 2015 13:35] MySQL Verification Team
Please provide the script to create and alter table. Thanks.
[3 Apr 2015 3:23] Liang Xue
repeat

Attachment: 1.png (image/png, text), 45.44 KiB.

[3 Apr 2015 3:25] Liang Xue
workbench create a bad sql to alter table comment

Attachment: 2.png (image/png, text), 44.88 KiB.

[3 Apr 2015 3:31] Liang Xue
show exception

Attachment: 3.png (image/png, text), 55.52 KiB.

[6 Apr 2015 11:10] MySQL Verification Team
Thank you for the feedback.
Confirmed this issue with WB 6.3.2 on Win7.

Thanks,
Umesh
[6 Apr 2015 11:11] MySQL Verification Team
## How to repeat

-- create sample table under test schema
use test;
create table t(id int not null primary key, name varchar(25) not null) COMMENT 'this is test';

-- alter table from schema navigation ( right click on table t -> Alter table
-- Remove comments, and click apply

Executing:
ALTER TABLE `test`.`t` 

COMMENT =  ;

ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
SQL Statement:
ALTER TABLE `test`.`t` 

COMMENT =

Operation failed: There was an error while applying the SQL script to the database.
[16 May 2015 2:18] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 6.3.4 release, and here's the changelog entry:

        Executing (applying) an Alter Table operation after deleting a
        table comment would not execute the query, as the generated SQL
        contained "COMMENT =;" instead of "COMMENT = '';".

Thank you for the bug report.