Description
The optimizer can omitON conditions of joins in query plans, causing incorrect results. The bug has only been observed when queries contained 4 or more joins, but it is possible that queries with fewer joins could be affected.
The bug is present in CockroachDB v20.2, v21.1, and v21.2.
This issue is fixed in and v21.2.7.

