Bug #26736 Query browser constructs invalid sql: select * from table.column
Submitted: 28 Feb 2007 21:31 Modified: 15 Oct 2009 8:02
Reporter: Martin Friebe (Gold Quality Contributor) (OCA) Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:1.2.17 OS:Windows (Windows XP)
Assigned to: CPU Architecture:Any
Tags: CHECKED, qc

[28 Feb 2007 21:31] Martin Friebe
Description:
Using the advanced toolbar, the query browser can set various mouse-modes to define what part of the query a click on the schema will add to.

If you set the mouse to "order by" or "group by"..., you can select columns from the schema, but you will not be able to select a table (after all you cannot sort by a table)
 The problem is this limitation (column only) applies to all mouse modes.

If you select the "from" mouse mode, and then click a column (within a table from the current query), the *column* is added to the from clause

How to repeat:
- start query browser
- double click a table (t1), your sql will be
SELECT * FROM t1 t;
- click the "from clause mouse cursor"
- click on the arrow before t1, to open the column view
- click (single click) on a column (a)
 the sql
SELECT * FROM t1 t, t.`a`;

This is invalid SQL

- single click on a table => nothing will happen

Suggested fix:
if the mouse is in FROM mode, clicks on a column should be ignored.

instead clicks on a table should add the table to the existing from list.

This is from the help page:
--
The next panel contains the query building buttons. You can use these buttons to build a query visually by clicking on the tables and columns that you wish to involve in your query, using specialized mouse pointers to indicate which part of the query the different fields and tables occupy.
--

It includes the possibility of including tables
[28 Feb 2007 23:03] MySQL Verification Team
Thank you for the bug report.
[15 Oct 2009 8:02] Susanne Ebrecht
Many thanks for writing a bug report. We are on the way to implement full functionality of MySQL Query Browser into MySQL Workbench. We won't fix this anymore.

More informations about MySQL Workbench you will find here:

http://dev.mysql.com/workbench/