summaryrefslogtreecommitdiff
path: root/mysql-test/main/union.result
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-19134: EXISTS() slower if ORDER BY is definedSergei Petrunia2019-05-161-1/+1
| | | | | | | | | | | | | | | | Step 1: Removal of ORDER BY [LIMIT] from the subquery should be done earlier and for broader class of subqueries. The rewrite was done in Item_in_subselect::select_in_like_transformer(), but this had problems: - It didn't cover EXISTS subqueries - It covered IN-subqueries, but was done after the semi-join transformation was considered inapplicable, because ORDER BY was present. Remaining issue: - EXISTS->IN transformation happens before check_and_do_in_subquery_rewrites() is called, so it is still prevented by the present ORDER BY.
* MDEV-18689 Simple query with extra brackets stopped workingIgor Babaev2019-05-061-3/+3
| | | | | | | | Parenthesis around table names and derived tables should be allowed in FROM clauses and some other context as it was in earlier versions. Returned test queries that used such parenthesis in 10.3 to their original form. Adjusted test results accordingly.
* MDEV-18769 Assertion `fixed == 1' failed in Item_cond_or::val_intGalina Shalygina2019-04-041-1/+1
| | | | | | | | | | | | | | | | | | This bug is caused by pushdown from HAVING into WHERE. It appears because condition that is pushed wasn't fixed. It is also discovered that condition pushdown from HAVING into WHERE is done wrong. There is no need to build clones for some conditions that can be pushed. They can be simply moved from HAVING into WHERE without cloning. build_pushable_cond_for_having_pushdown(), remove_pushed_top_conjuncts_for_having() methods are changed. It is found that there is no transformation made for fields of pushed condition. field_transformer_for_having_pushdown transformer is added. New tests are added. Some comments are changed.
* Merge 10.3 into 10.4Marko Mäkelä2019-03-061-0/+37
|\
| * MDEV-18700 EXPLAIN EXTENDED shows a wrong operation for queryIgor Babaev2019-02-221-0/+37
| | | | | | | | | | | | | | | | | | with UNION ALL after INTERSECT EXPLAIN EXTENDED erroneously showed UNION instead of UNION ALL in the warning if UNION ALL followed INTERSECT or EXCEPT operations. The bug was in the function st_select_lex_unit::print() that printed the text of the query used in the warning.
* | MDEV-7486: Condition pushdown from HAVING into WHEREIgor Babaev2019-02-191-1/+1
| | | | | | | | | | | | Optimized the code that removed multiple equalities pushed from HAVING into WHERE. Now this removal is postponed until all multiple equalities are eliminated in substitute_for_best_equal_field().
* | MDEV-7486: Condition pushdown from HAVING into WHEREGalina Shalygina2019-02-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Condition can be pushed from the HAVING clause into the WHERE clause if it depends only on the fields that are used in the GROUP BY list or depends on the fields that are equal to grouping fields. Aggregate functions can't be pushed down. How the pushdown is performed on the example: SELECT t1.a,MAX(t1.b) FROM t1 GROUP BY t1.a HAVING (t1.a>2) AND (MAX(c)>12); => SELECT t1.a,MAX(t1.b) FROM t1 WHERE (t1.a>2) GROUP BY t1.a HAVING (MAX(c)>12); The implementation scheme: 1. Extract the most restrictive condition cond from the HAVING clause of the select that depends only on the fields that are used in the GROUP BY list of the select (directly or indirectly through equalities) 2. Save cond as a condition that can be pushed into the WHERE clause of the select 3. Remove cond from the HAVING clause if it is possible The optimization is implemented in the function st_select_lex::pushdown_from_having_into_where(). New test file having_cond_pushdown.test is created.
* | Fixed the results after the merge of 10.4 into bb-10.4-mdev16188.Igor Babaev2019-02-031-1/+1
| |
* | Merge 10.3 into 10.4Marko Mäkelä2019-01-171-0/+38
|\ \ | |/
| * Merge 10.2 into 10.3Marko Mäkelä2019-01-171-0/+38
| |
* | MDEV-15253: Default optimizer setting changes for MariaDB 10.4Varun Gupta2018-12-091-1/+1
| | | | | | | | | | use_stat_tables= PREFERABLY optimizer_use_condition_selectivity= 4
* | Merge 10.3 into 10.4Marko Mäkelä2018-08-161-0/+16
|\ \ | |/
| * Merge 10.2 into 10.3Marko Mäkelä2018-08-031-0/+16
| |
* | MDEV-11953: support of brackets in UNION/EXCEPT/INTERSECT operationsOleksandr Byelkin2018-07-041-9/+24
|/
* MDEV-13232: Assertion `(&(&share->intern_lock)->m_mutex)->count > 0 && ↵Oleksandr Byelkin2018-04-231-0/+14
| | | | | | pthread_equal(pthread_self(), (&(&share->intern_lock)->m_mutex)->thread)' failed in _ma_state_info_write Limit length of result of "negative" operation to something reasonable
* Create 'main' test directory and move 't' and 'r' thereMichael Widenius2018-03-291-0/+2504