Commit graph

15 commits

Author SHA1 Message Date
Sergey Petrunya
6765cc3017 # No BUG#, a case brought from 5.2's innodb_mysql_lock.test
- Fix a crash in nested semi-join subquery processing
2010-10-18 12:55:26 +04:00
Sergey Petrunya
7b95a6f745 Post-merge test result fixes part#1 (checked) 2010-10-12 22:48:49 +03:00
unknown
d6a9b52269 Fixed LP BUG#615760: Check on double cache assignment added into the transformation methods.
Cache parameters print added in EXPLAIN EXTENDED output.

mysql-test/r/compare.result:
  Cache parameters print added in EXPLAIN EXTENDED output.
mysql-test/r/group_by.result:
  Cache parameters print added in EXPLAIN EXTENDED output.
mysql-test/r/subselect.result:
  Cache parameters print added in EXPLAIN EXTENDED output.
mysql-test/r/subselect3.result:
  Cache parameters print added in EXPLAIN EXTENDED output.
mysql-test/r/subselect3_jcl6.result:
  Cache parameters print added in EXPLAIN EXTENDED output.
mysql-test/r/subselect4.result:
  Cache parameters print added in EXPLAIN EXTENDED output.
mysql-test/r/subselect_cache.result:
  Added test suite for LP BUG#615760
mysql-test/r/subselect_mat.result:
  Cache parameters print added in EXPLAIN EXTENDED output.
mysql-test/r/subselect_no_mat.result:
  Cache parameters print added in EXPLAIN EXTENDED output.
mysql-test/r/subselect_no_opts.result:
  Cache parameters print added in EXPLAIN EXTENDED output.
mysql-test/r/subselect_no_semijoin.result:
  Cache parameters print added in EXPLAIN EXTENDED output.
mysql-test/r/subselect_sj.result:
  Cache parameters print added in EXPLAIN EXTENDED output.
mysql-test/r/subselect_sj_jcl6.result:
  Cache parameters print added in EXPLAIN EXTENDED output.
mysql-test/suite/pbxt/r/subselect.result:
  Cache parameters print added in EXPLAIN EXTENDED output.
mysql-test/t/subselect_cache.test:
  Cache parameters print added in EXPLAIN EXTENDED output.
sql/item.cc:
  Item::set_expr_cache result fixed according to its description.
  
  Cache parameters print added in EXPLAIN EXTENDED output.
sql/item.h:
  Cache parameters print added in EXPLAIN EXTENDED output.
sql/item_cmpfunc.cc:
  Check on double cache assignment added into the transformation methods.
sql/item_cmpfunc.h:
  Check on double cache assignment added into the transformation methods.
sql/item_subselect.cc:
  Check on double cache assignment added into the transformation methods.
sql/item_subselect.h:
  Check on double cache assignment added into the transformation methods.
sql/sql_expression_cache.cc:
  Cache parameters print added.
sql/sql_expression_cache.h:
  Cache parameters print added.
sql/sql_select.cc:
  Removed unused method (now it is impossible to make double transformation with the cache).
sql/sql_select.h:
  Removed unused method.
2010-09-06 15:34:24 +03:00
unknown
97199ad56d LP BUG#615752 fix. Expression cache added to EXPLAIN EXTENDED output.
mysql-test/r/compare.result:
  Expression cache added to EXPLAIN EXTENDED output.
mysql-test/r/explain.result:
  Expression cache added to EXPLAIN EXTENDED output.
mysql-test/r/group_by.result:
  Expression cache added to EXPLAIN EXTENDED output.
mysql-test/r/subselect.result:
  Expression cache added to EXPLAIN EXTENDED output.
mysql-test/r/subselect3.result:
  Expression cache added to EXPLAIN EXTENDED output.
mysql-test/r/subselect3_jcl6.result:
  Expression cache added to EXPLAIN EXTENDED output.
mysql-test/r/subselect4.result:
  Expression cache added to EXPLAIN EXTENDED output.
mysql-test/r/subselect_mat.result:
  Expression cache added to EXPLAIN EXTENDED output.
mysql-test/r/subselect_no_mat.result:
  Expression cache added to EXPLAIN EXTENDED output.
mysql-test/r/subselect_no_opts.result:
  Expression cache added to EXPLAIN EXTENDED output.
mysql-test/r/subselect_no_semijoin.result:
  Expression cache added to EXPLAIN EXTENDED output.
mysql-test/r/subselect_sj.result:
  Expression cache added to EXPLAIN EXTENDED output.
mysql-test/r/subselect_sj_jcl6.result:
  Expression cache added to EXPLAIN EXTENDED output.
sql/item.h:
  Expression cache added to EXPLAIN EXTENDED output.
2010-08-31 16:16:10 +03:00
Sergey Petrunya
13058d8056 Fix @@optimizer_switch support
- Let "mysqld  --help --verbose" list all optimizer options
- Make it possible to add new @@optimizer_switch flags w/o causing .result 
  changes all over the testsuite:
  = Remove "select @@optimizer_switch" from tests that do not need all switches
  = Move @@optimizer_switch-specific tests to t/optimizer_switch.test
