<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/mariadb-git.git/sql/sql_select.cc, branch bb-10.0.22-mdev8989</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>Backport of commit 904027c820fb344343de6f68a32bcc889f2bd407 to 10.0.21</title>
<updated>2016-06-15T14:23:47+00:00</updated>
<author>
<name>Sergei Petrunia</name>
<email>psergey@askmonty.org</email>
</author>
<published>2016-06-15T14:23:47+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=b54c21d57b94248cd256305ce29a0dc1aaafb0fa'/>
<id>b54c21d57b94248cd256305ce29a0dc1aaafb0fa</id>
<content type='text'>
Commit message was:

  Merge branch 'bb-10.1-mdev8989' into 10.1

Some test results are probably not yet updated
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit message was:

  Merge branch 'bb-10.1-mdev8989' into 10.1

Some test results are probably not yet updated
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '5.5' into 10.0</title>
<updated>2015-10-09T15:12:26+00:00</updated>
<author>
<name>Sergei Golubchik</name>
<email>serg@mariadb.org</email>
</author>
<published>2015-10-09T15:12:26+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=cfeedbfd3e292f61c7da8f0a7f86307cbeeddb64'/>
<id>cfeedbfd3e292f61c7da8f0a7f86307cbeeddb64</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 'mysql/5.5' into 5.5</title>
<updated>2015-10-08T20:54:24+00:00</updated>
<author>
<name>Sergei Golubchik</name>
<email>serg@mariadb.org</email>
</author>
<published>2015-10-08T20:54:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=82e9f6d948132b71abd57d8413f97f0cc2208d82'/>
<id>82e9f6d948132b71abd57d8413f97f0cc2208d82</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MDEV-8289: Semijoin inflates number of rows in query result</title>
<updated>2015-08-18T19:54:42+00:00</updated>
<author>
<name>Sergei Petrunia</name>
<email>psergey@askmonty.org</email>
</author>
<published>2015-08-05T17:43:25+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=9b475ee3c1855c23fc716ba83a261c238d9b6f83'/>
<id>9b475ee3c1855c23fc716ba83a261c238d9b6f83</id>
<content type='text'>
- Make semi-join optimizer not to choose LooseScan
  when 1) the index is not covered and 2) full index
  scan will be required.

- Make sure that the code in make_join_select() that may change
  full index scan into a range scan is not invoked when the table
  uses full scan.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Make semi-join optimizer not to choose LooseScan
  when 1) the index is not covered and 2) full index
  scan will be required.

- Make sure that the code in make_join_select() that may change
  full index scan into a range scan is not invoked when the table
  uses full scan.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'mysql-5.1' into mysql-5.5</title>
<updated>2015-08-07T10:57:48+00:00</updated>
<author>
<name>Ajo Robert</name>
<email>ajo.robert@oracle.com</email>
</author>
<published>2015-08-07T10:57:48+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=552b1c8ab6663dd942a123cf2a8a7b31ad051a2d'/>
<id>552b1c8ab6663dd942a123cf2a8a7b31ad051a2d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Bug #20760261 mysqld crashed in materialized_cursor::</title>
<updated>2015-08-07T10:56:10+00:00</updated>
<author>
<name>Ajo Robert</name>
<email>ajo.robert@oracle.com</email>
</author>
<published>2015-08-07T10:56:10+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=f3dce250f45b3a02a30743b2c0928f8aaf132e88'/>
<id>f3dce250f45b3a02a30743b2c0928f8aaf132e88</id>
<content type='text'>
send_result_set_metadata

Analysis
--------
Cursor inside trigger accessing NEW/OLD row leads server exit.

The reason for the bug was that implementation of function
create_tmp_table() was not considering Item::TRIGGER_FIELD_ITEM
as possible alternative for type of class being instantiated.
This was resulting in a mismatch between a number of columns
in result list and temp table definition. This mismatch leads
to the failure of assertion
DBUG_ASSERT(send_result_set_metadata.elements == item_list.elements)
in the method Materialized_cursor::send_result_set_metadata
in debug mode.

Fix:
---
Added code to consider Item::TRIGGER_FIELD_ITEM as valid
type while creating fields.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
send_result_set_metadata

Analysis
--------
Cursor inside trigger accessing NEW/OLD row leads server exit.

The reason for the bug was that implementation of function
create_tmp_table() was not considering Item::TRIGGER_FIELD_ITEM
as possible alternative for type of class being instantiated.
This was resulting in a mismatch between a number of columns
in result list and temp table definition. This mismatch leads
to the failure of assertion
DBUG_ASSERT(send_result_set_metadata.elements == item_list.elements)
in the method Materialized_cursor::send_result_set_metadata
in debug mode.

