← Back to team overview

maria-discuss team mailing list archive

Query failure after minor upgrade 10.1.38 to 10.1.41

 

Hi Guys,

We are experiencing a break in backward compatibility with the lastest
10.1 release which got publied on the debian/stretch release.

Queries that worked before suddenly spit errors about unknown column.

It seems to be related to the use of "inner join" without on/using
clause and left join and 'extra table':

    SELECT * FROM t1, t2 INNER JOIN t3 LEFT JOIN t4 ON t4.id = t3.id_t5
WHERE t3.id = t2.id_t3 AND t1.id = X

will give: ERROR 1054 (42S22): Unknown column 't1.id' in 'where clause'


Adding parenthesis around the join:

    SELECT * FROM t1, ( t2 INNER JOIN t3 LEFT JOIN t4 ON t4.id =
t3.id_t5 ) WHERE t3.id = t2.id_t3 AND t1.id = X

or adding an "on" clause on the inner join seem to fix the issue

    SELECT * FROM t1, t2 INNER JOIN ON t3.id = t2.id_t3 t3 LEFT JOIN t4
ON t4.id = t3.id_t5 WHERE t1.id = X


Weirdly enough it's impossible to have a Left join without on/using
clause, while the parser let us write an inner join without.


I cannot find a related note in the changelogs ..


-- 
Benoit Plessis		<benoit@xxxxxxxxxxxx>	+33 6 77 42 78 32
4096R/44E6FA9A 486D 2804 3EAB 3D74 5D05  826D 997F 26D9 44E6 FA9A