Bug #10559 Invalid Auto-Generated SELECT Queries
Submitted: 11 May 2005 15:41 Modified: 20 May 2005 7:39
Reporter: Lee Saferite Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:1.1.6 OS:Windows (WinXP)
Assigned to: Vladimir Kolesnikov CPU Architecture:Any

[11 May 2005 15:41] Lee Saferite
Description:
When using the auto-generated SELECT queries you get by double-clicking a table, it is possible to recieve invalid SQL if the table name starts with a number.  I was accessing a table named '3d' and it generated the following SQL statement:

SELECT * FROM `3d` 3

How to repeat:
Create a table with a number as the first character. (Not my design, honest)
Double click on the table inside QB to auto-generate the SELECT statement.

Suggested fix:
Implement a better verification function for the auto-generated table alias.  '3' is not a valid table alias and should never be allowed.
[12 May 2005 0:59] MySQL Verification Team
Verified with 1.1.9.
[20 May 2005 7:39] Vladimir Kolesnikov
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html