Bug #62775 MySQL Workbench SQL Editor incorrectly highlights 'type' and 'types' as reserved
Submitted: 17 Oct 2011 17:29 Modified: 9 Feb 2012 0:07
Reporter: Ken Johnson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.35 CE Rev 7915 OS:Windows (Win 7 Professional 64 bit)
Assigned to: CPU Architecture:Any
Tags: editor, reserved, reserved keywords, reserved word, reserved words, SQL, sql editor, type, types

[17 Oct 2011 17:29] Ken Johnson
Description:
When using the SQL Editor in MySQL Workbench the words 'type' and 'types' are highlighted as reserved words, when they are not reserved at all.

Reserved word list: http://dev.mysql.com/doc/refman/5.6/en/reserved-words.html)

This was reported prior/during the consolidation of all the tools into workbench and was closed without fix because of said consolidation.

Above bug mentioned: http://bugs.mysql.com/bug.php?id=47819)

I double checked that no bug reports were filed for this in any status in the bug list for the SQL Editor.

How to repeat:
Borrowing and adding to the previous bug report to cover both words:

DROP DATABASE IF EXISTS db_test;
CREATE DATABASE db_test;

USE db_test;

CREATE TABLE tbl
(
  type CHAR(3),
  types CHAR(3),
  num INT(4)
);

INSERT INTO tbl(type, types, num) VALUES('abc','def',1234);

Suggested fix:
Remove 'type' and 'types' as highlighted words in the SQL Editor.
[17 Oct 2011 17:44] Valeriy Kravchuk
Please, check with a newer version, 5.2.35. I do not see this problem in it (on Mac OS X).
[17 Oct 2011 19:20] Ken Johnson
Downloaded and installed 5.2.35 CE, Revision 7915.

Still having the same issue. Both 'type' and 'types' are highlighted as reserved words.
[21 Oct 2011 21:31] Ken Johnson
I have also found that 'name' is highlighted as a reserved word when it isn't. I am adding it here rather than submit a new bug.
[9 Feb 2012 0:07] Philip Olson
Fixed as of 5.2.38:

Workbench would highlight the MySQL 5.6 reserved words
"name", "type", and "types"

A new bug report exists to handle the not-yet-released MySQL 5.6+ reserved words.