Bug #55867 SQL Editor isn't upward compatible
Submitted: 10 Aug 2010 0:01 Modified: 11 Aug 2010 16:11
Reporter: Janek Schumann Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.25 CE OS:Windows (Windows 7)
Assigned to: CPU Architecture:Any

[10 Aug 2010 0:01] Janek Schumann
Description:
I was trying out an example in the MySQL Server 5.5 documentation (http://dev.mysql.com/doc/refman/5.5/en/partitioning-columns-range.html) and it seems that the current version of SQL Editor is not upward compatible.

When executing the first statement of the example in SQL Editor, an error code 1064 (Syntax error) is returned. Furthermore, "COLUMNS" is highlighted as syntax error.

Statement works if executed on MySQL console though.

(BTW, those kinds of partitions are breaking the "Edit Table" functionality as well, but that's a totally different story ;-) )

How to repeat:
0. use MySQL 5.5.0-m3
1. Open SQL Editor
2. Try to execute the first statement from the example:
CREATE TABLE rcx (
        a INT,
        b INT,
        c CHAR(3),
        d INT
    )
    PARTITION BY RANGE COLUMNS(a,d,c) (
        PARTITION p0 VALUES LESS THAN (5,10,'ggg'),
        PARTITION p1 VALUES LESS THAN (10,20,'mmmm'),
        PARTITION p2 VALUES LESS THAN (15,30,'sss'),
        PARTITION p3 VALUES LESS THAN (MAXVALUE,MAXVALUE,MAXVALUE)
    );

Suggested fix:
I'm not sure if this error is returned by the server or by SQL Editor because the statement works fine on the console...

If SQL Editor is not executing statements with a syntax error (statement can't be parsed?) in the first place then how about a "execute anyway" or "execute ignoring syntax errors" functionality?
[10 Aug 2010 6:12] Susanne Ebrecht
Many thanks for writing a bug report.

MySQL Workbench is made for MySQL 5.1 and 5.0 at the moment.

MySQL server 5.5 is still in development mode.

Partition columns is a new feature from server 5.5.

We not yet implemented features from server 5.5.

I will verify this bug report as feature request.
When we implement features from 5.5 then we will look at this here again.
[10 Aug 2010 18:17] Johannes Taxacher
Bug #55891 has been created for the syntax-highlighting problem.
[11 Aug 2010 10:51] Sergei Tkachenko
Ported grammar from server v5.5.5-m3.
[11 Aug 2010 15:26] Johannes Taxacher
fix confirmed in repository
[11 Aug 2010 16:11] Tony Bedford
An entry has been added to the 5.2.27 changelog:

In the SQL Editor, executing statements designed for MySQL Server version 5.5 generated syntax errors.