<div dir="ltr"><div>Hi,</div><div><br></div><div>I don't know where to address this.<br></div><div>I have tried to submit a post at <a rel="noreferrer noopener" href="https://launchpad.net/~maria-discuss" target="_blank">maria-discuss</a> following what is indicated here: <a href="https://mariadb.org/contribute/">https://mariadb.org/contribute/</a> but my post never got in without any notification back and I checked: <a href="https://lists.launchpad.net/maria-discuss/date.html">https://lists.launchpad.net/maria-discuss/date.html</a></div><div><br></div><div>The structure of the SQL query is:</div><div><br></div><div>SELECT id,a,b,c</div><div>FROM main</div><div>LEFT JOIN (SELECT id,... AS a, ... AS b, ... AS c FROM ...) AS USING (id)</div><div><br></div><div>First the result is fine without any WHERE clause.</div><div>Then adding a WHERE clause of the form 'WHERE id IN (SELECT ...)',</div><div>the columns a,b,c are correct or become all null when it should not be the case.<br></div><div>It is like suddenly the subquery result in the LEFT JOIN becomes empty.</div><div><br></div><div><div>Suspecting some optimizer troubles, I have also tried to play with the optimizer_switch variable (even switching almost everything to off) but without any success.<br></div><div><br></div><div>Same query was working well with MySQL server before Debian switched to MariaDB.<br></div><div><br></div><div>Thanks,</div><div>Patrice<br></div></div></div>