Bug #13409 Master Detial queries do not work
Submitted: 22 Sep 2005 19:33 Modified: 28 Sep 2005 10:37
Reporter: Graeme Melia Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:1.1.14 OS:Windows (Win XP SP2)
Assigned to: CPU Architecture:Any

[22 Sep 2005 19:33] Graeme Melia
Description:
Master detail queries do not work.  After splitting the tab and typing in a new detial query using the : symbol, the browser does not display a list of the available parameters.  

The parameters are displayed on the Params tab in the window to the bottom right.

Executing the query results in one of two error messages about sql syntax or complaining about a missing column which is actually the parameter.  For example using the world database as shown in the documentation the data in the country code is being used as a column name rather then a piece of data to be used as the filter.

I have used MySQL version 4.1.14 and 5.0.12-beta
Query browser 1.1.14
Windows XP Pro SP2

How to repeat:
Create the master detail query as shown in the browser documentation but use countrycode in place of country in the detail query (documentation needs correcting)
[22 Sep 2005 23:20] Jorge del Conde
Thanks for your bug report.
[28 Sep 2005 10:37] Michael G. Zinner
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/
[28 Sep 2005 21:38] Graeme Melia
I have installed 1.1.15 and I get the same error.  I had trouble installing 1.1.15 as the installer appeared to complete successfully but when I rand the browser the version was still 1.1.14.  I deleted all the files in the browser folder and reinstalled 1.1.15, so I don't know if anything has been written outside the browser folder that has not been updated.  They parameter appears to be updating correctly as the error message is regenreated when the focus is changed in the master query.  One new bug is the box conting the quey somtins is cleared and then the master query complains of trying to run an empty string.  This probably needs a new error number raising.
[28 Sep 2005 22:00] Michael G. Zinner
Ok, this is actually a bug in the docs. The auto completion of master-detail parameters was removed about a year ago when we exchanged the editor component because the old one did not support unicode. In QB 2.0 we will change it once again and get auto-completion back and also nice features like code folding for SPs.

You can use drag'n'drop from the parameter palette instead. One important fact is, that the : has to be right before the variable and not to be separated with a space.

SELECT * FROM city c
WHERE ID = :ID

There was another master-detail bug fixed which prevented it to work so I closed this bug but I did not think about the auto completion.

The bug with the lost of the SQL query when switching tabsheets was already reported and is already fixed in the source repository. The fix will be in the next release.
[14 Oct 2005 23:27] Lee Peatross
I just installed 1.1.15 and it still has this same "Master-Detail" bug.  
I can drag it from parameters or I can type it out and I get the same 1054 error.
When I highlight each choice in the 'master' query result side it updates the error on the 'detail' side to reflect whatever field is highlighted.
 "unknown column 'CSC' in 'where clause'"
 "unknown column 'DMA' in 'where clause'"
etc. etc.

using Windows XP SP2
MySQL 4.1.10-nt