Commit graph

20 commits

Author SHA1 Message Date
Sergei Golubchik
9af177042e 10.0-base merge.
Partitioning/InnoDB changes are *not* merged (they'll come from 5.6)
TokuDB does not compile (not updated to 10.0 SE API)
2013-09-21 10:14:42 +02:00
Sergey Petrunya
04684b7709 MDEV-4817: Optimizer fails to optimize expression of the form 'FOO' IS NULL
- Modify the way Item_cond::fix_fields() and Item_cond::eval_not_null_tables() 
  calculate bitmap for Item_cond_or::not_null_tables():
  if they see a "... OR inexpensive_const_false_item OR ..." then the item can
  be ignored.
- Updated test results. There can be more warnings produced since parts of WHERE 
  are evaluated more times.
2013-07-31 17:24:52 +04:00
Sergei Golubchik
13dca0125a more post-merge fixes:
* update results
* don't force HA_CREATE_DELAY_KEY_WRITE on all temp tables,
  (bad for CREATE ... LIKE) instead imply it in myisam/aria
* restore HA_ERR_TABLE_DEF_CHANGED in archive
* increase the default number of rwlock classes in P_S to fit all our rwlocks
2013-07-21 19:24:20 +02:00
Sergey Petrunya
c0ca15ab9c MDEV-4270: crash in fix_semijoin_strategies_for_picked_join_order
- Added testcase
2013-05-04 01:08:20 +04:00
Igor Babaev
e91e8c8c0b Merge 5.3->5.5. 2013-03-28 19:18:36 -07:00
Igor Babaev
21dad7ec30 Fixed bug mdev-4318.
In some cases, when using views the optimizer incorrectly determined
possible join orders for queries with nested outer and inner joins.
This could lead to invalid execution plans for such queries.
2013-03-22 21:33:06 -07:00
Igor Babaev
8b469eb515 Merge 5.3->5.5. 2012-03-01 14:22:22 -08:00
Sergey Petrunya
2256ecdd7c Merge 5.2->5.3 2012-02-24 20:07:12 +04:00
Igor Babaev
e0a5319db3 Back-ported the fix and test cases for bugs #59487 and #43368 from
the mysql-5.6 code line.
2012-02-22 00:10:39 -08:00
Sergei Golubchik
25609313ff 5.3.4 merge 2012-02-15 18:08:08 +01:00
Igor Babaev
7b79d8a33f Merge 5.2->5.3 in preparation for the release of mariadb-5.3.4-rc. 2012-02-01 15:48:02 -08:00
Igor Babaev
74fdbec68e Fixed LP bug #848652.
The cause of this bug was the same as for bug 902356 fixed for 5.3.
2011-12-29 21:55:17 -08:00
Sergei Golubchik
76f0b94bb0 merge with 5.3
sql/sql_insert.cc:
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
  ******
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
  small cleanup
  ******
  small cleanup
2011-10-19 21:45:18 +02:00
Sergei Golubchik
9809f05199 5.5-merge 2011-07-02 22:08:51 +02:00
Jorgen Loland
47b774b21c BUG#58456 - Assertion 0 in QUICK_INDEX_MERGE_SELECT::need_sorted_output
in opt_range.h

In this bug, there are two alternative access plans: 
 * Index merge range access
 * Const ref access

best_access_path() decided that the ref access was preferrable, 
but make_join_select() still decided to point 
SQL_SELECT::quick to the index merge because the table had 
type==JT_CONST which was not handled. 

At the same time the table's ref.key still referred to the 
index the ref access would use indicating that ref access 
should be used. In this state, different parts of the 
optimizer code have different perceptions of which access path
is in use (ref or range).

test_if_skip_sort_order() was called to check if the ref access
needed ordering, but test_if_skip_sort_order() got confused and
requested the index merge to return records in sorted order. 
Index merge cannot do this, and fired an ASSERT.

The fix is to take join_tab->type==JT_CONST into concideration
when make_join_select() decides whether or not to use the 
range access method.

mysql-test/r/join_outer_innodb.result:
  Add test for BUG#58456
mysql-test/t/join_outer_innodb.test:
  Add test for BUG#58456
2010-12-16 12:25:02 +01:00
Sergey Petrunya
96e092dc73 Backport into MariaDB-5.2 the following:
WL#2474 "Multi Range Read: Change the default MRR implementation to implement new MRR interface"
WL#2475 "Batched range read functions for MyISAM/InnoDb"
        "Index condition pushdown for MyISAM/InnoDB"
Igor's fix from sp1r-igor@olga.mysql.com-20080330055902-07614:
  There could be observed the following problems:
  1. EXPLAIN did not mention pushdown conditions from on expressions in the 
  'extra' column.  As a result if a query had no where conditions pushed 
  down to a table, but had on conditions pushed to this table the 'extra' 
  column in the EXPLAIN for the table missed 'using where'.
  2. Conditions for ref access were not eliminated from on expressions 
  though such conditions were eliminated from the where condition.
2009-12-15 10:16:46 +03:00
unknown
87e5098249 BUG#35850 "Performance regression in 5.1.23/5.1.24"
- Disable the "prefer full scan on clustered primary key over full scan
  of any secondary key" rule introduced by BUG#35850.
- Update test results accordingly 
(bk trigger: file this for BUG#35850)


mysql-test/r/innodb.result:
  BUG#35850 "Performance regression in 5.1.23/5.1.24"
  - Update test results
mysql-test/r/innodb_mysql.result:
  BUG#35850 "Performance regression in 5.1.23/5.1.24"
  - Testcase
  - Update test results
mysql-test/r/join_outer_innodb.result:
  BUG#35850 "Performance regression in 5.1.23/5.1.24"
  - Update test results
mysql-test/t/innodb_mysql.test:
  BUG#35850 "Performance regression in 5.1.23/5.1.24"
  - Testcase
sql/sql_select.cc:
  BUG#35850 "Performance regression in 5.1.23/5.1.24"
  - Disable the "prefer full scan on clustered primary key over full scan
    of any secondary key" rule introduced by BUG#35850.
2008-05-07 09:58:21 +04:00
unknown
9d2b259e23 Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB
and auto_increment keys

Problems: 
  1. ALTER TABLE ... ORDER BY... doesn't make sence if there's a 
     user-defined clustered index in the table.
  2. using a secondary index is slower than using a clustered one 
     for a table scan.

Fixes:
  1. raise a warning.
  2. use the clustered index.


mysql-test/include/mix1.inc:
  Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB 
  and auto_increment keys
    - test case.
mysql-test/r/innodb.result:
  Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB 
  and auto_increment keys
    - results adjusted.
mysql-test/r/innodb_mysql.result:
  Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB 
  and auto_increment keys
    - results adjusted.
mysql-test/r/join_outer_innodb.result:
  Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB 
  and auto_increment keys
    - results adjusted.
sql/sql_select.cc:
  Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB 
  and auto_increment keys
    - use the clustered index for a table scan (if any) as it's faster than
      using a secondary index.
sql/sql_table.cc:
  Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB 
  and auto_increment keys
    - ALTER TABLE ... ORDER BY doesn't make sence if there's a 
      user-defined clustered index in the table. Ignore it in such cases
      and raise a warning.
2007-11-07 19:59:58 +04:00
unknown
fda6adec75 Update test results
Fix merge problem


mysql-test/r/join_outer_innodb.result:
  Update test result
mysql-test/t/group_min_max.test:
  Add missing drop table (lost during merge)
2006-06-11 09:04:23 +02:00
unknown
0dbe99f8aa Move innodb dependent test to join_outer_innodb
mysql-test/r/join_outer_innodb.result:
  New BitKeeper file ``mysql-test/r/join_outer_innodb.result''
mysql-test/t/join_outer_innodb.test:
  New BitKeeper file ``mysql-test/t/join_outer_innodb.test''
2006-05-22 13:57:32 +02:00