Commit graph

50 commits

Author SHA1 Message Date
Michael Widenius
a7abddeffa Create 'main' test directory and move 't' and 'r' there 2018-03-29 13:59:44 +03:00
Sergei Golubchik
c91ecf9e9b Merge branch '10.1' into 10.2
Revert commit db0917f68f, because the fix for MDEV-12696
is coming from 5.5 and 10.1 in this merge.
2017-05-09 13:24:52 +02:00
Sergei Golubchik
e74f2e2b86 Merge branch '10.0' 10.1 2017-04-28 20:19:32 +02:00
Sergei Golubchik
8d75a7533e Merge branch '5.5' into 10.0 2017-04-21 18:34:06 +02:00
Igor Babaev
b0395d8701 Fixed the bug mdev-12429 and its duplicates mdev-12145 and mdev-9886.
Also fixed a wrong result for a test case for mdev-7691
(the alternative one).
The test  cases for all these bug have materialized semi-joins used
inside dependent sub-queries.

The patch actually reverts the change inroduced by Monty in 2003.
It looks like this change is not valid anymore after the implementation
of semi-joins.
Adjusted output from EXPLAIN for many other test cases.
2017-04-04 10:04:52 -07:00
Nirbhay Choubey
8b2e642aa2 MDEV-7635: Update tests to adapt to the new default sql_mode 2017-02-10 06:30:42 -05:00
Sergei Golubchik
4a5d25c338 Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
Sergei Golubchik
2f20d297f8 Merge branch '10.0' into 10.1 2016-12-11 09:53:42 +01:00
Sergei Golubchik
7f2fd34500 MDEV-11231 Server crashes in check_duplicate_key on CREATE TABLE ... SELECT
be consistent and don't include the table name into the error message,
no other CREATE TABLE error does it.

(the crash happened, because thd->lex->query_tables was NULL)
2016-12-04 01:59:35 +01:00
Monty
af7490f95d Remove end . from error messages to get them consistent
Fixed a few failing tests
2016-10-05 01:11:08 +03:00
Jan Lindström
2e814d4702 Merge InnoDB 5.7 from mysql-5.7.9.
Contains also

MDEV-10547: Test multi_update_innodb fails with InnoDB 5.7

	The failure happened because 5.7 has changed the signature of
	the bool handler::primary_key_is_clustered() const
	virtual function ("const" was added). InnoDB was using the old
	signature which caused the function not to be used.

MDEV-10550: Parallel replication lock waits/deadlock handling does not work with InnoDB 5.7

	Fixed mutexing problem on lock_trx_handle_wait. Note that
	rpl_parallel and rpl_optimistic_parallel tests still
	fail.

MDEV-10156 : Group commit tests fail on 10.2 InnoDB (branch bb-10.2-jan)
  Reason: incorrect merge

MDEV-10550: Parallel replication can't sync with master in InnoDB 5.7 (branch bb-10.2-jan)
  Reason: incorrect merge
2016-09-02 13:22:28 +03:00
Oleksandr Byelkin
e3982cead2 MDEV-6066: Merge new defaults from 5.6 and 5.7 (defaults changed, QC can be stopped with no-zero size) 2015-09-04 10:33:56 +02:00
Alexander Barkov
768620ee5c MDEV-8189 field<>const and const<>field are not symmetric 2015-06-30 12:56:31 +04:00
Sergei Golubchik
72c20282db 10.0-base merge 2014-02-03 15:22:39 +01:00
Sergey Petrunya
e1f94a6985 MDEV-5337: Wrong result in mariadb 5.5.32 with ORDER BY + LIMIT when index_condition_pushdown=on
- in test_if_skip_sort_order(), correct the condition under which
  we have the code that restores the previously pushed index condition.
2014-01-24 23:40:48 +04:00
unknown
192bafe526 Check for duplicate index (port from mysql)
(pre fts)
2013-09-20 22:30:19 +03:00
Sergey Petrunya
47c1b04079 MDEV-4778: Incorrect results from Aria/MyISAM SELECT using index with prefix length on TEXT column
Backport the fix olav.sandstaa@sun.com-20101102184747-qfuntqwj021imy9r:
"Fix for Bug#52660 Perf. regr. using ICP for MyISAM on range queries on an index containing TEXT" 
(together with further fixes in that code) into MyISAM and Aria.
2013-07-16 10:56:42 +04:00
unknown
8efc63ba5d Merge 2012-06-06 16:19:48 +03:00
Sergei Golubchik
265d5aaa2e MDEV-308 lp:1008516 - Failing assertion: templ->mysql_col_len == len
remove the offending assert.
take the test case from mysql Bug#58015
2012-06-04 23:22:03 +02:00
Sergei Golubchik
580eca69ae typo fixed: space in the status variable name 2012-04-17 20:25:03 +02:00
unknown
c299e027ee Changed names of statistic variables and counting matches instaed of rejected rows. 2012-02-22 10:38:28 +02:00
Sergey Petrunya
541334c5ac Backport of:
timestamp: Thu 2011-12-01 15:12:10 +0100
Fix for Bug#13430436 PERFORMANCE DEGRADATION IN SYSBENCH ON INNODB DUE TO ICP

