<div dir="ltr"><div>Hi,</div><div><br></div><div>More on that, I switched today one system (Ubuntu) to use mysql-server-8.0 (8.0.21-1) and this does not happen.</div><div>I will try also on my Debian Sid laptop.</div><div>My production system is running Debian Buster 10.6 with a MariaDB server having this trouble.<br></div><div>It seems that there is a discrepancy between MySQL and MariaDB server on such queries.</div><div>How to address this?<br></div><div><br></div><div>Thanks,</div><div>Patrice<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 2 nov. 2020 à 13:48, Patrice Duroux <<a href="mailto:patrice.duroux@gmail.com">patrice.duroux@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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/" target="_blank">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" target="_blank">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>
</blockquote></div>