Commit graph

59501 commits

Author SHA1 Message Date
Sergey Petrunya
f4d5521043 BUG#31480: Incorrect result for nested subquery when executed via semi join
- Variant #3 of the fix. It also
 = Unifies code with table elimination's 
 = is able to handle FROM-subquery pullout.
2010-02-12 02:59:58 +03:00
Sergey Petrunya
17116d5155 Subquery optimizations: backport: enable disabled subquery code in BKA 2010-02-12 01:31:18 +03:00
Sergey Petrunya
2e593af663 Subquery optimizations: backport
- Fix valgrind failure: do initialize Item::is_expensive_cache.
2010-02-12 01:00:36 +03:00
Sergey Petrunya
d10ca84f45 Subquery optimizations backport: Update test results (checked) 2010-02-12 00:59:32 +03:00
Sergey Petrunya
5c836140a5 Apply Jorgen Loland's fix: Bug#45221: Query "SELECT pk FROM C WHERE pk IN (SELECT int_key)" failing
XOR conditions are not optimized, and Item_cond_xor therefore
acts like type Func_item even though it inherits from Item_cond.
A subtle difference between Item_func and Item_cond is that
you can get the children Items from the former by calling
arguments(), and from the latter by calling argument_list().
However, since Item_cond_xor inherits from Item_cond,
arguments() did not return any Items.

The fact that Item_cond_xor::arguments() did not return it's
children items lead to a problem for make_cond_for_index();
the method accepted that XOR items on unindexed columns were
pushed using ICP. ICP evaluation of non-indexed columns
does not (and should not) work.

The fix for this bug is to make Item_cond_xor return it's
children items when the arguments() method is used. This makes
Item_cond_xor behave more like Item_func and in turn allows
make_cond_for_index() to discover any conflicting children
Items.

This is a temporary fix and should be removed when Item_cond_xor
 is optimized.
2010-02-12 00:58:23 +03:00
Sergey Petrunya
64e63fb85d Subquery backport: Update test results (checked) 2010-02-12 00:56:02 +03:00
Sergey Petrunya
0857a5b844 Subquery optimization backport: Duplicate Elimination:
process temporary table overflow correctly.
2010-02-12 00:54:56 +03:00
Sergey Petrunya
f47b2d38f6 Subquery optimizations: non-semijoin materialization
- Backport into Maria DB 5.3, part 1
2010-01-28 16:48:33 +03:00
Sergey Petrunya
742afd8eae Subquery optimizations: Backport into 5.3:
- Enable semi-join handling in the join cache code
2010-01-19 01:32:23 +03:00
Sergey Petrunya
085e8b6935 Subquery optimizations, backport to 5.3:
- Fix valgrind failure
- Test result fixes (not finished)
2010-01-17 23:52:20 +03:00
Sergey Petrunya
8f69764b75 Fix incorrect merge 2010-01-17 18:01:59 +03:00
Sergey Petrunya
788941f511 Merge 2010-01-17 17:55:08 +03:00
Sergey Petrunya
b83cb52e9e Backport of subquery optimizations to 5.3.
There are still test failures because of:
- Wrong query results in outer join + semi join
- EXPLAIN output differences
2010-01-17 17:51:10 +03:00
Sergey Petrunya
828b7e2bf5 Backport of subquery optimizations to 5.3 2010-01-01 10:36:55 +02:00
Sergey Petrunya
1a490f2da4 DS-MRR backport: fix buildbot valgrind failures:
- Do call update_used_tables() for new conditions obtained when adding
  outer join's triggered conditions. Correct values of used_tables() are
  now needed for condition pushdown.
- Update test results

mysql-test/suite/pbxt/r/join_outer.result:
  DS-MRR backport:
  - Update test results
sql/sql_select.cc:
  DS-MRR backport: fix buildbot valgrind failures:
  - Do call update_used_tables() for new conditions obtained when adding
    outer join's triggered conditions. Correct values of used_tables() are
    now needed for condition pushdown.
2009-12-27 23:24:22 +03:00
Igor Babaev
18fc4a7753 Merge 2009-12-22 07:18:49 -08:00
Igor Babaev
185a6f75ce Added the include files needed for join_cache.test. 2009-12-22 07:12:09 -08:00
Sergey Petrunya
3fb65a1ac2 - Make testcase work for both debug and release
- Add opt_range_mrr.cc file into source repo

mysql-test/r/myisam_mrr.result:
  Make testcase work for both debug and release
mysql-test/t/myisam_mrr.test:
  Make testcase work for both debug and release
sql/Makefile.am:
  - Add opt_range_mrr.cc file into source repo
2009-12-22 17:43:00 +03:00
Sergey Petrunya
19c8976d85 Merge MWL#67: MRR Backport and BKA backport. 2009-12-22 15:49:15 +03:00
Sergey Petrunya
da5edf5057 MWL#67: MRR backport
- Make index condition pushdown be controlled by an @@optimizer_switch flag,
  not by @@engine_condition_pushdown
- Make MRR buffer size be controlled by @@mrr_buffer_size, not 
  by @@read_rnd_buffer_size