2010-07-16 12:58:24 +04:00
unknown
ceb5468fd8 Subquery cache (MWL#66) added.
libmysqld/Makefile.am:
  The new file added.
mysql-test/r/index_merge_myisam.result:
  subquery_cache optimization option added.
mysql-test/r/myisam_mrr.result:
  subquery_cache optimization option added.
mysql-test/r/subquery_cache.result:
  The subquery cache tests added.
mysql-test/r/subselect3.result:
  Subquery cache switched off to avoid changing read statistics.
mysql-test/r/subselect3_jcl6.result:
  Subquery cache switched off to avoid changing read statistics.
mysql-test/r/subselect_no_mat.result:
  subquery_cache optimization option added.
mysql-test/r/subselect_no_opts.result:
  subquery_cache optimization option added.
mysql-test/r/subselect_no_semijoin.result:
  subquery_cache optimization option added.
mysql-test/r/subselect_sj.result:
  subquery_cache optimization option added.
mysql-test/r/subselect_sj_jcl6.result:
  subquery_cache optimization option added.
mysql-test/t/subquery_cache.test:
  The subquery cache tests added.
mysql-test/t/subselect3.test:
  Subquery cache switched off to avoid changing read statistics.
sql/CMakeLists.txt:
  The new file added.
sql/Makefile.am:
  The new files added.
sql/item.cc:
  Expression cache item (Item_cache_wrapper) added.
  Item_ref and Item_field fixed for correct usage of result field and fast resolwing in SP.
sql/item.h:
  Expression cache item (Item_cache_wrapper) added.
  Item_ref and Item_field fixed for correct usage of result field and fast resolwing in SP.
sql/item_cmpfunc.cc:
  Subquery cache added.
sql/item_cmpfunc.h:
  Subquery cache added.
sql/item_subselect.cc:
  Subquery cache added.
sql/item_subselect.h:
  Subquery cache added.
sql/item_sum.cc:
  Registration of subquery parameters added.
sql/mysql_priv.h:
  subquery_cache optimization option added.
sql/mysqld.cc:
  subquery_cache optimization option added.
sql/opt_range.cc:
  Fix due to subquery cache.
sql/opt_subselect.cc:
  Parameters of the function cahnged.
sql/procedure.h:
  .h file guard added.
sql/sql_base.cc:
  Registration of subquery parameters added.
sql/sql_class.cc:
  Option to allow add indeces to temporary table.
sql/sql_class.h:
  Item iterators added.
  Option to allow add indeces to temporary table.
sql/sql_expression_cache.cc:
  Expression cache for caching subqueries added.
sql/sql_expression_cache.h:
  Expression cache for caching subqueries added.
sql/sql_lex.cc:
  Registration of subquery parameters added.
sql/sql_lex.h:
  Registration of subqueries and subquery parameters added.
sql/sql_select.cc:
  Subquery cache added.
sql/sql_select.h:
  Subquery cache added.
sql/sql_union.cc:
  A new parameter to the function added.
sql/sql_update.cc:
  A new parameter to the function added.
sql/table.cc:
  Procedures to manage temporarty tables index added.
sql/table.h:
  Procedures to manage temporarty tables index added.
storage/maria/ha_maria.cc:
  Fix of handler to allow destoy a table in case of error during the table creation.
storage/maria/ha_maria.h:
  .h file guard added.
storage/myisam/ha_myisam.cc:
  Fix of handler to allow destoy a table in case of error during the table creation.
2010-07-10 13:37:30 +03:00
Sergey Petrunya
222a826f5b Post-merge fixes: Update test results. The differences in QEPs are because
5.3 had 

 handler::index_only_read_time(uint keynr, double records)

while 5.2 got:

 handler::keyread_read_time(uint index, uint ranges, ha_rows rows)

which causes floor()'ing of rows parameter, which makes all further costs different.
2010-06-26 23:11:45 +04:00
Sergey Petrunya
27f9fc063c MariaDB 5.2 -> MariaDB 5.3 merge 2010-06-26 14:05:41 +04:00
Sergey Petrunya
7df026676b Merge MariaDB-5.2 -> MariaDB 5.3 2010-03-20 15:01:47 +03:00
unknown
3d2a74609a MWL#68 Subquery optimization: Efficient NOT IN execution with NULLs
This patch does three things:
- It adds the possibility to force the execution of top-level [NOT] IN
  subquery predicates via the IN=>EXISTS transformation. This is done by
  setting both optimizer switches partial_match_rowid_merge and
  partial_match_table_scan to "off".
- It adjusts all test cases where the complete optimizer_switch is
  selected because now we have two more switches.
- For those test cases where the plan changes because of the new available
  strategies, we switch off both partial match strategies in order to
  force the "old" IN=>EXISTS strategy. This is done because most of these
  test cases specifically test bugs in this strategy.

sql/opt_subselect.cc:
  Adds the possibility to force the execution of top-level [NOT] IN
  subquery predicates via the IN=>EXISTS transformation. This is done by
  setting both optimizer switches partial_match_rowid_merge and
  partial_match_table_scan to "off".
2010-03-11 23:43:31 +02:00
Sergey Petrunya
3ffa889184 Fix buildbot failure: take into account that there is no optimizer_switch flag
for table elimination in debug builds.
2010-02-21 09:33:54 +02:00
Sergey Petrunya
d63959eed3 Subquery optimizations backport: fix test failures, update test results. 2010-02-18 00:59:41 +03:00
Sergey Petrunya
663773aa8c Subquery backport:
- More test results updates (checked)
2010-02-17 13:47:55 +03:00
Sergey Petrunya
085e8b6935 Subquery optimizations, backport to 5.3:
- Fix valgrind failure
- Test result fixes (not finished)
2010-01-17 23:52:20 +03:00
Sergey Petrunya
b83cb52e9e Backport of subquery optimizations to 5.3.
There are still test failures because of:
- Wrong query results in outer join + semi join
- EXPLAIN output differences
2010-01-17 17:51:10 +03:00