<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/mariadb-git.git/sql/opt_subselect.cc, branch bb-10.2gr</title>
<subtitle>github.com: MariaDB/server.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/'/>
<entry>
<title>Merge 10.1 into 10.2</title>
<updated>2018-08-02T05:19:57+00:00</updated>
<author>
<name>Marko Mäkelä</name>
<email>marko.makela@mariadb.com</email>
</author>
<published>2018-08-02T05:19:57+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=ef3070e997a6e90c8eadaa833dc47324c2167bb4'/>
<id>ef3070e997a6e90c8eadaa833dc47324c2167bb4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '10.0' into 10.1</title>
<updated>2018-07-31T09:58:29+00:00</updated>
<author>
<name>Oleksandr Byelkin</name>
<email>sanja@mariadb.com</email>
</author>
<published>2018-07-31T09:58:29+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=865e807125d1d3fb2d784ea33f1154ba999466ec'/>
<id>865e807125d1d3fb2d784ea33f1154ba999466ec</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge 5.5 into 10.0</title>
<updated>2018-07-30T12:09:25+00:00</updated>
<author>
<name>Marko Mäkelä</name>
<email>marko.makela@mariadb.com</email>
</author>
<published>2018-07-30T12:09:25+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=91181b225c574f65720b9ecf218a4122209a7248'/>
<id>91181b225c574f65720b9ecf218a4122209a7248</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-15454: Nested SELECT IN returns wrong results</title>
<updated>2018-07-25T15:51:27+00:00</updated>
<author>
<name>Varun Gupta</name>
<email>varunraiko1803@gmail.com</email>
</author>
<published>2018-07-25T15:47:50+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=37dee22d27c55c14f0be7005c3e5bdbb09e1fc92'/>
<id>37dee22d27c55c14f0be7005c3e5bdbb09e1fc92</id>
<content type='text'>
In this case we are setting the field Item_func_eq::in_eqaulity_no for the semi-join equalities.
This helps us to remove these equalites as the inner tables are not available during parent select execution
while the outer tables are not available during materialization phase.
We only have it set for the equalites for the fields involved with the IN subquery
and reset it for the equalities which do not belong to the IN subquery.

For example in case of nested IN subqueries:

    SELECT t1.a FROM t1 WHERE t1.a IN
      (SELECT t2.a FROM t2 where t2.b IN
          (select t3.b from t3 where t3.c=27 ))

there are two equalites involving the fields of the IN subquery

1) t2.b = t3.b :  the field Item_func_eq::in_eqaulity_no is set when we merge the grandchild select into the child select
2) t1.a = t2.a :  the field Item_func_eq::in_eqaulity_no is set when we merge the child select into the parent select

But when we perform case 2) we should ensure that we reset the equalities in the child's WHERE clause.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In this case we are setting the field Item_func_eq::in_eqaulity_no for the semi-join equalities.
This helps us to remove these equalites as the inner tables are not available during parent select execution
while the outer tables are not available during materialization phase.
We only have it set for the equalites for the fields involved with the IN subquery
and reset it for the equalities which do not belong to the IN subquery.

For example in case of nested IN subqueries:

    SELECT t1.a FROM t1 WHERE t1.a IN
      (SELECT t2.a FROM t2 where t2.b IN
          (select t3.b from t3 where t3.c=27 ))

there are two equalites involving the fields of the IN subquery

1) t2.b = t3.b :  the field Item_func_eq::in_eqaulity_no is set when we merge the grandchild select into the child select
2) t1.a = t2.a :  the field Item_func_eq::in_eqaulity_no is set when we merge the child select into the parent select

But when we perform case 2) we should ensure that we reset the equalities in the child's WHERE clause.
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-16751: Server crashes in st_join_table::cleanup or TABLE_LIST::is_with_table_recursive_reference</title>
<updated>2018-07-25T08:50:16+00:00</updated>
<author>
<name>Varun Gupta</name>
<email>varun.gupta@mariadb.com</email>
</author>
<published>2018-07-25T08:50:16+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=f9b43c2565284feefe94e4feaa4c02bf25a6f921'/>
<id>f9b43c2565284feefe94e4feaa4c02bf25a6f921</id>
<content type='text'>
            with join_cache_level&gt;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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
            with join_cache_level&gt;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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '10.0' into bb-10.1-merge</title>
<updated>2018-07-19T10:55:54+00:00</updated>
<author>
<name>Oleksandr Byelkin</name>
<email>sanja@mariadb.com</email>
</author>
<published>2018-07-19T10:55:54+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=0896d7ebc3698f898bd66544bbc0ba6e4a4fbe0e'/>
<id>0896d7ebc3698f898bd66544bbc0ba6e4a4fbe0e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '5.5' into bb-10.0-merge</title>
<updated>2018-07-17T14:56:21+00:00</updated>
<author>
<name>Oleksandr Byelkin</name>
<email>sanja@mariadb.com</email>
</author>
<published>2018-07-17T14:56:21+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=e5c26fdfab3d43ad2b0524a3bf29f59f6fab37d8'/>
<id>e5c26fdfab3d43ad2b0524a3bf29f59f6fab37d8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-15982: Incorrect results when subquery is materialized</title>
<updated>2018-07-11T07:43:38+00:00</updated>
<author>
<name>Sergei Petrunia</name>
<email>psergey@askmonty.org</email>
</author>
<published>2018-07-11T07:43:38+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=2fbf2277ffec86d69f793534da7043b6dd540780'/>
<id>2fbf2277ffec86d69f793534da7043b6dd540780</id>
<content type='text'>
fix_semijoin_strategies_for_picked_join_order() should set
join-&gt;sjm_lookup_tables to be a bitmap of tables inside
SJ-Materialization-Lookup nests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fix_semijoin_strategies_for_picked_join_order() should set
join-&gt;sjm_lookup_tables to be a bitmap of tables inside
SJ-Materialization-Lookup nests.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '10.1' into 10.2</title>
<updated>2018-06-21T21:47:39+00:00</updated>
<author>
<name>Sergei Golubchik</name>
<email>serg@mariadb.org</email>
</author>
<published>2018-06-21T21:47:39+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=b942aa34c10ddfa3fe4977ae60afed5cbdc51083'/>
<id>b942aa34c10ddfa3fe4977ae60afed5cbdc51083</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'origin/10.0' into 10.1</title>
<updated>2018-06-19T10:04:53+00:00</updated>
<author>
<name>Alexander Barkov</name>
<email>bar@mariadb.com</email>
</author>
<published>2018-06-19T10:04:53+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=f5b128dfad1f46bf73916bc9c803a7152fdd6809'/>
<id>f5b128dfad1f46bf73916bc9c803a7152fdd6809</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