Fix:
---
Added code to consider Item::TRIGGER_FIELD_ITEM as valid
type while creating fields.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'mysql-5.1' into mysql-5.5</title>
<updated>2015-08-04T06:58:56+00:00</updated>
<author>
<name>Mithun C Y</name>
<email>mithun.c.y@oracle.com</email>
</author>
<published>2015-08-04T06:58:56+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=c20911dbe05a3a38fafb55035ef440182fbd1815'/>
<id>c20911dbe05a3a38fafb55035ef440182fbd1815</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Bug #21096444: MYSQL IS TRYING TO PERFORM A CONSISTENT READ BUT THE READ VIEW IS NOT ASSIGNED!</title>
<updated>2015-08-04T06:15:02+00:00</updated>
<author>
<name>Mithun C Y</name>
<email>mithun.c.y@oracle.com</email>
</author>
<published>2015-08-04T06:15:02+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=c28626d0af640dddfb2c4d970f0ce4f6ec1776cc'/>
<id>c28626d0af640dddfb2c4d970f0ce4f6ec1776cc</id>
<content type='text'>
Issue: A select for update subquery in having clause
resulted deadlock and its transaction was rolled back
by innodb. val_XXX interfaces do not handle errors and
it do not propogate errors to its caller. sub_select
did not see this error when it called
evaluate_join_record and later made a call to innodb.
As transaction is rolled back innodb asserted.

Fix: Now evaluate_join_record checks if there is any
error reported and then return the same to its caller.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue: A select for update subquery in having clause
resulted deadlock and its transaction was rolled back
by innodb. val_XXX interfaces do not handle errors and
it do not propogate errors to its caller. sub_select
did not see this error when it called
evaluate_join_record and later made a call to innodb.
As transaction is rolled back innodb asserted.

Fix: Now evaluate_join_record checks if there is any
error reported and then return the same to its caller.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge commit '96badb16afcf' into 10.0</title>
<updated>2015-08-03T20:09:43+00:00</updated>
<author>
<name>Jan Lindström</name>
<email>jan.lindstrom@mariadb.com</email>
</author>
<published>2015-08-03T20:09:43+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=9a5787db51ef571e2beaeda1402cf7578c95eaf6'/>
<id>9a5787db51ef571e2beaeda1402cf7578c95eaf6</id>
<content type='text'>
Conflicts:
	client/mysql_upgrade.c
	mysql-test/r/func_misc.result
	mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
	mysql-test/suite/innodb/r/innodb-fk.result
	mysql-test/t/subselect_sj_mat.test
	sql/item.cc
	sql/item_func.cc
	sql/log.cc
	sql/log_event.cc
	sql/rpl_utility.cc
	sql/slave.cc
	sql/sql_class.cc
	sql/sql_class.h
	sql/sql_select.cc
	storage/innobase/dict/dict0crea.c
	storage/innobase/dict/dict0dict.c
	storage/innobase/handler/ha_innodb.cc
	storage/xtradb/dict/dict0crea.c
	storage/xtradb/dict/dict0dict.c
	storage/xtradb/handler/ha_innodb.cc
	vio/viosslfactories.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	client/mysql_upgrade.c
	mysql-test/r/func_misc.result
	mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
	mysql-test/suite/innodb/r/innodb-fk.result
	mysql-test/t/subselect_sj_mat.test
	sql/item.cc
	sql/item_func.cc
	sql/log.cc
	sql/log_event.cc
	sql/rpl_utility.cc
	sql/slave.cc
	sql/sql_class.cc
	sql/sql_class.h
	sql/sql_select.cc
	storage/innobase/dict/dict0crea.c
	storage/innobase/dict/dict0dict.c
	storage/innobase/handler/ha_innodb.cc
	storage/xtradb/dict/dict0crea.c
	storage/xtradb/dict/dict0dict.c
	storage/xtradb/handler/ha_innodb.cc
	vio/viosslfactories.c
</pre>
</div>
</content>
</entry>
<entry>
<title>Problem was that for cases like:</title>
<updated>2015-06-25T20:26:29+00:00</updated>
<author>
<name>Monty</name>
<email>monty@mariadb.org</email>
</author>
<published>2015-06-25T20:26:29+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/mariadb-git.git/commit/?id=8c815751c92313dfa45ef0398b609c9988a0a451'/>
<id>8c815751c92313dfa45ef0398b609c9988a0a451</id>
<content type='text'>
SELECT ... WHERE XX IN (SELECT YY)
this was transformed to something like:
SELECT ... WHERE IF_EXISTS(SELECT ... HAVING XX=YY)

The bug was that for normal execution XX was fixed in the original outer SELECT context while in PS it was fixed in the sub query context and this confused the optimizer.

Fixed by ensuring that XX is always fixed in the outer context.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SELECT ... WHERE XX IN (SELECT YY)
this was transformed to something like:
SELECT ... WHERE IF_EXISTS(SELECT ... HAVING XX=YY)

The bug was that for normal execution XX was fixed in the original outer SELECT context while in PS it was fixed in the sub query context and this confused the optimizer.

Fixed by ensuring that XX is always fixed in the outer context.
</pre>
</div>
</content>
</entry>
</feed>
