Commit graph

54 commits

Author SHA1 Message Date
unknown
59784abead Fix LP bug lp:802979
Analysis:
This bug consists of two related problems that are
result of too early evaluation of single-row subqueries
during the optimization phase of the outer query.

Several optimizer code paths try to evaluate single-row
subqueries in order to produce a constant and use that
constant for further optimzation.

When the execution of the subquery peforms destructive
changes to the representation of the subquery, and these
changes are not anticipated by the subsequent optimization
phases of the outer query, we tipically get a crash or
failed assert.

Specifically, in this bug the inner-most suqbuery with
DISTINCT triggers a substitution of the original JOIN
object by a single-table JOIN object with a temp table
needed to perform the DISTINCT operation (created by
JOIN::make_simple_join).

This substitution breaks EXPLAIN because:
a) in the first example JOIN::cleanup no longer can
reach the original table of the innermost subquery, and
close all indexes, and
b) in this second test query, EXPLAIN attempts to print
the name of the internal temp table, and crashes because
the temp table has no name (NULL pointer instead).

Solution:
a) fully disable subquery evaluation during optimization
in all cases - both for constant propagation and range
optimization, and
b) change JOIN::join_free() to perform cleanup irrespective
of EXPLAIN or not.
2011-07-04 14:51:16 +03:00
Igor Babaev
db0c340601 Fixed LP bug #793436.
When looking for the execution plan of a derived table to be materialized
JOIN::optimize finds  out that all joined tables of the derived table
contain not more than one row then the derived table should be maretialized
at the optimization stage.
Added a test case for the bug.
Adjusted results in other test cases.
2011-06-06 12:19:35 -07:00
Igor Babaev
f03a3ee54f Merged the code of mwl 106 into the latest 5.3 with mwl 90 pushed.
Resolved all conflicts and failures.
2011-06-04 19:56:06 -07:00
Michael Widenius
2894d50e3e automatic merge with 5.3 2011-05-28 05:58:16 +03:00
Michael Widenius
f197991f41 Merge with 5.1-microseconds
A lot of small fixes and new test cases.

client/mysqlbinlog.cc:
  Cast removed
client/mysqltest.cc:
  Added missing DBUG_RETURN
include/my_pthread.h:
  set_timespec_time_nsec() now only takes one argument
mysql-test/t/date_formats.test:
  Remove --disable_ps_protocl as now also ps supports microseconds
mysys/my_uuid.c:
  Changed to use my_interval_timer() instead of my_getsystime()
mysys/waiting_threads.c:
  Changed to use my_hrtime()
sql/field.h:
  Added bool special_const_compare() for fields that may convert values before compare (like year)
sql/field_conv.cc:
  Added test to get optimal copying of identical temporal values.
sql/item.cc:
  Return that item_int is equal if it's positive, even if unsigned flag is different.
  Fixed Item_cache_str::save_in_field() to have identical null check as other similar functions
  Added proper NULL check to Item_cache_int::save_in_field()
sql/item_cmpfunc.cc:
  Don't call convert_constant_item() if there is nothing that is worth converting.
  Simplified test when years should be converted
sql/item_sum.cc:
  Mark cache values in Item_sum_hybrid as not constants to ensure they are not replaced by other cache values in compare_datetime()
sql/item_timefunc.cc:
  Changed sec_to_time() to take a my_decimal argument to ensure we don't loose any sub seconds.
  Added Item_temporal_func::get_time() (This simplifies some things)
sql/mysql_priv.h:
  Added Lazy_string_decimal()
sql/mysqld.cc:
  Added my_decimal constants max_seconds_for_time_type, time_second_part_factor
sql/table.cc:
  Changed expr_arena to be of type CONVENTIONAL_EXECUTION to ensure that we don't loose any items that are created by fix_fields()
sql/tztime.cc:
  TIME_to_gmt_sec() now sets *in_dst_time_gap in case of errors
  This is needed to be able to detect if timestamp is 0
