Bug #99409 MySQL Workbench Version 8.0 - Syntax Error in adding Index
Submitted: 30 Apr 2020 9:37 Modified: 12 May 2020 13:14
Reporter: Christopher Smit Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:8.0.19 OS:MacOS (macOS 10.15.x Catalina x86_64)
Assigned to: MySQL Verification Team CPU Architecture:Any
Tags: WBBugReporter

[30 Apr 2020 9:37] Christopher Smit
Description:
After the latest update of MySQL Workbench, it seems there is a syntax error when adding an index to a table. I have to manually edit the syntax before clicking apply as it seems workbench is adding "VISIBLE" as well as an additional semicolon  to the end of the string as displayed below:

ALTER TABLE `database_name`.`table_name` 
ADD INDEX `idx_name` (`column` ASC) VISIBLE;
;

After changing the syntax as follows, it works:

ALTER TABLE `database_name`.`table_name` 
ADD INDEX `idx_name` (`column` ASC);

How to repeat:
Create an index on a column using the MySQL Workbench 8.0.19 table editor 

Suggested fix:
To have the "VISIBLE" and semicolon removed from the generated syntax.
[12 May 2020 12:40] MySQL Verification Team
Hello Christopher Smit,

Thank you for the bug report.
To investigate further this issue at our end, may I know MySQL server version you are using? Thanks.

Regards,
Ashwini Patil
[12 May 2020 12:49] Christopher Smit
Hi Ashwini,

Below find the versions:

Live Database : 10.1.44-MariaDB-1~stretch
Local Database : 10.4.11-MariaDB

This happens on both.

Regards,
Chris
[12 May 2020 13:14] MySQL Verification Team
Thank you for the feedback. Server MariaDB isn't supported by MySQL WorkBench.