Bug #24454 MySQL Administration tool does not prevent incorrect SQL scripts to be created
Submitted: 21 Nov 2006 8:32 Modified: 21 Dec 2006 17:40
Reporter: [ name withheld ] Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.2.4rc (bundled with MySQL 4.1.12) OS:Linux (RHEL 4.0 Upd2 X86(EM64T/AMD64))
Assigned to: CPU Architecture:Any
Tags: Administration, incorrect, scripts, SQL

[21 Nov 2006 8:32] [ name withheld ]
Description:
MySQL Administration tool does not prevent user from making choices and selections that would result in a a schema manipulation SQL script that, if submitted to MySQL server 4.1.12, will not be accepted.

It would be more appropriate that the use of the MySQL Administration interface inherently guarantees that the user operation always result in a legal SQL schema manipulation script!

For example, it is allowed by the GUI to create a table where the primary key is a VARCHAR with NO specified length, which the server (at least in InnoDB mode) will reject as illegal. Or it is allowed to create a primary key field of VARCHAR(65535) type, which again will be rejected by the server.

How to repeat:
Open MySQL Administration tool.
Create a new table.
Create a new field of VARCHAR or VARCHAR(65535) or TEXT type, and set this column to primary key in the created table.

Suggested fix:
Make sure the MySQL interface knows what is legal and what is not with the database engine, and _prevent_ errors rather than letting the user to make illegal choices, which will be rejected by the server, forcing the user to backtrack, read documentation to find an explanation (sometimes the database errors are even incorrect - for example when you select a VARCHAR(65535) field as a primary key), correct the settings, and retry.
[21 Nov 2006 17:40] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version of MySQL Administrator, 1.2.5 rc (in GUI Tools 5.0r5), and inform about the results.
[22 Dec 2006 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".