- Move parts of code to separate files
- Code cleanup
- Add --sorted_result to some SELECTs in tests.
2009-12-22 15:33:21 +03:00
Igor Babaev
26d675c638 Merge from 5.2-dsmrr 2009-12-21 10:34:47 -08:00
Igor Babaev
4449a5f489 Backport into MariaDB-5.2 the following:
WL#2771 "Block Nested Loop Join and Batched Key Access Join"
2009-12-20 18:26:15 -08:00
Sergey Petrunya
19f6f52a21 DS-MRR backport: Update test results (checked) 2009-12-19 22:54:54 +03:00
Sergey Petrunya
3cc3938b19 DS-MRR backport:
- Fix PBXT test results (PBXT doesn't support MRR or ICP, but we get result 
  diffs because we've also backported a fix that
  - prints out "Using where" when the table has part of WHERE that it has 
    got from LEFT JOIN's ON expression
  - Does a better job at removing equalities that are guaranteed to be true 
    by use of ref acccess.
2009-12-16 12:28:51 +03:00
Sergey Petrunya
663dadc8f9 Add ds_mrr.cc to CMakeLists.txt 2009-12-16 01:37:39 +03:00
Sergey Petrunya
7469484b3c Fix compile failure 2009-12-16 00:35:55 +03:00
Sergey Petrunya
59b6472010 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"
- Adjust test results (checked)
- Code cleanup.
2009-12-15 20:23:55 +03:00
Sergey Petrunya
2a496c4dcf 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"
- Fix valgrind failures
2009-12-15 17:53:30 +03: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
Igor Babaev
e4e1ae0d13 Merge of the patch introducing virtual columns into maria-5.2 2009-11-11 20:31:28 -08:00
Igor Babaev
d749c7e600 Merge 2009-11-09 18:32:39 -08:00
unknown
9b7a0fddbe Result file update for new FederatedX 2009-11-07 07:29:10 +01:00
unknown
e33e42769a Merge 5.1-release branch into MariaDB trunk. 2009-11-06 18:24:38 +01:00
unknown
ad368a2b54 Merge Mysql 5.1.39 merge into MariaDB trunk 2009-11-06 18:22:32 +01:00
unknown
3dcbe769fb Fix running test suite from installed package.
Some files are in different locations in this case.
2009-11-05 14:40:01 +01:00
Sergey Petrunya
99d8d44020 MWL#36: Add a mysqlbinlog option to change the used database
- Merge to MariaDB 5.2
2009-11-05 01:41:58 +03:00
unknown
716c099363 Add federatedx files for build
storage/federatedx/CMakeLists.txt:
  Add fedrated files for build
2009-11-03 16:39:54 +02:00
unknown
cea82db95c Make federated compiling under windows
storage/federatedx/ha_federatedx.cc:
  lower_case_file_system do not suported for windows dll
2009-11-03 13:08:09 +02:00
unknown
134ac8483a Fixed federatedx building under windows
storage/federatedx/CMakeLists.txt:
  removed the same goals for federated and federatedx
2009-11-02 21:17:58 +02:00
Michael Widenius
a6793a48e2 Fixed problem with schema tables and DECIMAL
sql/sql_show.cc:
  Change decimal item to type holder, to be able to define the decimals and max_length for the DECIMAL
  field from the schema specification instead of the value of the item.
2009-11-02 11:30:21 +02:00
Hakan Kuecuekyilmaz
578f4b651e Merge. 2009-11-01 18:41:16 +01:00
Hakan Kuecuekyilmaz
10aeefce56 Merge. 2009-11-01 18:37:37 +01:00
Hakan Kuecuekyilmaz
70fbd55615 BUILD/compile-dist && make dist was not working due to typos.
Fixed by renaming a file and editing the typo in Makefile.am
2009-11-01 16:09:55 +01:00
unknown
6cabc7abb8 Compilation under windows x64 made possible.
sql/mysqld.cc:
  Explicit type casting required by windows x64 compiler.
storage/xtradb/include/srv0srv.h:
  Parameters should be declared as ulong.
storage/xtradb/srv/srv0srv.c:
  Parameters should be declared as ulong.
2009-10-31 21:22:50 +02:00
Arjen Lentz
0673379006 libevent fixup required for Debian 4 (Etch)
Also missing copyright for copied macros.
Fix by Antony Curtis.
2009-10-31 15:29:16 +10:00
Michael Widenius
316111dd89 Merge with 5.1-release 2009-10-30 22:28:11 +02:00
Michael Widenius
d6f4b9755c Merge of FederatedX code 2009-10-30 22:16:08 +02:00
Michael Widenius
60c4f0f87b Added ignore for symlinked build file 2009-10-30 20:51:46 +02:00
Michael Widenius
226f0c7601 Added federatedx storage engine
Fixed compiler warnings


client/mysqladmin.cc:
  Fixed compiler warning
extra/yassl/taocrypt/src/twofish.cpp:
  Fixed compiler warning
libmysqld/Makefile.am:
  Use federatedx instead of federated
  (Should actually be removed)
mysql-test/mysql-test-run.pl:
  Fixed warning
mysql-test/valgrind.supp:
  Removed warning found on 64 bit Linux machine
storage/pbxt/src/cache_xt.cc:
  Fixed compile warning
storage/xtradb/include/buf0buf.ic:
  Fixed compiler warning
2009-10-30 20:50:56 +02:00
Sergey Petrunya
182aa542bc Dummy change to push the release tag. 2009-10-30 13:50:48 +03:00