Description:
There was a bug for a similar problem(#13832) but it was with a different version. I'm not so sure this problem has been completely resolved, but I've tried it with the suggested patch and I still have the error.
I have a Mysql 4.0.25 Database where the following works:
select * from
TaskStatus as ts,
Task as t,
Repository as r,
Source as s,
SourceType as st,
TaskType as tt,
Media as m,
Shipment as p,
MediaType as mt
LEFT JOIN Task_TaskStatus AS tts ON (tts.taskStatusID = 125.0) AND (tts.taskID=t.ID) WHERE r.ID=t.repositoryID AND m.mediaTypeID = mt.ID and tt.ID=t.taskTypeID and m.ID=t.mediaID and m.shipmentID=p.ID and s.ID=t.sourceID and s.sourceTypeID=st.ID and ts.ID=t.taskStatusID and t.ID IN (14965, 14966, 14967, -1) and t.isDel=0 and t.ID<>1 and r.caseID=2106 limit 1;
In 5.0.15 running this same query gives me this error:
ERROR 1054 (42S22): Unknown column 't.ID' in 'on clause'
I have tried building from source with the patch specified in this article as well as with the LATEST Bitkeeper Source (as of 11/17/05) and this select still throws the Error 1054. Any ideas?
How to repeat:
This query works on 4.0.25, not 5.0.15. Same data. InnoDB. I'm not sure how else to explain it.
select * from
TaskStatus as ts,
Task as t,
Repository as r,
Source as s,
SourceType as st,
TaskType as tt,
Media as m,
Shipment as p,
MediaType as mt
LEFT JOIN Task_TaskStatus AS tts ON (tts.taskStatusID = 125.0) AND (tts.taskID=t.ID) WHERE r.ID=t.repositoryID AND m.mediaTypeID = mt.ID and tt.ID=t.taskTypeID and m.ID=t.mediaID and m.shipmentID=p.ID and s.ID=t.sourceID and s.sourceTypeID=st.ID and ts.ID=t.taskStatusID and t.ID IN (14965, 14966, 14967, -1) and t.isDel=0 and t.ID<>1 and r.caseID=2106 limit 1;