Bug #20410 Unknown column 'xxx' in field list
Submitted: 12 Jun 2006 23:40 Modified: 14 Jun 2006 9:25
Reporter: Mike Christen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.22 OS:MacOS (OS-X)
Assigned to: CPU Architecture:Any

[12 Jun 2006 23:40] Mike Christen
Description:
On a simple query, running from C, I keep getting "Unknown column 'xxx' in field list" if the result is NULL.

If there is a result the query works.

4.x never did this.

I see lots of examples of the bug on the web, no fixes seem to work.

Please advise.

How to repeat:
SELECT COL1, COL2, COL3 FROM TABLE WHERE COL1 = 'X'
[13 Jun 2006 12:50] Valeriy Kravchuk
Thank you for a problem report. Please, send complete test case, with CREATE TABLE, INSERTs with some data, and a real code of your C application.
[13 Jun 2006 17:21] Michael Christen
Sorry -- Please close this case -- my prg. was looping back on NULL result to rerun after rewriting the query (incorrectly)... NULL result works OK -- my requery method was writing incorrect SQL in some conditions -- problem resolved.  Thanks.
[14 Jun 2006 9:25] Valeriy Kravchuk
Closed as not a bug in MySQL code.