summaryrefslogtreecommitdiff
path: root/mysql-test/main/rowid_filter_innodb.test
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '10.4' into 10.5Oleksandr Byelkin2020-03-111-0/+153
|\
| * MDEV-21610 Different query results from 10.4.11 to 10.4.12Igor Babaev2020-02-181-0/+153
| | | | | | | | | | | | | | | | | | | | | | This patch fixes the following defects/bugs. 1. If BKA[H] algorithm was used to join a table for which the optimizer had decided to employ a rowid filter the filter actually was not built. 2. The patch for the bug MDEV-21356 that added the code canceling pushing rowid filter into an engine for the table joined with employment of BKA[H] and MRR was not quite correct for Innodb engine because this cancellation was done after InnoDB code had already bound the the pushed filter to internal InnoDB structures.
* | MDEV-18650: Options deprecated in previous versions - storage_engineVicențiu Ciorbaru2020-02-131-2/+2
|/ | | | | | | Remove usage of deprecated variable storage_engine. It was deprecated in 5.5 but it never issued a deprecation warning. Make it issue a warning in 10.5.1. Replaced with default_storage_engine.
* MDEV-21446 Assertion `!prebuilt->index->is_primary()' failed inIgor Babaev2020-01-191-0/+49
| | | | | | | | | | | | | row_search_idx_cond_check with rowid_filter upon concurrent access to table This bug has nothing to do with the concurrent access to table. Rather it concerns queries for which the optimizer decides to employ a rowid filter when accessing an InnoDB table by a secondary index, but later when calling test_if_skip_sort_order() changes its mind to access the table by the primary key. Currently usage of rowid filters is not supported in InnoDB if the table is accessed by the primary key. So in this case usage of a rowid filter to access the table must be prohibited.
* MDEV-21356 ERROR 1032 Can't find record when running simple, single-table queryIgor Babaev2020-01-181-0/+117
| | | | | | | | | | | | | This bug could happen when both optimizer switches 'mrr' and 'mrr_sort_keys' are enabled and the optimizer decided to use a rowid filter when accessing an InnoDB table by a secondary key. With the above setting any access by a secondary is converted to the rndpos access. In InnoDB the rndpos access uses the primary key. Currently usage of a rowid filter within InnoDB engine is not supported if the table is accessed by the primary key. Do not use pushed rowid filter if the table is accessed actually by the primary key. Use the rowid filter outside the egine code instead.
* MDEV-20407 mysqld got signal 11; rowid filterIgor Babaev2019-11-261-0/+33
| | | | | | | | | If a joined table is accessed by a full text index then now no range rowid filter can be used when accessing the records of this table. This bug was fixed by the patch for mdev-20056. This commit adds only a test case with a query using a full text index and a range condition for another index.
* MDEV-20056 Assertion `!prebuilt->index->is_primary()' failedIgor Babaev2019-11-261-0/+53
| | | | | | | | | in row_search_idx_cond_check When usage of rowid filter is evaluated by the optimizer to join a table to the current partial join employing a certain index it should be checked that a key for at least the major component of this index can be constructed using values from the columns of the partial join.
* MDEV-19919 Assertion `!prebuilt->index->is_primary()' failedIgor Babaev2019-11-221-0/+33
| | | | | | | | | | | | | | | | | in row_search_idx_cond_check For a single table query with ORDER BY and several sargable range conditions the optimizer may choose an execution plan that employs a rowid filter. In this case it is important to build the filter before calling the function JOIN_TAB::sort_table() that creates sort index for the result set, because when this is index created the filter has to be already filled. After the sort index has been created the filter must be deactivated. If not to do this the innodb function row_search_idx_cond_check() is getting confused when it has to read rows from the created sort index by using ha_rnd_pos(). The order of actions mentioned above is needed also when processing a join query if sorting is performed for the first non constant table in the chosen execution plan.
* MDEV-19820 Wrong result with multiple single column index requestIgor Babaev2019-06-251-0/+30
| | | | | | | | | | | The bug occured when the optimizer decided to use a rowid filter built by a range index scan to access an InnoDB table with generated clustered index. When a table is accessed by a secondary index Idx employing a rowid filter the the value of pk contained in the found index tuple is checked against the filter. A call of the handler function position is supposed to put the pk value into the handler::ref buffer. However for generated clustered primary keys it did not happened. The patch fixes this problem.
* MDEV-19195 Active Record unit test fails with MariaDB 10.4.3Igor Babaev2019-04-161-0/+21
| | | | | | | Currently usage of range rowid filters can be combined only with ref access and single index range access. So if the optimizer has chosen some other quick select method to access a joined table then no range rowid filter can be used for this table.
* MDEV-18755 Assertion `inited==INDEX' failed in handler::ha_index_read_mapIgor Babaev2019-02-281-0/+40
| | | | | | | | | When the chosen execution plan accesses a join table employing a range rowid filter a quick select to scan this range has to be built. This quick select is built by a call of SQL_SELECT::test_quick_select(). At this call the function should allow to evaluate only single index range scans. In order to be able to do this a new parameter was added to this function.
* MDEV-16188 Use in-memory PK filters built from range index scansIgor Babaev2019-02-031-0/+7
This patch contains a full implementation of the optimization that allows to use in-memory rowid / primary filters built for range   conditions over indexes. In many cases usage of such filters reduce   the number of disk seeks spent for fetching table rows. In this implementation the choice of what possible filter to be applied   (if any) is made purely on cost-based considerations. This implementation re-achitectured the partial implementation of the feature pushed by Galina Shalygina in the commit 8d5a11122c32f4d9eb87536886c6e893377bdd07. Besides this patch contains a better implementation of the generic   handler function handler::multi_range_read_info_const() that takes into account gaps between ranges when calculating the cost of range index scans. It also contains some corrections of the implementation of the handler function records_in_range() for MyISAM. This patch supports the feature for InnoDB and MyISAM.