When running sysbench on InnoDB there is a performance degradation due
to index condition pushdown (ICP). Several of the queries in sysbench
have a WHERE condition that the optimizer uses for executing these
queries as range scans. The upper and lower limit of the range scan
will ensure that the WHERE condition is fulfilled. Still, the WHERE
condition is part of the queries' condition and if ICP is enabled the
condition will be pushed down to InnoDB as an index condition. 

Due to the range scan's upper and lower limits ensure that the WHERE
condition is fulfilled, the pushed index condition will not filter out
any records. As a result the use of ICP for these queries results in a
performance overhead for sysbench. This overhead comes from using
resources for determining the part of the condition that can be pushed
down to InnoDB and overhead in InnoDB for executing the pushed index
condition.

With the default configuration for sysbench the range scans will use
the primary key. This is a clustered index in InnoDB. Using ICP on a
clustered index provides the lowest performance benefit since the
entire record is part of the clustered index and in InnoDB it has the
highest relative overhead for executing the pushed index condition.

The fix for removing the overhead ICP introduces when running sysbench
is to disable use of ICP when the index used by the query is a
clustered index.

When WL#6061 is implemented this change should be re-evaluated.
2012-02-16 20:15:57 +04:00
unknown
607aab9c1d Counters for Index Condition Pushdown added (MDEV-130). 2012-02-16 08:49:10 +02:00
Sergei Golubchik
3f28115e0e 5.3 merge 2012-02-24 14:37:00 +01:00
Sergey Petrunya
925942e7af Merge fix for BUG#920132 2012-02-22 12:21:54 +04:00
Sergey Petrunya
352e848f21 BUG#920132: Assert trx->n_active_thrs == 1 failed at que0que.c line 1050
- MySQL 5.5 introduced caching of constant items by means of 
  wrapping them in Item_cache_XXX objects. If a subquery was wrapped
  in this cache, it could end up being pushed down by ICP.
- The fix is to add Item_cache::walk() which lets ICP to see that 
  the cache item has a subquery inside it, and disable pushdown for this case.
2012-02-21 01:50:50 +04:00
Igor Babaev
2b1f0b8757 Back-ported the patch of the mysql-5.6 code line that
fixed several defects in the greedy optimization:

1) The greedy optimizer calculated the 'compare-cost' (CPU-cost)
   for iterating over the partial plan result at each level in
   the query plan as 'record_count / (double) TIME_FOR_COMPARE'

   This cost was only used locally for 'best' calculation at each
   level, and *not* accumulated into the total cost for the query plan.

   This fix added the 'CPU-cost' of processing 'current_record_count'
   records at each level to 'current_read_time' *before* it is used as
   'accumulated cost' argument to recursive 
   best_extension_by_limited_search() calls. This ensured that the
   cost of a huge join-fanout early in the QEP was correctly
   reflected in the cost of the final QEP.

   To get identical cost for a 'best' optimized query and a
   straight_join with the same join order, the same change was also
   applied to optimize_straight_join() and get_partial_join_cost()

2) Furthermore to get equal cost for 'best' optimized query and a
   straight_join the new code substrcated the same '0.001' in
   optimize_straight_join() as it had been already done in
   best_extension_by_limited_search()

3) When best_extension_by_limited_search() aggregated the 'best' plan a
   plan was 'best' by the check :

   'if ((search_depth == 1) || (current_read_time < join->best_read))'

   The term '(search_depth == 1' incorrectly caused a new best plan to be
   collected whenever the specified 'search_depth' was reached - even if
   this partial query plan was more expensive than what we had already
   found.
2011-12-24 08:55:10 -08:00
Igor Babaev
7a1406f229 Fixed LP bug #904832.
Do not perform index condition pushdown for conditions containing subqueries
and stored functions.
2011-12-18 23:38:37 -08:00
Michael Widenius
6d4224a31c Merge with 5.2.
no_error handling for select (used by INSERT ... SELECT) still needs to be fixed, but I will do that in a separate commit
2011-12-11 11:34:44 +02:00
Igor Babaev
b91a6bd88b Fixed LP bug #879871.
The function add_ref_to_table_cond missed updating the value of
join_tab->pre_idx_push_select_cond after having updated the value
of join_tab->select->pre_idx_push_select_cond.
2011-11-11 14:53:26 -08:00
Igor Babaev
e0c1b3f242 Fixed LP bug #886145.
The bug happened because in some cases the function JOIN::exec
did not save the value of TABLE::pre_idx_push_select_cond in
TABLE::select->pre_idx_push_select_cond for the sort table.

