Commit graph

30 commits

Author SHA1 Message Date
Vicențiu Ciorbaru
f177f125d4 Merge branch '5.5' into 10.1 2019-05-11 19:15:57 +03:00
Michal Schorm
17b4f99928 Update FSF address
This commit is based on the work of Michal Schorm, rebased on the
earliest MariaDB version.

Th command line used to generate this diff was:

find ./ -type f \
  -exec sed -i -e 's/Foundation, Inc., 59 Temple Place, Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \
  -exec sed -i -e 's/Foundation, Inc. 59 Temple Place.* Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \
  -exec sed -i -e 's/MA.*.....-1307.*USA/MA 02110-1335 USA/g' {} \; \
  -exec sed -i -e 's/Foundation, Inc., 59 Temple/Foundation, Inc., 51 Franklin/g' {} \; \
  -exec sed -i -e 's/Place, Suite 330, Boston, MA.*02111-1307.*USA/Street, Fifth Floor, Boston, MA 02110-1335 USA/g' {} \; \
  -exec sed -i -e 's/MA.*.....-1307/MA 02110-1335/g' {} \;
2019-05-10 20:52:00 +03:00
iangilfillan
f0ec34002a Correct FSF address 2017-03-10 18:21:29 +01:00
Monty
3cb578c001 MDEV-6152: Remove calls to current_thd while creating Item
- Part 3: Adding mem_root to push_back() and push_front()

Other things:
- Added THD as an argument to some partition functions.
- Added memory overflow checking for XML tag's in read_xml()
2015-08-27 22:21:08 +03:00
Monty
1bae0d9e56 Stage 2 of MDEV-6152:
- Added mem_root to all calls to new Item
- Added private method operator new(size_t size) to Item to ensure that
  we always use a mem_root when creating an item.

This saves use once call to current_thd per Item creation
2015-08-21 10:40:51 +04:00
Sergey Vojtovich
31e365efae MDEV-8010 - Avoid sql_alloc() in Items (Patch #1)
Added mandatory thd parameter to Item (and all derivative classes) constructor.
Added thd parameter to all routines that may create items.
Also removed "current_thd" from Item::Item. This reduced number of
pthread_getspecific() calls from 290 to 177 per OLTP RO transaction.
2015-08-21 10:40:39 +04:00
Sergey Vojtovich
d12c7adf71 MDEV-5314 - Compiling fails on OSX using clang
This is port of fix for MySQL BUG#17647863.

revno: 5572
revision-id: jon.hauglid@oracle.com-20131030232243-b0pw98oy72uka2sj
committer: Jon Olav Hauglid <jon.hauglid@oracle.com>
timestamp: Thu 2013-10-31 00:22:43 +0100
message:
  Bug#17647863: MYSQL DOES NOT COMPILE ON OSX 10.9 GM

  Rename test() macro to MY_TEST() to avoid conflict with libc++.
2014-02-19 14:05:15 +04:00
Michael Widenius
3143ad589a Push a lot of small fixes to get larger parts to compile 2013-05-21 22:00:08 +03:00
Sergei Golubchik
edab37cd68 5.3 merge 2012-02-21 20:51:56 +01:00
Sergei Golubchik
5bf311e1e8 fix the include guards and add missing gplv2 headers 2012-02-17 12:19:38 +01: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
Sergei Golubchik
4f435bddfd 5.3 merge 2012-01-13 15:50:02 +01: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
Sergei Golubchik
d2755a2c9c 5.3->5.5 merge 2011-11-22 18:04:38 +01: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
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
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
Igor Babaev
deb3b9a174 Downported InnoDB support of Index Condition Pushdown from MySQL-5.6 code line. 2011-05-25 16:01:56 -07:00
Sergei Golubchik
0accbd0364 lots of post-merge changes 2011-04-25 17:22:25 +02:00
Igor Babaev
0f46efcba6 Post-review fixes for the patch that added the code allowing to use
hash join over equi-join conditions without supporting indexes.
2011-01-21 18:21:55 -08:00
Igor Babaev
d9a81475c7 Fixed LP bug#694092.
In some cases the function make_cond_for_index() was mistaken
when detecting index only pushdown conditions for a table: 
a pushdown condition that was not index only could be marked
as such.
It happened because the procedure erroneously used the markers
for index only conditions that remained from the calls of
this function that extracted the index conditions for other 
tables.
Fixed by erasing index only markers as soon as they are need
anymore.
2010-12-24 14:36:35 -08:00
Sergei Golubchik
65ca700def merge.
checkpoint.
does not compile.
2010-11-25 18:17:28 +01:00
Sergey Petrunya
9ab54acbf0 Merge MWL#121-125 DS-MRR improvements into MWL#128 Classic hash join tree 2010-11-15 04:45:49 +03:00
Igor Babaev
24f6a2ec4b Merge 2010-11-10 14:34:37 -08:00
Igor Babaev
6b67bafc74 Fixed LP bug #668644.
The pushdown condition for the sorted table in a query can be complemented
by the conditions from HAVING. This transformation is done in JOIN::exec
pretty late after the original pushdown condition have been saved in the
field pre_idx_push_select_cond for the sorted table. So this field must
be updated after the inclusion of the condition from HAVING.
2010-11-08 20:36:32 -08:00
Sergey Petrunya
7f059782d0 Merge MWL#121-124 DS-MRR support for key-ordered reads + MWL#128 BNL-Hash join 2010-11-01 20:43:02 +03:00
Igor Babaev
1320f6073c Fixed bug #54539.
Added a possibility not to factor out the condition pushed to
the access index out of the condition pushed to a joined table.
This is useful for the condition pushed to the index when a hashed
join buffer for BKA is employed. In this case the index condition
may be false for some, but for all records with the same key.
So the condition must be checked not only after index lookup,
but after fetching row data as well, and it makes sense not to 
factor out the condition from the condition checked after reading
row data,
The bug happened because the condition pushed to an index always
was factor out from the condition pushed to the accessed table.
2010-10-01 10:08:10 -07:00
Sergey Petrunya
3a5c004bb5 BUG#625841: Assertion `!table || (!table->read_set || bitmap_is_set
- When find_all_keys() checks which table columns are needed for table scan
  that is done before the sorting, it should also analyze pushed index condition.
  This is achieved by remembering/checking pre-index-pushed condition.
2010-09-15 16:14:19 +04: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