Bug #16043 SQL query is trimmed at the end
Submitted: 28 Dec 2005 15:15 Modified: 2 Jan 2006 18:20
Reporter: Ondra Zizka Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.1.18 OS:Windows (Windows XP)
Assigned to: MySQL Verification Team CPU Architecture:Any

[28 Dec 2005 15:15] Ondra Zizka
Description:
This SQL query is trimmed:

SELECT zb.*, dr.nazev AS dr_nazev, ft.id AS ft_id, ft.fname AS ft_fname
		FROM bece_zbozi AS zb
		LEFT JOIN bece_dr AS dr ON zb.dr = dr.id
		LEFT JOIN bece_fotky AS ft ON zb.id = ft.item

Seems like last two characters are being cut, as adding any two chars (including \r\n) makes it work.

How to repeat:
Connect to a 5.0 server,

enter this as a query:

"SELECT zb.*, dr.nazev AS dr_nazev, ft.id AS ft_id, ft.fname AS ft_fname
		FROM bece_zbozi AS zb
		LEFT JOIN bece_dr AS dr ON zb.dr = dr.id
		LEFT JOIN bece_fotky AS ft ON zb.id = ft.item"

(note the tabs!) and now Ctrl+Enter.

Returned error: "Unknown column 'ft.it' in 'on clause' "

Suggested fix:
...
[28 Dec 2005 15:20] Ondra Zizka
Ah, I forgot that you need my database to repeat the bug with this SQL... but you can debug it and see what's being sent to MySQL server, and I guess you will see it that way.
[28 Dec 2005 19:00] MySQL Verification Team
This isn't a Query Browser bug, instead it is an error message launched by the
server. There are several bugs reports about the unknown column error due
to the join syntax's changes since version 5.0.12. Please see:

http://dev.mysql.com/doc/refman/5.0/en/join.html
[2 Jan 2006 18:20] Ondra Zizka
I think it is a Query Browser bug; I used MySQL 4 with this, and when I did the same query in mysql console, it was ok. Please read the bug report once more. Notice the very end of the query and the end of error message. I am sure this is a bug of Query Browser. Unfortunately I can't repeat the bug now, but several other problems with tabs and lines not terminated by "\n" appears now instead.