Noticed and fixed a bug in the function make_cond_remainder
that builds the remainder condition after extraction of an index
pushdown condition from the where condition. The code
erroneously assumed that the function make_cond_for_table left
the value of ICP_COND_USES_INDEX_ONLY in sub-condition markers.
Adjusted many result files from the regression test suite
after this fix .
2011-11-06 01:23:03 -07:00
Igor Babaev
928e94fb98 Fixed LP bug #885168.
The call of the virtual function cancel_pushed_idx_cond in the code of
the function test_if_skip_sort_order was misplaced when backporting the
fix for bug 58816.
2011-11-04 05:39:45 -07:00
Igor Babaev
a70f7aa5fe Backported the fix and the test case for bug 12822678 from the mysql-5.6 code line.
Fixed a bug in select_describe.
Adjusted results for affected test cases.
2011-11-01 07:00:55 -07:00
Igor Babaev
3a7169572c Backported the test case for bug 59843 from the mysql-5.6 code line.
(Failed to reproduce the bug in mariadb-5.3).
2011-10-31 01:13:12 -07:00
Igor Babaev
7dd42686fe Backported the fix and the test case for bug 59483 from the mysql-5.6 code line. 2011-10-30 06:17:07 -07:00
Igor Babaev
e5627c9802 Backported the test case for bug 58838 from mysql-5.6 code line.
The bug was fixed by the patches for LP bugs 668644,702322 that
were applied earlier to the mariadb-5.3 code.
2011-10-30 04:18:09 -07:00
Igor Babaev
c118219f38 Backported the test case for bug 59186 from mysql-5.6 code line.
The bug was fixed by the patch for LP bug 694092 that was
applied earlier to the mariadb-5.3 code.
2011-10-30 03:34:26 -07:00
Igor Babaev
4cf3cb7240 Backported the test case for bug 58837. The fix was backported earlier. 2011-10-30 02:37:10 -07:00
Igor Babaev
7bc6a83b02 Backported the fix and the test case for bug #58816 from mysql-5.6 code line. 2011-10-29 15:36:24 -07:00
Igor Babaev
4b4dfd57f5 Merge. 2011-10-28 04:07:11 -07:00
Sergey Petrunya
2a9c86be26 BUG#778434 Wrong result with in_to_exists=on in maria-5.3-mwl89
- Make {ha_myisam,ha_maria}::index_read_idx_map check pushed index condition.
- Address review feedback (added comments)
2011-07-14 17:44:37 +04:00
Sergey Petrunya
1492de8563 Set the default to be mrr=off,mrr_sort_keys=off:
- Set the default
- Adjust the testcases so that 'new' tests are run with optimizations turned on.
- Pull out relevant tests from "irrelevant" tests and run them with optimizations on.
- Run range.test and innodb.test with both mrr=on and mrr=off
2011-07-08 18:46:47 +04:00
Igor Babaev
37f3a801f3 Backported the test case for bug 52605. 2011-05-29 11:09:05 -07:00
Igor Babaev
061060eac0 Backported the test case for bug 52660 from mysql code line.
Extended the test case to show how MariaDB applies ICP for
indexes with some components defined on the beginning of fields.
2011-05-27 20:50:06 -07:00
Igor Babaev
42cc59a8c1 Backported the test case for bug 43618 from mysql code line. 2011-05-27 17:04:29 -07:00
Igor Babaev
d86ad1861a Backported the test case for bug 43617 fixed by the patch for bug 42580.
Backported the test case for bug 49906 fixed by the patch for LP bug 625841.
Slightly optimized the code of the fix for LP bug 625841.
2011-05-27 15:20:19 -07:00
Igor Babaev
deb3b9a174 Downported InnoDB support of Index Condition Pushdown from MySQL-5.6 code line. 2011-05-25 16:01:56 -07:00
Igor Babaev
777b6b8ccb Backported test case for bug #36981. 2011-02-08 19:17:12 -08:00
Sergey Petrunya
2d9f69334f Backport of:
3150 Olav Sandstaa     2010-05-07
Test cases for the following "ICP for InnoDB" bugs:

Bug#40992 InnoDB: Crash when engine_condition_pushdown is on
Bug#35080 Innodb crash at mem_block_get_len line 72
Bug#41996 multi-table delete crashes server (InnoDB table)
Bug#43448 Server crashes on multi table delete with Innodb

All these bugs are duplicates of either one or both of Bug 43360 or 36981.

(backporting of olav@sun.com-20100226091930-qxvakxmcp6463t5w)
2011-01-14 17:30:27 +03:00
Sergey Petrunya
d0535d80a1 Test case backport for: Bug#42580 - Innodb's ORDER BY ..LIMIT returns no rows for null-safe operator <=> NULL 2011-01-14 16:38:41 +03:00