summaryrefslogtreecommitdiff
path: root/sql/opt_subselect.h
Commit message (Collapse)AuthorAgeFilesLines
* Update FSF addressMichal Schorm2019-05-101-1/+1
| | | | | | | | | | | | | | | This commit is based on the work of Michal Schorm, rebased on the earliest MariaDB version. Th command line used to generate this diff was: find ./ -type f \ -exec sed -i -e 's/Foundation, Inc., 59 Temple Place, Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/Foundation, Inc. 59 Temple Place.* Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/MA.*.....-1307.*USA/MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/Foundation, Inc., 59 Temple/Foundation, Inc., 51 Franklin/g' {} \; \ -exec sed -i -e 's/Place, Suite 330, Boston, MA.*02111-1307.*USA/Street, Fifth Floor, Boston, MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/MA.*.....-1307/MA 02110-1335/g' {} \;
* MDEV-7474: Semi-Join's DuplicateWeedout strategy skipped ...Sergei Petrunia2015-03-171-1/+1
| | | | | | | | | | JOIN::cur_dups_producing_tables was not maintained correctly in the cases of greedy optimization (search_depth < n_tables). Moved it to POSITION structure where it will be maintained automatically. Removed POSITION::prefix_dups_producing_tables since its value can now be calculated.
* Merge 5.3->5.5Igor Babaev2014-02-101-1/+1
|\
| * MDEV-5582: Plugin 'MEMORY' has ref_count=1 after shutdown with ↵Sergey Petrunya2014-02-071-1/+1
| | | | | | | | | | | | materialization+semijoin - Let cleanup_empty_jtbm_semi_joins() walk into semi-join nests.
* | MDEV-5037: Server crash on a JOIN on a derived table with join_cache_level > 2Sergey Petrunya2013-09-201-1/+1
| | | | | | | | | | | | | | | | - The crash was caused because the optimizer called handler->multi_range_read_info() on a derived temporary table. That table has been created, but not opened yet. Because of that, handler::table was NULL, which caused crash. Fixed by changing DS-MRR methods to use handler::table_share instead. handler::table_share is set in handler ctor, so this should be safe.
* | Merge 5.3 -> 5.5Sergey Petrunya2013-09-121-0/+1
|\ \ | |/
| * MDEV-5011: ERROR Plugin 'MEMORY' has ref_count=1 after shutdown for SJM queriesSergey Petrunya2013-09-121-0/+1
| | | | | | | | | | - Provide a special execution path for cleanup of degenerate non-merged semi-join children of degenerate selects.
* | 5.3 mergeSergei Golubchik2012-05-041-1/+3
|\ \ | |/
| * BUG#978479: Wrong result (extra rows) with ↵Sergey Petrunya2012-04-191-1/+3
| | | | | | | | | | | | | | | | derived_with_keys+loosescan+semijoin=ON, materialization=OFF - Part#2: Don't try to construct a LooseScan access on indexes that do not guarantee index-ordered reads.
* | fix the include guards and add missing gplv2 headersSergei Golubchik2012-02-171-0/+16
| |
* | Various fixes for Solaris compiler.Vladislav Vaintroub2012-02-031-1/+1
| | | | | | | | | | | | | | Also, restrict symbol visibility in statically built plugins, to minimize the chance for symbol name clashes with dynamic plugins.
* | 5.3 mergeSergei Golubchik2012-01-131-11/+11
|\ \ | |/
| * BUG#901506: Crash in TABLE_LIST::print on EXPLAIN EXTENDEDSergey Petrunya2011-12-141-0/+2
| | | | | | | | | | | | - Let JTBM optimization code handle the case where the subquery is degenerate and doesn't have a join query plan. Regular materialization would fall back to IN->EXISTS for such cases. Semi-Join materialization does not have such option, instead we introduce and use "constant JTBM join tabs".
| * Subquery code cleanups:Sergey Petrunya2011-11-251-5/+5
| | | | | | | | | | | | - Make functions that operate on SJ_TMP_TABLE be member functions - Make Loose_scan_opt data members private
| * MergeSergey Petrunya2011-11-251-6/+4
| |\
| | * Semi-join optimizations code cleanup part 2:Sergey Petrunya2011-11-251-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | - Make EXPLAIN display "Start temporary" at the start of the fanout (it used to display at the first table whose rowid gets into temp. table which is not that useful for the user) - Updated test results (all checked)
| | * Semi-join optimizations code cleanup:Sergey Petrunya2011-11-231-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Break down POSITION/advance_sj_state() into four classes representing potential semi-join strategies. - Treat all strategies uniformly (before, DuplicateWeedout was special as it was the catch-all strategy. Now, we're still relying on it to be the catch-all, but are able to function,e.g. with firstmatch=on,duplicate_weedout=off. - Update test results (checked)
* | | 5.3->5.5 mergeSergei Golubchik2011-11-271-1/+1
|\ \ \ | |/ /
| * | Fixed LP bug #887496.Igor Babaev2011-11-211-1/+1
| |/ | | | | | | | | | | | | This bug in the function Loose_scan_opt::check_ref_access_part1 could lead to choosing an invalid execution plan employing a loose scan access to a semi-join table even in the cases when such access could not be used at all. This could result in wrong answers for some queries with IN subqueries.
* | merge with 5.3Sergei Golubchik2011-10-191-3/+14
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | sql/sql_insert.cc: CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. ****** CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. sql/sql_table.cc: small cleanup ****** small cleanup
| * Make semi-joins work with outer joins part #1:Sergey Petrunya2011-06-221-1/+3
| | | | | | | | | | - Make make_outerjoin_info() correctly process semi-join nests - Make make_join_select() attach conditions to the right places.
| * MWL#90: Subqueries: Inside-out execution for materialized non-sj subqueriesSergey Petrunya2010-12-091-1/+9
| |\ | | | | | | | | | - Merge into 5.3-main
| | * MWL#90: Subqueries: Inside-out execution for materialized non-sj subqueriespsergey2010-07-111-1/+9
| | |\ | | | | | | | | | | | | - Merge with MariaDB 5.3 -main
| | | * MWL#90: code cleanuppsergey2010-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | - Remove deadcode - Improve comments - Do small several small TODOs
| | | * MWL#90, code movearound to unify merged and non-merged semi-join ↵Sergey Petrunya2010-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | materialization processing - First code, needs cleanup.
| | | * Subqueries: Inside-out execution for non-semijoin materialized subqueries ↵Sergey Petrunya2010-05-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | that are AND-parts of the WHERE - Code cleanup - Query plan change is due to s/ha_rows JOIN_TAB::read_time/double JOIN_TAB::read_time/
| | | * Subquery optimizations:Sergey Petrunya2010-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | - Better comments - Use more appropriate return types for functions - Provide handling where it was missing.
| | | * Code cleanup in subquery optimizationsSergey Petrunya2010-04-251-1/+7
| | | |
| * | | Fixed some compiler warnings found when compiling for windows.Michael Widenius2010-11-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed rows_read and rows_sent status variables to be longlong (to avoid compiler warnings) sql/item_func.cc: Fixed wrong usage of alias sql/item_subselect.cc: Changed buffer size to ulonglong to be able detect buffers bigger than size_t sql/item_subselect.h: Changed buffer size to ulonglong to be able detect buffers bigger than size_t sql/multi_range_read.cc: Fixed compiler warning by using correct type for function argument sql/mysqld.cc: Changed rows_read and rows_sent status variables to be longlong sql/opt_subselect.h: Fixed compiler warning by using correct type for function argument sql/sql_class.cc: Changed rows_read and rows_sent status variables to be longlong sql/sql_class.h: Changed rows_read and rows_sent status variables to be longlong Changed max_nulls_in_row to uint as this is number of columns in row. This fixed some compiler warnings. sql/sql_select.cc: Added casts to avoid compiler warnings storage/heap/ha_heap.cc: Initilize different types separate storage/oqgraph/ha_oqgraph.cc: Fixed argument to store(longlong) to avoid compiler warnings
* | | | lots of post-merge changesSergei Golubchik2011-04-251-2/+2
|/ / /
* | | 5.2 mergeSergei Golubchik2010-10-281-1/+1
|/ /
* | MariaDB 5.2 -> MariaDB 5.3 merge Sergey Petrunya2010-06-261-1/+1
|/
* Subquery optimization backport:Sergey Petrunya2010-02-161-0/+368
- Factor out subquery code into sql/opt_subselect.{h,cc} - Stop using the term "confluent" (was used due to misreading the dictionary)