storage/maria/lockman.c:
  Changed from my_getsystime() to set_timespec_time_nsec()
storage/maria/ma_loghandler.c:
  Changed from my_getsystime() to my_hrtime()
storage/maria/ma_recovery.c:
  Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/maria/unittest/trnman-t.c:
  Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/xtradb/handler/ha_innodb.cc:
  Added support for new time,datetime and timestamp
unittest/mysys/thr_template.c:
  my_getsystime() -> my_interval_timer()
unittest/mysys/waiting_threads-t.c:
  my_getsystime() -> my_interval_timer()
2011-05-28 05:11:32 +03:00
Igor Babaev
89cf840cd9 Merge 2011-05-20 12:47:39 -07:00
unknown
c22045aa59 MWL#89 - automatic merge with 5.3 2011-05-17 14:56:02 +03:00
Igor Babaev
704f97035f Merged the code of MWL#106 into 5.3
Resolved all conflicts, bad merges and fixed a few minor bugs in the code.
Commented out the queries from multi_update, view, subselect_sj, func_str,
derived_view, view_grant that failed either with crashes in ps-protocol or
with wrong results.
The failures are clear indications of some bugs in the code and these bugs
are to be fixed.
2011-05-16 22:39:43 -07:00
unknown
4a9c027ad8 Fix LP BUG#778413
Analysis:
The subquery is evaluated first during ref-optimization of the outer
query because the subquery is considered constant from the perspective
of the outer query. Thus an attempt is made to evaluate the MAX subquery
and use the new constant to drive an index nested loops join.
During this evaluation the inner-most subquery replaces the JOIN_TAB
with a new one that fetches the data from a temp table.
The function select_describe crashes at the lines:
        TABLE_LIST *real_table= table->pos_in_table_list; 
	item_list.push_back(new Item_string(real_table->alias,
					    strlen(real_table->alias),
					    cs));
because 'table' is a temp table, and it has no corresponding table
reference. This 'real_table' is NULL, and real_table->alias results
in a crash.

Solution:
In the spirit of MWL#89 prevent the evaluation of expensive predicates
during optimization. This patch prevents the evaluation of expensive
predicates during ref optimization.


sql/item_subselect.h:
  Remove unused class member. Not needed for the fix, but noticed now and removed.
2011-05-17 00:00:11 +03:00
Michael Widenius
8543621fa0 Merge with 5.3 main 2011-05-16 15:07:04 +03:00
unknown
8840823369 Automatic merge with MWL148 2011-05-12 01:02:55 +03:00
Sergey Petrunya
0a5026b057 Merge fix for BUG#779885 2011-05-11 08:52:16 +01:00
Sergey Petrunya
30575353b6 BUG#779885: Crash in eliminate_item_equal with materialization=on in maria-5.3
- In eliminate_item_equal(), we could end up in a situation where:
  = The multiple equality has a constant C1 (and so it is the "head item")
  = The join order was such that we've generated "sj_inner_table1=C1" equality,
    and now are looking to generate "sj_inner_table2_=..." equality. 
  When looking for what should be the other member of equality, we run

      Item *head_item= current_sjm? current_sjm_head: head;
  
  which sees current_sjm!=NULL, and takes current_sjm_head (which is NULL because 
  the constant C1 is the head for all cases).

- Fixed in a trivial way: take current_sjm_head if we don't have constant.
2011-05-10 21:59:51 +01:00
Michael Widenius
f34be18938 Merge with MariaDB 5.2 2011-05-10 18:17:43 +03:00
Oleksandr Byelkin
f9b3f94b5d Merge 2011-05-06 14:45:47 +03:00
unknown
f48784754a MWL#89
Adjusted test results after merge.
2011-05-05 01:35:03 +03:00
unknown
879f25dc64 MWL#89
Merge with main 5.3
2011-05-05 00:35:21 +03:00
Igor Babaev
e3e2358fd2 Fixed LP bug #751350.
The third parameter in the call of make_cond_for_table() that
built the pushed condition containing only outer references
was incorrect. This condition appeared for the first time in
the patch fixing bug 729039.
2011-05-04 11:23:29 -07:00
Oleksandr Byelkin
7b797fe66d Moving max/min optimization from prepare to optimization phase. MWL#148
mysql-test/r/explain.result:
  fixed results (new item)
