Bug #8133 master-detail view doesn't "quote" char parameters properly in SQL query
Submitted: 25 Jan 2005 14:57 Modified: 25 Jan 2005 19:55
Reporter: M Cook Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.1.5 OS:Windows (win2k)
Assigned to: CPU Architecture:Any

[25 Jan 2005 14:57] M Cook
Description:
Situation: the master and detail table both have a char(5) field. The query works fine if the value in the master table is '99284' or '93970' but when it is 'G0001' we get an "Unknown column 'G0001' in 'where clause'" error message. 

When I look at the query (from the process list at the server) it appears that the data is not being "quoted" in the query sent by the Query Browser, even though the field is char(5) and therefore the data should be string. Or at least when I construct a similar query with the data in single quotes, the query works better.

Server is 4.0.23-standard-log, on a separate Linux box.

How to repeat:
The above steps have worked on several tables with similar data -- most of the data in the char(5) field looks numeric, but several rows contain alphabetic characters.

Suggested fix:
Maybe make sure queries on char fields use quotes around data?
[25 Jan 2005 19:55] MySQL Verification Team
Seems it's duplicate for #7499
[25 Jan 2005 20:50] M Cook
7499 references a bug in 1.1.4 on suse, which I can't replicate on my (windows) 1.1.4 or 1.1.5 versions at all, so I figured it applied to something else. 

7499 doesn't seem to make any reference to Master/Detail, which (the detail side, with the automatic parameter thing) is the only place this error occurs for me. If this has been fixed in the next version, in response to 7499 or not, that's great. I'm just skeptical that the problem described in 7499 is the same as what I am seeing. 

I'd pull the latest out of cvs, to see if it is really fixed, but I don't have the windows tools for compiling it myself. 

I guess I'll just have to wait for the next version. Thanks.