Bug #42859 Wrong SQL created by MySQL Query Browser
Submitted: 14 Feb 2009 15:42 Modified: 17 Feb 2009 12:06
Reporter: Steen Rabol Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Query Browser Severity:S1 (Critical)
Version:1.2.15 OS:Windows (Vista 64Bit)
Assigned to: CPU Architecture:Any

[14 Feb 2009 15:42] Steen Rabol
Description:
The sql created by the query browser is wrong

CREATE TABLE `rgk`.`formselemets` (
  `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  `formid` Id NOT NULL,
  `name` VARCHAR(45) NOT NULL,
  `label` VARCHAR(45) NOT NULL,
  `type` INTEGER UNSIGNED NOT NULL,
  `mandetory` INTEGER UNSIGNED NOT NULL,
  `columns` INTEGER UNSIGNED NOT NULL,
  `rows` INTEGER UNSIGNED NOT NULL,
  `css` VARCHAR(45) NOT NULL,
  PRIMARY KEY (`id`)
)

How to repeat:
Open the query browser
create a new table that look like the above SQL

Suggested fix:
Make correct SQL or a better check of column names or whatever the problem is.
[14 Feb 2009 21:53] MySQL Verification Team
Thank you for the bug report. Could you please try the newest version 1.2.16 and comment here the results. Thanks in advance.
[14 Feb 2009 22:22] Steen Rabol
Sorry, same result with version 1.2.16,

The error messages is:

MySQL Error Number 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 'Id NOT NULL, `name` VARCHAR(45) NOT NULL, `label` VARCHAR(45) NOT NULL, ' at line 3

I think the 'problem' is that the data type is Id, which is an invalid type for a column - Id as a datatype was entered by mistake the first time.
[15 Feb 2009 12:12] Valeriy Kravchuk
Indeed, Query Browser should NOT allow user to use some unknown data type like "Id" when creating table (or, at least, should warn user immediately that type is unknown).
[17 Feb 2009 11:39] Susanne Ebrecht
Many thanks for writing a bug report. We won't fix validation checks.
We are on the way to implement full functionality of MySQL Query Browser into MySQL Workbench and validation check is already avaiable in MySQL Workbench SE.
[17 Feb 2009 11:47] Steen Rabol
I might be a good idea to communicate what kind of bugs you will fix e.g somewhere on your web site.

I feel a little stupid, spending time downloading new releases just to figure out that you don't want to fix a specific type of bug.

I assume that you will publish - or can direct me to - some kind of documentation of known and won't fix bugs ?
[17 Feb 2009 12:06] Steen Rabol
I have just donloaded/installed workbench 5.0.29 OSS, and I'm NOT impressed.

It's not straight forward to connect to an existing db and do simple queries or db operations.

Now.. Using the Mysql Administartor have the same effect - Wrong SQL, does that mean that you also don't wabt to fix MySQL Administrator ?

Maybe it's time to switch db backend....