summaryrefslogtreecommitdiff
path: root/sql/opt_subselect.cc
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-334: Backport of UNION ALL optimization from mysql-5.7.Igor Babaev2014-10-141-3/+3
| | | | | | Although the original code of mysql-5.7 was adjusted to the current MariaDB code the main ideas of the optimization were preserved.
* cleanup: rename List<> methodsSergei Golubchik2014-10-101-1/+1
| | | | | prepand() -> prepend() concat() -> append()
* cleanup: remove special case from store_key::store_key(), add ↵Sergei Golubchik2014-06-091-0/+1
| | | | | | Field_blob::new_key_field (prep for MDEV-6065)
* 10.0-base mergeSergei Golubchik2014-02-261-2/+7
|\
| * 5.5 mergeSergei Golubchik2014-02-251-2/+7
| |\
| | * 5.3 mergeSergei Golubchik2014-02-221-0/+1
| | |\
| | | * MDEV-5581: Server crashes in in JOIN::prepare on 2nd execution of PS with ↵Sergey Petrunya2014-02-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | materialization+semijoin - The problem was that JOIN::prepare() tried to set TABLE::maybe_null for a table in join. Non-merged semi-join tables 1) are present as join's base tables on second EXECUTE, but 2) do not yet have a TABLE object. Worked around the problem by putting mixed_implicit_grouping into JOIN object, and then passing it to JTBM tables in setup_jtbm_semi_joins().
| | * | Merge 5.3->5.5Igor Babaev2014-02-101-2/+6
| | |\ \ | | | |/
| | | * MDEV-5582: Plugin 'MEMORY' has ref_count=1 after shutdown with ↵Sergey Petrunya2014-02-071-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | materialization+semijoin - Let cleanup_empty_jtbm_semi_joins() walk into semi-join nests.
| | | * MDEV-5368: Server crashes in Item_in_subselect::optimize on ...Sergey Petrunya2014-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - convert_subq_to_sj() must connect child select's tables into parent select's TABLE_LIST::next_local chain. - The problem was that it took child's leaf_tables.head() which is different. This could cause certain tables (in this bug's case, child select's non-merged semi-join) not to be present in TABLE_LIST::next_local chain. Which would cause non-merged semi-join not to be initialized in setup_tables(), which would lead to NULL pointer dereference.
* | | | MDEV-5314 - Compiling fails on OSX using clangSergey Vojtovich2014-02-191-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is port of fix for MySQL BUG#17647863. revno: 5572 revision-id: jon.hauglid@oracle.com-20131030232243-b0pw98oy72uka2sj committer: Jon Olav Hauglid <jon.hauglid@oracle.com> timestamp: Thu 2013-10-31 00:22:43 +0100 message: Bug#17647863: MYSQL DOES NOT COMPILE ON OSX 10.9 GM Rename test() macro to MY_TEST() to avoid conflict with libc++.
* | | | 10.0-base mergeSergei Golubchik2014-02-031-1/+1
|\ \ \ \ | |/ / /
| * | | 5.5 mergeSergei Golubchik2014-02-011-1/+1
| |\ \ \ | | |/ /
| | * | MDEV-5368: Server crashes in Item_in_subselect::optimize on ...Sergey Petrunya2014-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - convert_subq_to_sj() must connect child select's tables into parent select's TABLE_LIST::next_local chain. - The problem was that it took child's leaf_tables.head() which is different. This could cause certain tables (in this bug's case, child select's non-merged semi-join) not to be present in TABLE_LIST::next_local chain. Which would cause non-merged semi-join not to be initialized in setup_tables(), which would lead to NULL pointer dereference.
* | | | 10.0-base mergeSergei Golubchik2013-12-161-3/+17
|\ \ \ \ | |/ / /
| * | | 5.5 mergeSergei Golubchik2013-11-231-2/+17
| |\ \ \ | | |/ /
| | * | MergeSergey Petrunya2013-11-211-2/+17
| | |\ \
| | | * | MDEV-5161: Wrong result (missing rows) with semijoin, LEFT JOIN, ORDER BY, ↵Sergey Petrunya2013-11-211-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | constant table - Don't pull out a table out of a semi-join if it is on the inner side of an outer join. - Make join->sort_by_table= get_sort_by_table(...) call after const table detection is done. That way, the value of join->sort_by_table will match the actual execution. Which will allow the code in setup_semijoin_dups_elimination() (search for "Make sure that possible sorting of rows from the head table is not to be employed." to see that "Using filesort" is going to be used together with Duplicate Elimination ( and change it to Using temporary + Using filesort)
| * | | | Merge 5.5->10.0-baseAlexander Barkov2013-11-211-1/+0
| |\ \ \ \ | | |/ / /
| | * | | Merge 5.3 -> 5.5Alexander Barkov2013-11-131-1/+0
| | |\ \ \ | | | | |/ | | | |/|
| | | * | incorrect assertion removedunknown2013-11-131-1/+0
| | | | |
* | | | | 10.0-base mergeSergei Golubchik2013-11-131-4/+2
|\ \ \ \ \ | |/ / / /
| * | | | 5.5. mergeSergei Golubchik2013-11-131-4/+2
| |\ \ \ \ | | |/ / /
| | * | | 5.3 mergeSergei Golubchik2013-11-131-4/+2
| | |\ \ \ | | | |/ / | | | | / | | | |/ | | |/|
| | | * MDEV-5284 Assertion `!(*expr)->fixed' fails in replace_where_subcondition ↵Sergei Golubchik2013-11-131-4/+2
| | | | | | | | | | | | | | | | with IN suquery
* | | | merge 10-base->10.0unknown2013-11-111-6/+13
|\ \ \ \ | |/ / /
| * | | merge 5.5->10.0-baseunknown2013-11-111-6/+13
| |\ \ \ | | |/ /
| | * | merge 5.3->5.5unknown2013-11-111-6/+13
| | |\ \ | | | |/
| | | * MDEV-5153: Server crashes in Item_ref::fix_fields on 2nd execution of PS ↵unknown2013-11-111-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | with LEFT JOIN and MERGE view or SELECT SQ 1. Transformation of row IN subquery made the same as single value. 2. replace_where_subcondition() made working on several layers of OR/AND because it called on expression before fix_fields().
* | | | 10.0-base merge.Sergei Golubchik2013-09-211-2/+46
|\ \ \ \ | |/ / / | | | | | | | | | | | | Partitioning/InnoDB changes are *not* merged (they'll come from 5.6) TokuDB does not compile (not updated to 10.0 SE API)
| * | | 5.5 merge and fixes for compiler/test errorsSergei Golubchik2013-09-181-2/+46
| |\ \ \ | | |/ /
| | * | Merge 5.3 -> 5.5Sergey Petrunya2013-09-121-0/+42
| | |\ \ | | | |/
| | | * MDEV-5011: ERROR Plugin 'MEMORY' has ref_count=1 after shutdown for SJM queriesSergey Petrunya2013-09-121-0/+42
| | | | | | | | | | | | | | | | | | | | - Provide a special execution path for cleanup of degenerate non-merged semi-join children of degenerate selects.
| | * | MergeIgor Babaev2013-08-211-2/+4
| | |\ \ | | | |/
| | | * MDEV-4908: Assertion `((Item_cond *) cond)->functype() == ((Item_cond *) ↵unknown2013-08-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | new_item)->functype()' fails on a query with IN and equal conditions, AND/OR, materialization+semijoin A new AND Item should be prepared (fix_field() call) before using.
* | | | 10.0-monty mergeSergei Golubchik2013-07-211-7/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | includes: * remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING" * introduce LOCK_share, now LOCK_ha_data is strictly for engines * rea_create_table() always creates .par file (even in "frm-only" mode) * fix a 5.6 bug, temp file leak on dummy ALTER TABLE
| * | | | Fixes for innodb suite, merging tests from 5.6.Sergei Golubchik2013-07-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Includes 5.6 changesets for: ***** Fix for BUG#13489996 valgrind:conditional jump or move depends on uninitialised values-field_blob. blob_ptr_size was not initialized properly: remove this variable. ***** Bug#14021323 CRASH IN FIELD::SET_NULL WHEN INSERTING ROWS TO NEW TABLE *****
| * | | | ha_partition.cc and ha_partition.h are now completely mergedMichael Widenius2013-06-271-0/+6
| | | | | | | | | | | | | | | | | | | | Added sql_mode_t to simplify merges
| * | | | A fix of unions with duplicate rows and returning bug fix for lp:732124 ↵unknown2013-06-261-2/+2
| | | | | | | | | | | | | | | | | | | | union + limit returns wrong result
| * | | | Finished merging wl5986 started by Igor.unknown2013-06-191-2/+2
| | | | |
| * | | | Applied all changes from Igor and SanjaMichael Widenius2013-06-151-3/+3
| | | | |
| * | | | Temporary commit of 10.0-mergeMichael Widenius2013-03-261-3/+3
| | | | |
* | | | | 10.0-base mergeSergei Golubchik2013-07-181-2/+6
|\ \ \ \ \ | | |/ / / | |/| | |
| * | | | 5.5 mergeSergei Golubchik2013-07-171-2/+6
| |\ \ \ \ | | | |/ / | | |/| |
| | * | | mdev-4173: Wrong result (extra row) with semijoin=on, joins in outer query, ↵Sergey Petrunya2013-07-161-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LEFT JOIN in the subquery Apply the patch from Patryk Pomykalski: - create_internal_tmp_table_from_heap() will now return information whether the last row that we tried to write was a duplicate row. (mysql-5.6 also has this change)
| | * | | -Run test suite with smaller aria keybuffer size (to make it possible to run ↵Michael Widenius2013-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | more tests in parallel) -Added test and extra code to ensure we don't leave keyread on for a handler table. -Create on disk temporary files always with long data pointers if SQL_SMALL_RESULT is not used. This ensures that we can handle temporary files bigger than 4G. mysql-test/include/default_mysqld.cnf: Run test suite with smaller aria keybuffer size mysql-test/suite/maria/maria3.result: Run test suite with smaller aria keybuffer size mysql-test/suite/sys_vars/r/aria_pagecache_buffer_size_basic.result: Run test suite with smaller aria keybuffer size sql/handler.cc: Disable key read (extra safety if something went wrong) sql/multi_range_read.cc: Ensure we have don't leave keyread on for secondary_file sql/opt_range.cc: Simplify code with mark_columns_used_by_index_no_reset() Ensure that read_keys_and_merge() disableds keyread if it enables it sql/opt_subselect.cc: Remove not anymore used argument for create_internal_tmp_table() sql/sql_derived.cc: Remove not anymore used argument for create_internal_tmp_table() sql/sql_select.cc: Use 'enable_keyread()' instead of calling HA_EXTRA_RESET. (Makes debugging easier) Create on disk temporary files always with long data pointers if SQL_SMALL_RESULT is not used. This ensures that we can handle temporary files bigger than 4G. Remove not anymore used argument for create_internal_tmp_table() More DBUG sql/sql_select.h: Remove not anymore used argument for create_internal_tmp_table()
* | | | | Merge 10.0-base -> 10.0Igor Babaev2013-04-171-1/+1
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.0-base -> mwl253Igor Babaev2013-04-151-0/+6
| |\ \ \ \
| * \ \ \ \ Merge 10.0-base -> mwl253.Igor Babaev2013-03-311-0/+13
| |\ \ \ \ \
| * | | | | | The pilot patch for mwl#253.Igor Babaev2013-03-111-1/+1
| | | | | | |