summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2019-06-09 10:39:52 -0700
committerIgor Babaev <igor@askmonty.org>2019-06-09 11:11:20 -0700
commit6db2ebbb2a63994ef2b43d42a11dbacb8b55c207 (patch)
treefc55afe9175f623626b8b938b6dd753e7682beb6 /libmysql
parent6660c072ada63847e0284026598f65f1e6d6bb2e (diff)
downloadmariadb-git-6db2ebbb2a63994ef2b43d42a11dbacb8b55c207.tar.gz
MDEV-19580 Unrelated JOINs corrupt usage of 'WHERE function() IN (subquery)'
Handling of top level conjuncts in WHERE whose used_tables() contained RAND_TABLE_BIT in the function make_join_select() was incorrect. As a result if such a conjunct referred to fields non of which belonged to the last joined table it was pushed twice. (This could be seen for a test case from subselect.test whose output was changed after this patch had been applied. In 10.1 when running EXPLAIN FORMAT=JSON for the query from this test case we clearly see that one of the conjuncts is pushed twice.) This fact by itself was not good. Besides, if such a conjunct was pushed to a table that was the result of materialization of a semi-join the query could return a wrong result set. In particular we could watch it for queries with semi-join subqueries whose left parts used stored functions without "deterministic' specifier.
Diffstat (limited to 'libmysql')
0 files changed, 0 insertions, 0 deletions