diff options
author | Varun Gupta <varun.gupta@mariadb.com> | 2018-07-25 14:20:16 +0530 |
---|---|---|
committer | Varun Gupta <varun.gupta@mariadb.com> | 2018-07-25 14:20:16 +0530 |
commit | f9b43c2565284feefe94e4feaa4c02bf25a6f921 (patch) | |
tree | 8b0bb0d21bbf70431b4f1b70e3a5ea42e4e20b66 /sql/opt_subselect.cc | |
parent | d567f1611e27a17427380e9aae67939792f68ad1 (diff) | |
download | mariadb-git-f9b43c2565284feefe94e4feaa4c02bf25a6f921.tar.gz |
MDEV-16751: Server crashes in st_join_table::cleanup or TABLE_LIST::is_with_table_recursive_reference
with join_cache_level>2
During muliple equality propagation for a query in which we have an IN subquery, the items in the select list of the
subquery may not be part of the multiple equality because there might be another occurence of the same field in the
where clause of the subquery.
So we keyuse_is_valid_for_access_in_chosen_plan function which expects the items in the select list of the subquery to
be same to the ones in the multiple equality (through these multiple equalities we create keyuse array).
The solution would be that we expect the same field not the same Item because when we have SEMI JOIN MATERIALIZATION SCAN,
we use copy back technique to copies back the materialised table fields to the original fields of the base tables.
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r-- | sql/opt_subselect.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index 14b2aaee591..783e3d4d22f 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -815,6 +815,9 @@ int check_and_do_in_subquery_rewrites(JOIN *join) details) * require that compared columns have exactly the same type. This is a temporary measure to avoid BUG#36752-type problems. + + JOIN_TAB::keyuse_is_valid_for_access_in_chosen_plan expects that for Semi Join Materialization + Scan all the items in the select list of the IN Subquery are of the type Item::FIELD_ITEM. */ static |