mysql-test/r/subselect.result:
  fixed results (new item)
mysql-test/r/subselect_no_mat.result:
  fixed results (new item)
mysql-test/r/subselect_no_opts.result:
  fixed results (new item)
mysql-test/r/subselect_no_semijoin.result:
  Fixed results (new item)
mysql-test/suite/pbxt/r/subselect.result:
  Fixed results (new item)
mysql-test/t/explain.test:
  Fixed results (correct behaviour)
sql/item_cmpfunc.cc:
  Pass through  for max/min
sql/item_subselect.cc:
  moving max/min
sql/item_subselect.h:
  moving max/min
sql/mysql_priv.h:
  new uncacheble flags added
sql/opt_subselect.cc:
  maxmin moved.
sql/opt_subselect.h:
  New function for maxmin.
sql/sql_class.h:
  debug code
sql/sql_lex.cc:
  Fixed flags.
  Limit setting fixed.
sql/sql_lex.h:
  2 new flags.
sql/sql_select.cc:
  Prepare divided on 2 function to be able recollect some info after transformation.
sql/sql_select.h:
  Prepare divided on 2 functions.
2011-05-04 18:08:58 +03:00
unknown
5dc11616b2 MWL#89
Merge with 5.3
2011-05-02 21:59:16 +03:00
unknown
43acceeb47 Fix LP BUG#715069
Analysis:
The wrong result is a consquence of sorting the subquery
result and then selecting only the first row due to the
artificial LIMIT 1 introduced by the fix_fields phase.
Normally, if there is an ORDER BY in a subquery, the ORDER
is removed (Item_in_subselect::select_in_like_transformer),
however if a GROUP BY is transformed into ORDER, this happens
later, after the removal of the ORDER clause of subqueries, so
we end up with a subquery with an ORDER clause, and an artificially
added LIMIT 1.

The reason why the same works in the main 5.3 without MWL#89, is
that the 5.3 performs all subquery transformations, including
IN->EXISTS before JOIN::optimize(). The beginning of JOIN::optimize
does:
  if (having || (select_options & OPTION_FOUND_ROWS))
    select_limit= HA_POS_ERROR;
which sets the limit back to infinity, thus 5.3 sorts the whole
subquery result, and IN performs the lookup into all subquery result
rows.

Solution:
Sorting of subqueries without LIMIT is meaningless. Since LIMIT in
subqueries is not supported, the patch removes sorting by setting
  join->skip_sort_order= true
for each subquery JOIN object. This improves a number of execution
plans to not perform unnecessary sorting at all.
2011-04-20 18:36:55 +03:00
Sergey Petrunya
acc161d363 BUG#752992: Wrong results for a subquery with 'semijoin=on'
- Let advance_sj_state() save the value of JOIN::cur_dups_producing_tables
  in POSITION::prefix_dups_producing_tables, and restore_sj_state() restore
  it.
