JOIN problem
Michael Ribbons <[email protected]> Tue, 28 Nov 2006 20:49:30 +1100
| Newsgroups | gmane.comp.db.mysql.bugs |
|---|---|
| Message-ID | <[email protected]> |
--_3e7fd670-c78e-45a9-9c1f-431065554429_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, not sure if this is a bug or a feature added with the changes for neste= d JOINs,=20 this code works fine under 4.0.24, but 2nd last query fails under 5.0.26. =20 Please observe the following sql: =20 CREATE DATABASE DB_JOIN_TEST;USE DB_JOIN_TEST; CREATE TABLE ta ( ta_id int default 0 );CREATE TABLE tb ( tb_id int defa= ult 0 );CREATE TABLE tc ( tc_id int default 0 ); =20 SELECT ta.* FROM ta LEFT JOIN tb ON tb.tb_id =3D ta.ta_id; SELECT ta.* FROM ta, tc LEFT JOIN tb ON tb.tb_id =3D ta.ta_id; ERROR 1054 (42S22): Unknown column 'ta.ta_id' in 'on clause' SELECT ta.* FROM tc, ta LEFT JOIN tb ON tb.tb_id =3D ta.ta_id; =20 DROP DATABASE DB_JOIN TEST; =20 My problem is that a more complicated version of this bug exists in product= ion software where it's not possible to change the FROM clause to put ta ne= xt to JOIN (if that's what is actually solving the error....) =20 =20 Regards _________________________________________________________________ Be one of the first to try Windows Live Mail. http://ideas.live.com/programpage.aspx?versionId=3D5d21c51a-b161-4314-9b0e-= 4911fb2b2e6d= --_3e7fd670-c78e-45a9-9c1f-431065554429_--