XOR conditions are not optimized, and Item_cond_xor therefore
acts like type Func_item even though it inherits from Item_cond.
A subtle difference between Item_func and Item_cond is that
you can get the children Items from the former by calling
arguments(), and from the latter by calling argument_list().
However, since Item_cond_xor inherits from Item_cond,
arguments() did not return any Items.
The fact that Item_cond_xor::arguments() did not return it's
children items lead to a problem for make_cond_for_index();
the method accepted that XOR items on unindexed columns were
pushed using ICP. ICP evaluation of non-indexed columns
does not (and should not) work.
The fix for this bug is to make Item_cond_xor return it's
children items when the arguments() method is used. This makes
Item_cond_xor behave more like Item_func and in turn allows
make_cond_for_index() to discover any conflicting children
Items.
This is a temporary fix and should be removed when Item_cond_xor
is optimized.
- Do call update_used_tables() for new conditions obtained when adding
outer join's triggered conditions. Correct values of used_tables() are
now needed for condition pushdown.
- Update test results
mysql-test/suite/pbxt/r/join_outer.result:
DS-MRR backport:
- Update test results
sql/sql_select.cc:
DS-MRR backport: fix buildbot valgrind failures:
- Do call update_used_tables() for new conditions obtained when adding
outer join's triggered conditions. Correct values of used_tables() are
now needed for condition pushdown.
- Add opt_range_mrr.cc file into source repo
mysql-test/r/myisam_mrr.result:
Make testcase work for both debug and release
mysql-test/t/myisam_mrr.test:
Make testcase work for both debug and release
sql/Makefile.am:
- Add opt_range_mrr.cc file into source repo
- Make index condition pushdown be controlled by an @@optimizer_switch flag,
not by @@engine_condition_pushdown
- Make MRR buffer size be controlled by @@mrr_buffer_size, not
by @@read_rnd_buffer_size
- Move parts of code to separate files
- Code cleanup
- Add --sorted_result to some SELECTs in tests.
- Fix PBXT test results (PBXT doesn't support MRR or ICP, but we get result
diffs because we've also backported a fix that
- prints out "Using where" when the table has part of WHERE that it has
got from LEFT JOIN's ON expression
- Does a better job at removing equalities that are guaranteed to be true
by use of ref acccess.
WL#2474 "Multi Range Read: Change the default MRR implementation to implement new MRR interface"
WL#2475 "Batched range read functions for MyISAM/InnoDb"
"Index condition pushdown for MyISAM/InnoDB"
- Adjust test results (checked)
- Code cleanup.
WL#2474 "Multi Range Read: Change the default MRR implementation to implement new MRR interface"
WL#2475 "Batched range read functions for MyISAM/InnoDb"
"Index condition pushdown for MyISAM/InnoDB"
- Fix valgrind failures
WL#2474 "Multi Range Read: Change the default MRR implementation to implement new MRR interface"
WL#2475 "Batched range read functions for MyISAM/InnoDb"
"Index condition pushdown for MyISAM/InnoDB"
Igor's fix from sp1r-igor@olga.mysql.com-20080330055902-07614:
There could be observed the following problems:
1. EXPLAIN did not mention pushdown conditions from on expressions in the
'extra' column. As a result if a query had no where conditions pushed
down to a table, but had on conditions pushed to this table the 'extra'
column in the EXPLAIN for the table missed 'using where'.
2. Conditions for ref access were not eliminated from on expressions
though such conditions were eliminated from the where condition.
sql/sql_show.cc:
Change decimal item to type holder, to be able to define the decimals and max_length for the DECIMAL
field from the schema specification instead of the value of the item.
sql/mysqld.cc:
Explicit type casting required by windows x64 compiler.
storage/xtradb/include/srv0srv.h:
Parameters should be declared as ulong.
storage/xtradb/srv/srv0srv.c:
Parameters should be declared as ulong.