summaryrefslogtreecommitdiff
path: root/mysql-test/r/join_cache.result
Commit message (Collapse)AuthorAgeFilesLines
* Create 'main' test directory and move 't' and 'r' thereMichael Widenius2018-03-291-6019/+0
|
* Merge branch 'github/10.1' into 10.2Sergei Golubchik2018-02-061-0/+58
|\
| * Merge branch 'github/10.0' into 10.1Sergei Golubchik2018-02-021-0/+58
| |\
| | * Merge remote-tracking branch '5.5' into 10.0Vicențiu Ciorbaru2018-01-241-0/+58
| | |\
| | | * Fixed mdev-14960 [ERROR] mysqld got signal 11 with join_buffer and join_cacheIgor Babaev2018-01-181-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In the function JOIN::shrink_join_buffers the iteration over joined tables was organized in a wrong way. This could cause a crash if the optimizer chose to materialize a semi-join that used join caches for which the sizes must be adjusted.
* | | | Merge 10.1 into 10.2Marko Mäkelä2017-10-021-1/+1
|\ \ \ \ | |/ / /
| * | | MDEV-13897 SELECT @a := MAX(col) FROM t requires full index scanmariadb-10.1.28Sergei Golubchik2017-09-271-1/+1
| | | | | | | | | | | | | | | | fix some old bad merge
* | | | MDEV-12580 Wrong query result in join when using an index (Version > "10.2.3")Sergei Golubchik2017-05-081-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JOIN_TAB::remove_redundant_bnl_scan_conds() removes select_cond from a JOIN_TAB if join cache is enabled, and tab->cache_select->cond is the equal to tab->select_cond. But after 8d99166c69 the code to initialize join cache was moved to happen much later than JOIN_TAB::remove_redundant_bnl_scan_conds(), and that code might, under certain conditions, revert to *not* using join cache (set_join_cache_denial()). If JOIN_TAB::remove_redundant_bnl_scan_conds() removes the WHERE condition from the JOIN_TAB and later set_join_cache_denial() disables join cache, we end up with no WHERE condition at all. Fix: move JOIN_TAB::remove_redundant_bnl_scan_conds() to happen after all possible set_join_cache_denial() calls.
* | | | MDEV-11640 gcol.gcol_select_myisam fails in buildbot on PowerSergei Golubchik2017-02-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JOIN_CACHE's were initialized in check_join_cache_usage() from make_join_readinfo(). After that make_join_readinfo() was looking whether it's possible to use keyread. Later, after make_join_readinfo(), optimizer decided whether to use filesort. And even later, at the execution time, from join_read_first(), keyread was actually enabled. The problem is, that if a query uses a vcol, base columns that it depends on are automatically added to the read_set - because they're needed to calculate the vcol. But if we're doing keyread, vcol is taken from the index, not calculated, and base columns do not need to be in the read set (even should not be - as they aren't getting values). The bug was that JOIN_CACHE used read_set with base columns, they were not read because of keyread, so it was caching garbage. So read_set is only known after the keyread was decided. And after the filesort was decided, as filesort doesn't use keyread. But check_join_cache_usage() needs to be done in make_join_readinfo(), as the code below depends on these checks, Fix: keep JOIN_CACHE checks where they were, but move initialization down to the very end of JOIN::optimize_inner. If keyread was enabled, update the read_set to include only columns that are part of the index. Copy the keyread logic from join_read_first() to happen at optimize time.
* | | | cleanup: style fixes, sql_join_cache.ccSergei Golubchik2017-02-131-2/+2
| | | |
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2017-02-101-4/+12
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Vicențiu Ciorbaru2017-01-161-4/+12
| |\ \ \ | | |/ /
| | * | Merge remote-tracking branch 'origin/5.5' into 10.0vicentiu2017-01-061-4/+12
| | |\ \ | | | |/
| | | * MDEV-11722 main.join_cache fails in buildbot on very slow buildersElena Stepanova2017-01-051-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The guilty part of the test checks for performance degradation on a query with numerous joins on an empty table. The test expects the query to take less than 1 second, and fails if it is not so (which can happen on very slow builders). The solution is to add more JOINs to the query. On a fixed server, it should not have any noticeable impact on the query execution, while on the unfixed version the query would take several times longer (e.g. 6.5 sec vs 1.5 sec). Thus, we can increase the margin for the error, and make the test fail when the query takes longer than 5 seconds.
* | | | Item::print(): remove redundant parenthesesSergei Golubchik2016-12-121-3/+3
| | | | | | | | | | | | | | | | | | | | by introducing new Item::precedence() method and using it to decide whether parentheses are required
* | | | MDEV-8646: Re-engineer the code for post-join operationsSergei Petrunia2016-03-281-2/+2
| | | | | | | | | | | | | | | | | | | | - Make EXPLAIN code use the post-join operations - Remove Sort_and_group_tracker that was used for that purpose
* | | | MDEV-9393 Split Copy_field::get_copy_func() into virtual methods in FieldAlexander Barkov2016-01-111-0/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | Also fixes: MDEV-9391 InnoDB does not produce warnings when doing WHERE int_column=varchar_column MDEV-9337 ALTER from DECIMAL and INT to DATETIME returns a wrong result MDEV-9340 Copying from INT/DOUBLE to ENUM is inconsistent MDEV-9392 Copying from DECIMAL to YEAR is not consistent about warnings
* | | MDEV-6066: Merge new defaults from 5.6 and 5.7 (defaults changed, QC can be ↵Oleksandr Byelkin2015-09-041-7/+7
| | | | | | | | | | | | stopped with no-zero size)
* | | MDEV-8189 field<>const and const<>field are not symmetricAlexander Barkov2015-06-301-0/+51
|/ /
* | MDEV-6687: Assertion `0' failed in Protocol::end_statement on querySergei Petrunia2015-02-191-0/+13
| | | | | | | | | | | | Redefine FT_KEYPART in a way that it does not conflict with Hash Join. Hash join stores field->field_index in KEYUSE::keypart, so we must use a value of FT_KEYPART that's greater than MAX_FIELDS.
* | MergeSergey Petrunya2014-10-291-6/+6
|\ \ | |/
| * Merge 5.3->5.5Sergey Petrunya2014-10-291-6/+6
| |\
| | * MDEV-6888: Query spends a long time in best_extension_by_limited_search with ↵Sergey Petrunya2014-10-291-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mrr enabled - TABLE::create_key_part_by_field() should not set PART_KEY_FLAG in field->flags = The reason is that it is used by hash join code which calls it to create a hash table lookup structure. It doesn't create a real index. = Another caller of the function is TABLE::add_tmp_key(). Made it to set the flag itself. - The differences in join_cache.result could also be observed before this patch: one could put "FLUSH TABLES" before the queries and get exactly the same difference.
* | | 5.5 mergeSergei Golubchik2014-09-161-2/+150
|\ \ \ | |/ /
| * | 5.3 mergeSergei Golubchik2014-09-121-0/+149
| |\ \ | | |/
| | * Fixed bug mdev-6292.Igor Babaev2014-09-091-0/+149
| | | | | | | | | | | | | | | | | | | | | Avoided exponential recursive calls of JOIN_CACHE::join_records() in the case of non-nested outer joins. A different solution is required to resolve this performance problem for nested outer joins.
* | | Fixed bug mdev-6071.Igor Babaev2014-06-101-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | The method JOIN_CACHE::init may fail (return 1) if some conditions on the used join buffer is not satisfied. For example it fails if join_buffer_size is greater than join_buffer_space_limit. The conditions should be checked when running the EXPLAIN command for the query. That's why the method JOIN_CACHE::init has to be called for EXPLAIN commands as well.
* | | 5.5 mergeSergei Golubchik2013-11-231-0/+19
|\ \ \ | |/ /
| * | MDEV-5293: outer join, join buffering, and order by - invalid query planSergey Petrunya2013-11-181-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - make_join_readinfo() has the code that forces use of "Using temporary; Using filesort" when join buffering is in use. That code didn't handle all cases, in particular it didn't hande the case where ORDER BY originally has tables from multiple columns, but the optimizer eventually figures out that doing filesort() on one table will be sufficient. Adjusted the code to handle that case.
* | | MDEV-5123 Remove duplicated conditions pushed both to join_tab->select_cond ↵timour@askmonty.org2013-10-181-1/+48
|/ / | | | | | | | | | | | | | | | | | | | | | | and join_tab->cache_select->cond for blocked joins. BNL and BNLH joins pre-filter the records from a joined table via JOIN_TAB::cache_select->cond. There is no need to re-evaluate the same conditions via JOIN_TAB::select_cond. This patch removes the duplicated conditions from the top-level conjuncts of each pushed condition. The added "Using where" in few EXPLAINs is due to taking into account tab->cache_select->cond in addition to tab->select_cond in JOIN::save_explain_data_intern.
* | merge with mysql-5.5.30 minus few incorrect or not applicable changesetsSergei Golubchik2013-02-281-1/+1
| |
* | 5.3 mergeSergei Golubchik2012-10-181-0/+48
|\ \ | |/
| * Fixed LP bug #1058071 (mdev-564).Igor Babaev2012-09-291-0/+50
| | | | | | | | | | | | | | | | In some rare cases when the value of the system variable join_buffer_size was set to a number less than 256 the function JOIN_CACHE::set_constants determined the size of an offset in the join buffer equal to 1 though the minimal join buffer required more than 256 bytes. This could cause a crash of the server when records from the join buffer were read.
* | Changed a test case from join_cache.test to make it platform independentIgor Babaev2012-05-171-3/+3
| |
* | Fixed LP bug #999251: Q13 from DBT3 uses table scan instead of covering ↵Igor Babaev2012-05-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | index scan. The optimizer chose a less efficient execution plan due to the following defects of the code: 1. the generic handler function handler::keyread_time did not take into account that in clustered primary keys record data is included into each index entry 2. the function make_join_readinfo erroneously decided that index only scan could not be used if join cache was empoyed. Added no additional test case. Adjusted some of the test results.
* | typo fixed: space in the status variable nameSergei Golubchik2012-04-171-4/+4
| |
* | mergeSergei Golubchik2012-04-071-6/+6
|\ \ | |/
| * BUG#913030: Optimizer chooses a suboptimal excution plan for Q18 from DBT-3Sergey Petrunya2012-04-021-6/+6
| | | | | | | | | | | | | | | | | | - When doing join optimization, pre-sort the tables so that they mimic the execution order we've had with 'semijoin=off'. - That way, we will not get regressions when there are two query plans (the old and the new) that have indentical costs but different execution times (because of factors that the optimizer was not able to take into account).
* | 5.3 mergeSergei Golubchik2012-03-061-1/+1
|\ \ | |/
| * Fixed LP bug #944782.Igor Babaev2012-03-041-1/+1
| | | | | | | | | | | | | | | | | | This bug in the function JOIN::drop_unused_derived_keys() could leave the internal structures for a materialized derived table in an inconsistent state. This led to a not quite correct EXPLAIN output when no additional key had been created to access the table. It also may lead to more serious consequences: so, the test case added with this fix caused a crash in mariadb-5.5.20.
* | 5.3 mergeSergei Golubchik2012-02-241-12/+12
|\ \ | |/
| * Changed names of statistic variables and counting matches instaed of ↵unknown2012-02-221-12/+12
| | | | | | | | rejected rows.
* | 5.3 mergeSergei Golubchik2012-02-211-0/+17
|\ \ | |/
| * Counters for Index Condition Pushdown added (MDEV-130).unknown2012-02-161-0/+17
| |
* | 5.3.4 mergeSergei Golubchik2012-02-151-0/+180
|\ \ | |/
| * Fixed LP bug #925985.Igor Babaev2012-02-131-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | If the flag 'optimize_join_buffer_size' is set to 'off' and the value of the system variable 'join_buffer_size' is greater than the value of the system variable 'join_buffer_space_limit' than no join cache can be employed to join tables of the executed query. A bug in the function JOIN_CACHE::alloc_buffer allowed to use join buffer even in this case while another bug in the function revise_cache_usage could cause a crash of the server in this case if the chosen execution plan for the query contained outer join or semi-join operation.
| * Fixed LP bug #922971.Igor Babaev2012-01-281-0/+48
| | | | | | | | | | | | Applied the fix for bug #12546542 from the mysql-5.6 code line: JOIN_CACHE::join_records forgot to reset JOIN_TAB::first_unmatched in some cases.
| * Back-ported test cases for bugs #53060, #53305, #50358, #49453 from subquery_sjIgor Babaev2012-01-211-0/+97
| | | | | | | | | | | | of mysql-5.6 code line. The bugs could not be reproduced in the latest release of mariadb-5.3 as they were fixed either when the code of subquery optimization was back-ported from mysql-6.0 or later when some other bugs were fixed.
* | 5.3 mergeSergei Golubchik2012-01-131-18/+228
|\ \ | |/
| * Changed a test case from join_cache.test to make it platform independent.Igor Babaev2011-12-251-6/+1
| |