Closed markrui3 closed 2 years ago
We have fixed a bug in this area on Jun 9 with the commit id ba95a638bf2833adbde7925b24571d7f90537878.
Can you please re-verify this issue by pulling the latest source?
We have fixed a bug in this area on Jun 9 with the commit id ba95a63.
Can you please re-verify this issue by pulling the latest source?
Yeah, that fixed all. When will this commit get release?
This fix is available in the latest release. @markrui3 Please check and if you are OK, kind request to close this issue.
Thanks
Hi @markrui3,
We have not received further updates from you on this. Hoping that issue is resolved. We are closing the case for now. If the issue persists, you can reopen the case anytime.
Sorry for reply late, the commit is what I want, thank you
mysql_fdw with version >= 2_5_5 add GetForeignJoinPaths callback, which include a bug of infinite loop.
In this callback, function will be called in this way: mysqlGetForeignJoinPaths()->mysql_foreign_join_ok() And in mysql_foreign_join_ok, some wrong code are belows:
In my case, it is very simple. We prepare three tables called tablea, tableb, tablec. They are referenced as tablea.aid=tableb.firstid and tablec.cid=tableb.secondid. Every table has only less than 100 rows. Full sql is:
explain select count(*) from tablea a inner join tableb b on a.aid=b.firstid inner join tablec c on c.cid=b.secondid where a.deleted=0 and b.deleted=0 and c.deleted=0;
When gdb attach the process, the code logic is like this: ListA:a1->b1 ListB:c1->b1 After list_concat, the result is a1->b1->c1->b1. When iterate this list, it will loop forever, like a1->b1->c1->b1->c1->b1->c1->b1..., finally cause OOM.
I think may be not use list_concat, append every element in list into another will be better.