2011-04-08 02:12:03 +04:00
unknown
952556b345 MWL#89
Merge 5.3 with 5.3-mwl89.
2011-03-30 10:10:59 +03:00
Sergey Petrunya
201fb06db9 Merge in fix for BUG#727667 2011-03-25 12:47:44 +03:00
Igor Babaev
3d3d5f1d43 Fixed LP bug #729039.
If join condition is of the form <t2.key>=<t1.no_key> then the server
performs no index look-ups when looking for matching rows of t2 for
the rows from t1 with t1.no_key=NULL. It happens because the function
add_not_null_conds() injects an additional condition of the form 
IS NOT NULL(<t1.no_key>) into the WHERE condition.
However if the join condition was of the form <t.key>=<outer_ref> no
additional null rejecting predicate was generated. This could lead
to extra records in the result set if the value of <outer_ref> happened
to be NULL.
The new code injects null rejecting predicates of the form 
IS NOT NULL(<outer_ref>) and evaluates them before the first row
the subquery is constructed.
2011-03-07 22:09:21 -08:00
Sergey Petrunya
76165dc760 BUG#727667 Wrong result with OR + NOT NULL in maria-5.3
- put the code that sets HA_NULL_PART bit back
- Fix test_if_ref/part_of_refkey() so that 
  = NULL-ability of lookup columns does not prevent the equality 
    from being removed (we now have early/late NULLs filtering which 
    will filter out NULL values)
  = equality is not removed if it is ref_or_null access, and the value 
    of the lookup column can alternate between the lookup value and NULL.
2011-03-05 12:56:22 +03:00
unknown
7895c35874 MWL#89
Merge MWL#89 with 5.3.
2011-03-01 14:16:28 +02:00
Michael Widenius
4ad6d6b6c9 Merge in new handler and handlersocket code into 5.3 main 2011-02-22 11:15:47 +02:00
unknown
648e604615 MWL#89
Adjusted test cases in accordance with the implementation.
2011-02-03 17:00:28 +02:00
Sergey Petrunya
7fd3c9e2ff Merge backported subquery bugfixes/testcases into MariaDB 5.3 2011-01-14 13:07:50 +03:00
Sergey Petrunya
d2cbb10443 Backport of (see below) + temporary measures to make SJ-Materialization work with join buffering.
Date: Mon, 01 Nov 2010 15:15:25 -0000
3272 Roy Lyseng        2010-11-01
Bug#52068: Optimizer generates invalid semijoin materialization plan

When MaterializeScan semijoin strategy was used and there were one
or more outer dependent tables before the semijoin tables, the scan
over the materialized table was not properly reset for each row of
the prefix outer tables.

Example: suppose we have a join order:

  ot1 SJ-Mat-Scan(it2 it3)  ot4

Notice that this is called a MaterializeScan, even though there is an
outer table ahead of the materialized tables. Usually a MaterializeScan
has the outer tables after the materialized table, but this is
a special (but legal) case with outer dependent tables both before and
after the materialized table.

For each qualifying row from ot1, a new scan over the materialized
table must be set up. The code failed to do that, so all scans after
the first one returned zero rows from the materialized table.
2011-01-13 19:25:31 +03:00
Michael Widenius
050c004f5e Merge with 5.1
Fixes to get Aria handler tests to work.
Fixes LP#697597 "HANDLER + Aria asserts in maria-5.3-handler"
2011-01-11 15:36:41 +02:00
Igor Babaev
0dc5ef87d4 Merge 2010-12-27 14:22:05 -08:00
Igor Babaev
7f52af655a Merge. 2010-12-10 23:23:34 -08:00
Michael Widenius
b7b25dc666 Merge with 5.1-release.
- Fixed problem with oqgraph and 'make dist'

Note that after this merge we have a problem show in join_outer where we examine too many rows in one specific case (related to BUG#57024).
This will be fixed when mwl#128 is merged into 5.3.
2010-12-06 10:25:44 +02:00
Igor Babaev
4f75a8254a Merge 5.3-mwl128 -> 5.3 2010-10-27 16:31:22 -07:00
Igor Babaev
25f5debdc7 MWL#128: Added into EXPLAIN output info about types of the used join buffers and
about the employed join algorithms.
Refactored constructors of the JOIN_CACHE* classes.
2010-10-18 13:33:05 -07:00
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
Igor Babaev
b969df8bbd Merge of the mwl106 tree into the latest 5.3 tree.
Resolved conflicts. Adjusted some test results
2010-09-23 08:10:53 -07: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
Igor Babaev
709a0a1310 MWL#106: Backport optimizations for derived tables and views.
The main consolidated patch.
2010-05-26 13:18:18 -07: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