summaryrefslogtreecommitdiff
path: root/sql/multi_range_read.h
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-20611: MRR scan over partitioned InnoDB table produces "Out of memory" ↵Sergei Petrunia2019-11-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | error Fix partitioning and DS-MRR to work together - In ha_partition::index_end(): take into account that ha_innobase (and other engines using DS-MRR) will have inited=RND when initialized for DS-MRR scan. - In ha_partition::multi_range_read_next(): if the MRR scan is using HA_MRR_NO_ASSOCIATION mode, it is not guaranteed that the partition's handler will store anything into *range_info. - In DsMrr_impl::choose_mrr_impl(): ha_partition will inquire partitions about how much memory their MRR implementation needs by passing *buffer_size=0. DS-MRR code didn't know about this (actually it used uint for buffer size calculation and would have an under-flow). Returning *buffer_size=0 made ha_partition assume that partitions do not need MRR memory and pass the same buffer to each of them. Now, this is fixed. If DS-MRR gets *buffer_size=0, it will return the amount of buffer space needed, but not more than about @@mrr_buffer_size. * Fix ha_{innobase,maria,myisam}::clone. If ha_partition uses MRR on its partitions, and partition use DS-MRR, the code will call handler->clone with TABLE (*NOT partition*) name as an argument. DS-MRR has no way of knowing the partition name, so the solution was to have the ::clone() function for the affected storage engine to ignore the name argument and get it elsewhere.
* Merge 10.2 into 10.3Marko Mäkelä2019-05-141-1/+1
|\
| * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| |\
| | * 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' {} \;
* | | Remove XtraDBMarko Mäkelä2017-06-211-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | The XtraDB storage engine was already replaced by InnoDB and disabled in MariaDB Server 10.2. Let us remove it altogether to avoid dragging dead code around. Replace some references to XtraDB with references to InnoDB. rpl_get_position_info(): Remove. Remove the mysql-test-run --suite=percona, because it only contains tests specific to XtraDB, many of which were disabled already in earlier MariaDB versions.
* | Correct FSF addressiangilfillan2017-03-101-1/+1
| |
* | MergeSergey Petrunya2014-10-291-2/+2
|\ \ | |/
| * Merge 5.3->5.5Sergey Petrunya2014-10-291-0/+6
| |\
| | * MDEV-6878: Use of uninitialized saved_primary_key in ↵Sergey Petrunya2014-10-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mrr_ordered_index_reader::resume_read() (Backport to 5.3) (variant #2, with fixed coding style) - Make Mrr_ordered_index_reader::resume_read() restore index position only if it was saved before with Mrr_ordered_index_reader::interrupt_read().
* | | MDEV-6878: Use of uninitialized saved_primary_key in ↵Sergey Petrunya2014-10-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Mrr_ordered_index_reader::resume_read() - Make Mrr_ordered_index_reader::resume_read() restore index position only if it was saved before with Mrr_ordered_index_reader::interrupt_read().
* | | merge 10.0-base -> 10.0unknown2013-09-261-1/+1
|\ \ \ | |/ /
| * | 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.
* | | Temporary commit of merge of MariaDB 10.0-base and MySQL 5.6Michael Widenius2012-08-011-4/+4
|/ /
* | fix the include guards and add missing gplv2 headersSergei Golubchik2012-02-171-0/+16
|/
* Make EXPLAIN better at displaying MRR/BKA:Sergey Petrunya2011-04-021-0/+5
| | | | | | | | | | | | - "Using MRR" is no longer shown with range access. - Instead, both range and BKA accesses will show one of the following: = "Rowid-ordered scan" = "Key-ordered scan" = "Key-ordered Rowid-ordered scan" depending on whether DS-MRR implementation will do scan keys in order, rowids in order, or both. - The patch also introduces a way for other storage engines/MRR implementations to pass information to EXPLAIN output about the properties of employed MRR scans.
* MRR interface: change range_info's type from char* to range_id_t typedef. ↵Sergey Petrunya2011-03-041-10/+10
| | | | | | | The goals are: - cleaner code - ability to change from using pointers to offsets at some point
* BUG#707925: Wrong result with join_cache_level=6 optimizer_use_mrr = force ↵Sergey Petrunya2011-03-041-11/+20
| | | | | | | | | | | | | | | | | (incremental, BKA join) - The problem was that Mrr_ordered_index_reader's interrupt_read() and resume_read() would save and restore 1) index tuple 2) the rowid (as bytes returned by handler->position()). Clustered primary key columns were not saved/restored. They are not explicitly present in the index tuple (i.e. table->key_info[secondary_key].key_parts doesn't list them), but they are actually there, in particular table->field[clustered_primary_key_member].part_of_key(secondary_key) == 1. Index condition pushdown code [correctly] uses the latter as inidication that pushed index condition can refer to clustered PK members. The fix was to make interrupt_read()/resume_read() to save/restore clustered primary key members as well, so that we get correct values for them when evaluating pushed index condition. [3rd attempt: remove the debugging aids, fix comments in testcase]
* BUG#670417: Diverging results in maria-5.3-mwl128-dsmrr-cpk with join bufferSergey Petrunya2010-12-201-2/+5
| | | | | - Fixes for the second fix: take into account case where we don't need to save/restore the scan.
* BUG#670417: Diverging results in maria-5.3-mwl128-dsmrr-cpk with join bufferSergey Petrunya2010-12-191-7/+4
| | | | | | | Switch from "Disable identical key handling optimization when IndexConditionPushdown is used" approach To an approach where we save/restore index tuple and so can use index condition pushdown.
* Small code cleanupsSergey Petrunya2010-12-171-1/+0
|
* Better commentsSergey Petrunya2010-12-161-6/+8
|
* MWL#121-125 DS-MRR improvementsSergey Petrunya2010-12-161-7/+4
| | | | - Address Monty's review feedback, portion 2
* - Fix compiler warningSergey Petrunya2010-12-151-0/+7
| | | | - Better warnings
* BUG#671340: Diverging results in with mrr_sort_keys=ON|OFF and ↵Sergey Petrunya2010-12-091-1/+13
| | | | | | | | | | | | join_cache_level=5 - Make Mrr_ordered_index_reader() save the rowid across scan interruptions Also - Fix compiler warning for setup_buffer_sizes() - Add commented key_copy/key_restore for better handling of a similar issue with index record being destroyed by scan interruption (which causes incorrect evaluation of pushed index condition later on).
* MWL#121-125 DS-MRR improvementsSergey Petrunya2010-12-021-15/+16
| | | | | | - Address Monty's review feedback, part 6: rename "handler *h" variable in all DS-MRR classes to something else.
* MWL#121-125 DS-MRR improvements Sergey Petrunya2010-12-021-30/+33
| | | | | - Address Monty's review feedback, part 5
* Fix buildbot failureSergey Petrunya2010-11-261-0/+3
|
* Merge MWL#121-125 DS-MRR improvements Sergey Petrunya2010-11-251-5/+9
| | | | | - Address Monty's review feedback, part 4
* MWL#121-125 DS-MRR improvementsSergey Petrunya2010-11-221-3/+3
| | | | | - Address Monty's review feedback, part 1 - Fix buildbot failure
* Merge MWL#121-125 DS-MRR improvements Sergey Petrunya2010-11-221-1/+1
| | | | - Address Monty's review feedback, part 1
* BUG#670417: Diverging results in maria-5.3-mwl128-dsmrr-cpk with join ↵Sergey Petrunya2010-11-081-0/+6
| | | | | | | buffer, attempt 4 - Disable identical key handling optimization when IndexConditionPushdown is used
* DS-MRR improvementsSergey Petrunya2010-11-081-30/+101
| | | | | | - Code cleanup - Always propagate the error code we got from storage engine all the way up
* Code cleanupSergey Petrunya2010-11-031-10/+19
|
* Code cleanupSergey Petrunya2010-11-021-67/+42
|
* Re-initialization reworkedSergey Petrunya2010-11-011-1/+3
|
* DS-MRR/CPK improvements: correct buffer exhaustion handlingSergey Petrunya2010-10-311-2/+10
|
* DS-MRR improvementsSergey Petrunya2010-10-291-2/+2
| | | | | - buildbot test failure fixes: don't try to get more records from SimpleIndexReader if we've already got EOF for it.
* DS-MRR improvements:Sergey Petrunya2010-10-281-8/+8
| | | | | - address the review feedback (class/var renames) - fix wrong test result (bug in buffer refill logic)
* DS-MRR improvements: address review feedback for R3 version of the patchSergey Petrunya2010-10-261-70/+276
|
* Code cleanupSergey Petrunya2010-10-041-2/+0
|
* Address review feedbackSergey Petrunya2010-10-031-51/+44
| | | | | - One iterator class - Switch back from state automaton into two-nested-iterators approach..
* DS-MRR/CPK improvements: more of addressing review feedbackSergey Petrunya2010-10-011-5/+5
|
* DS-MRR improvements: address review feedbackSergey Petrunya2010-09-281-2/+15
| | | | - change dsmrr_next_from_index() to a switch-based state automaton-like structure.
* Better comments, move Lifo_buffer to separate file.Sergey Petrunya2010-09-281-389/+11
|
* DS-MRR improvements: review feedbackSergey Petrunya2010-09-211-172/+328
| | | | | - Switch from one bi-directional buffer class to two virtual inheritance-based forward and backward buffer classes.
* More commentsSergey Petrunya2010-09-201-25/+66
|
* DS-MRR improvements: remove write_size/read_size, have the same size Sergey Petrunya2010-09-201-10/+7
| | | | for writing and reading
* DS-MRR improvements: more code cleanupSergey Petrunya2010-09-201-76/+121
| | | | | - better comments - rename variables to better reflect their meaning
* DS-MRR improvements: better comments, use symbolic name instead of +1/-1 ↵Sergey Petrunya2010-09-191-64/+119
| | | | constants.
* BUG#628785: multi_range_read.cc:430: int DsMrr_impl::dsmrr_init(): Assertion ↵Sergey Petrunya2010-09-151-1/+1
| | | | | | | `do_sort_keys || do_rowid_fetch' failed - Make Ds_MrrImpl::check_cpk_scan() follow the execution code' logic: don't do MRR scans on clustered PK when mrr_sort_keys=off.