Commit graph

175476 commits

Author SHA1 Message Date
Marko Mäkelä
b61700c221 Merge 10.0 into 10.1 2017-05-23 08:59:03 +03:00
Vladislav Vaintroub
70df2bef7a Merge branch 'bb-10.1-wlad' into 10.1 2017-05-22 13:49:37 +00:00
Rasmus Johansson
2c69c428a7 Changing maturity to stable
Additional tests have been done and conclusion was to update maturity to stable
2017-05-22 13:33:37 +03:00
Vladislav Vaintroub
ee4eda40b9 MDEV-12832 : remove libarchive support from mariabackup,
due to different packaging issues.

Also, Percona thinks that tar support has  many limitations
and should be removed as well( see discussion  in
https://bugs.launchpad.net/percona-xtrabackup/+bug/1681721)

there is an alternative streaming format xbstream that is supported and
does not have these limitations.
2017-05-21 22:19:06 +00:00
Jan Lindström
90c52e5291 MDEV-12615: InnoDB page compression method snappy mostly does not compress pages
Snappy compression method require that output buffer
used for compression is bigger than input buffer.
Similarly lzo require additional work memory buffer.
Increase the allocated buffer accordingly.

buf_tmp_buffer_t: removed unnecessary lzo_mem, crypt_buf_free and
comp_buf_free.

buf_pool_reserve_tmp_slot: use alligned_alloc and if snappy
available allocate size based on snappy_max_compressed_length and
if lzo is available increase buffer by LZO1X_1_15_MEM_COMPRESS.

fil_compress_page: Remove unneeded lzo mem (we use same buffer)
and if output buffer is not yet allocated allocate based similarly
as above.

Decompression does not require additional work area.

    Modify test to use same test as other compression method tests.
2017-05-20 21:51:34 +03:00
Marko Mäkelä
f880200974 After-merge fix: Correct the 32-bit XtraDB result diff. 2017-05-20 17:47:07 +03:00
Marko Mäkelä
fe291c687d After-merge fix: Correct the XtraDB result diff. 2017-05-20 08:43:30 +03:00
Marko Mäkelä
45fe62b8d6 Clean up a test
Changed global parameters will be reset by server restart.
There is no need to save and restore the original values.
2017-05-20 08:41:34 +03:00
Marko Mäkelä
a4d4a5fe82 After-merge fix for MDEV-11638
In commit 360a4a0372
some debug assertions were introduced to the page flushing code
in XtraDB. Add these assertions to InnoDB as well, and adjust
the InnoDB shutdown so that these assertions will not fail.

logs_empty_and_mark_files_at_shutdown(): Advance
srv_shutdown_state from the first phase SRV_SHUTDOWN_CLEANUP
only after no page-dirtying activity is possible
(well, except by srv_master_do_shutdown_tasks(), which will be
fixed separately in MDEV-12052).

rotate_thread_t::should_shutdown(): Already exit the key rotation
threads at the first phase of shutdown (SRV_SHUTDOWN_CLEANUP).

page_cleaner_sleep_if_needed(): Do not sleep during shutdown.
This change is originally from XtraDB.
2017-05-20 08:41:34 +03:00
Marko Mäkelä
65e1399e64 Merge 10.0 into 10.1
Significantly reduce the amount of InnoDB, XtraDB and Mariabackup
code changes by defining pfs_os_file_t as something that is
transparently compatible with os_file_t.
2017-05-20 08:41:20 +03:00
Sergei Golubchik
725e47bfb5 Merge branch '5.5' into 10.0 2017-05-20 00:59:40 +02:00
Sergei Golubchik
eb30230359 compilation warnings in Connect 2017-05-19 22:27:26 +02:00
Sergei Golubchik
6dcc378964 MDEV-10788 Not able to compile source with -DBUILD_CONFIG=mysql_release -DCMAKE_BUILD_TYPE=Debug
fix incorrect merge, 831b531895 was not fully merged into 10.0
2017-05-19 20:26:56 +02:00
Sergei Golubchik
7c03edf2fe MDEV-6262 analyze the coverity report on mariadb
uploaded 10.0, analyzed everything with the Impact=High
(and a couple of Medium)
2017-05-19 20:26:56 +02:00
Marko Mäkelä
13a350ac29 Merge 10.0 into 10.1 2017-05-19 12:29:37 +03:00
Sachin Setiya
7d57ba6e28 MDEV-11092 :- Fix Previous commit of MDEV-11092 2017-05-19 13:02:45 +05:30
Marko Mäkelä
335c4ab790 Remove dead code added in merge commit d8b45b0c00
In a merge conflict resolution, callers of the added function
rec_field_len_in_chars() were removed, but the function itself was not.
2017-05-19 09:51:44 +03:00
Oleksandr Byelkin
4a846e018d Make IF clear. 2017-05-18 19:31:44 +02:00
Vicențiu Ciorbaru
546a89ca58 Update xtradb and innodb version to 5.6.36 2017-05-18 16:16:18 +03:00
Vicențiu Ciorbaru
3c7af6c490 Fix xtradb handler compilation post merge 2017-05-18 15:46:31 +03:00
Vicențiu Ciorbaru
45898c2092 Merge remote-tracking branch 'origin/10.0' into 10.0 2017-05-18 15:45:55 +03:00
Sachin Setiya
b5cdf01404 MDEV-11092 Assertion `!writer.checksum_len || writer.remains == 0' failed
Problem:-
This crash happens because logged stmt is quite big and while writing
Annotate_rows_log_event it throws EFBIG error  but we ignore this error
and do not call cache_data->set_incident().

Solution:-
When we normally write Binlog_log_event we check for error EFBIG, but we did
do this for Annotate_rows_log_event. We check for this error and call
cache_data->set_incident() accordingly.

# Conflicts:
#	sql/log.cc
2017-05-18 17:13:37 +05:30
Vladislav Vaintroub
d0eb4ee96b Backport aws kms build fixes from 10.2 2017-05-18 11:01:34 +00:00
Vladislav Vaintroub
9dffa3072c MDEV-12810 - force static build of crc library 2017-05-18 11:01:34 +00:00
Vladislav Vaintroub
40c7778e05 MDEV-12814 mariabackup : don't try io throttling in copy-back
Throttling only works with when creating backup.  Attempt to use it with
 --copy-back results in crash, since throttle events are not initialized.
Thus, ignore throttling unless --backup is given.
2017-05-18 11:01:34 +00:00
Oleksandr Byelkin
648d866150 Fixed typo in the case operator. 2017-05-18 12:24:44 +02:00
Elena Stepanova
bc622fb280 List of unstable tests for 10.0.31 release 2017-05-18 10:47:16 +03:00
Jan Lindström
f302a3cf9d MDEV-12593: InnoDB page compression should use lz4_compress_default if
available

lz4.cmake: Check if shared or static lz4 library has LZ4_compress_default
function and if it has define HAVE_LZ4_COMPRESS_DEFAULT.

fil_compress_page: If HAVE_LZ4_COMPRESS_DEFAULT is defined use
LZ4_compress_default function for compression if not use
LZ4_compress_limitedOutput function.

Introduced a innodb-page-compression.inc file for page compression
tests that will also search .ibd file to verify that pages
are compressed (i.e. used search string is not found). Modified
page compression tests to use this file.

Note that snappy method is not included because of MDEV-12615
InnoDB page compression method snappy mostly does not compress pages
that will be fixed on different commit.
2017-05-18 09:29:44 +03:00
Marko Mäkelä
54bb04f7ef Fix some __attribute__((nonnull)) misuse
This fixes warnings that were emitted when running InnoDB test
suites on a debug server that was compiled with GCC 7.1.0 using
the flags -O3 -fsanitize=undefined.

thd_requested_durability(): XtraDB can call this with trx->mysql_thd=NULL.
Remove the function in InnoDB, because it is not used there.

calc_row_difference(): Do not call memcmp(o_ptr, NULL, 0).

innobase_index_name_is_reserved(): This can be called with
key_info=NULL, num_of_keys=0.

innobase_dropping_foreign(), innobase_check_foreigns_low(),
innobase_check_foreigns(): This can be called with
drop_fk=NULL, n_drop_fk=0.

rec_convert_dtuple_to_rec_comp(): Do not invoke memcpy(end, NULL, 0).
2017-05-18 09:07:15 +03:00
Marko Mäkelä
a436e349df ibuf_get_volume_buffered_hash(): Use a proper type cast
On 64-bit systems, the constant 1 would be 32-bit (int or unsigned)
by default. Cast the constant to ulint before shifting to avoid a
-fsanitize=undefined warning or any potential overflow.
2017-05-18 09:07:15 +03:00
Marko Mäkelä
9f57e595b4 Refactor trx_undo_report_row_operation()
Fix a -fsanitizer=undefined warning that trx_undo_report_row_operation()
was being passed thr=NULL when the BTR_NO_UNDO_LOG_FLAG flag was set.

trx_undo_report_row_operation(): Remove the first two parameters.
The parameter clust_entry!=NULL distinguishes inserts from updates.

This should be a non-functional change (no observable change in
behaviour; slightly smaller code).
2017-05-18 09:06:52 +03:00
Igor Babaev
efb9f2617b Fixed the bug mdev-12812.
This is another correction of the patch for bug mdev-12670.
If a derived table is merged into a select with STRAIGHT_JOIN
modifier all IN subquery predicates contained in the
specification of the derived table cannot be subject to
conversion to semi-joins.
2017-05-17 16:16:54 -07:00
Igor Babaev
7e97163102 Fixed the bug mdev-12817/mdev-12820.
This patch is a correction of the patch for bug mdev-12670.
With the current code handling semi-joins the following must
be taken into account.
Conversion of an IN subquery predicate into semi-join
has to be blocked if the predicate occurs:
(a) in the ON expression of an outer join
(b) in the ON expression of an inner join embedded directly
    or indirectly in the inner nest of an outer join.
The patch for mdev-12670 blocked conversion to semi-joins only
in the case (a), but not in the case (b). This patch blocks
the conversion in both cases.
2017-05-17 14:29:13 -07:00
Vicențiu Ciorbaru
0e3ca225ad Change lower_case_file_system definition to feature MYSQL_PLUGIN_IMPORT 2017-05-17 22:09:58 +03:00
Vicențiu Ciorbaru
8b0db08f36 Fix windows compilation in xtradb post-merge 2017-05-17 18:39:25 +03:00
Vicențiu Ciorbaru
3670d167a6 Fix tokudb test failures post merge 2017-05-17 16:19:22 +03:00
Marko Mäkelä
8b34aabf86 Follow-up to MDEV-12534: Align srv_sys
Allocate srv_sys statically so that the desired alignment can be
guaranteed. This silences -fsanitize=undefined warnings.
There probably is no performance impact of this, because the
reason for the alignment to ensure the absence of false sharing
between counters. Even with the misalignment, each counter would
have been been aligned at 64 bits, and the counters would reside
in separate cache lines.
2017-05-17 16:09:29 +03:00
Marko Mäkelä
9f89b94ba6 MDEV-12358 Work around what looks like a bug in GCC 7.1.0
The parameter thr of the function btr_cur_optimistic_insert()
is not declared as nonnull, but GCC 7.1.0 with -O3 is wrongly
optimizing away the first part of the condition
UNIV_UNLIKELY(thr && thr_get_trx(thr)->fake_changes)
when the function is being called by row_merge_insert_index_tuples()
with thr==NULL.

The fake_changes is an XtraDB addition. This GCC bug only appears
to have an impact on XtraDB, not InnoDB.

We work around the problem by not attempting to dereference thr
when both BTR_NO_LOCKING_FLAG and BTR_NO_UNDO_LOG_FLAG are set
in the flags. Probably BTR_NO_LOCKING_FLAG alone should suffice.

btr_cur_optimistic_insert(), btr_cur_pessimistic_insert(),
btr_cur_pessimistic_update(): Correct comments that disagree with
usage and with nonnull attributes. No other parameter than thr can
actually be NULL.

row_ins_duplicate_error_in_clust(): Remove an unused parameter.

innobase_is_fake_change(): Unused function; remove.

ibuf_insert_low(), row_log_table_apply(), row_log_apply(),
row_undo_mod_clust_low():
Because we will be passing BTR_NO_LOCKING_FLAG | BTR_NO_UNDO_LOG_FLAG
in the flags, the trx->fake_changes flag will be treated as false,
which is the right thing to do at these low-level operations
(change buffer merge, ALTER TABLE…LOCK=NONE, or ROLLBACK).
This might be fixing actual XtraDB bugs.

Other callers that pass these two flags are also passing thr=NULL,
implying fake_changes=false. (Some callers in ROLLBACK are passing
BTR_NO_LOCKING_FLAG and a nonnull thr. In these callers, fake_changes
better be false, to avoid corruption.)
2017-05-17 16:09:22 +03:00
Vicențiu Ciorbaru
5fe55b1b02 Fix sys_vars innodb_empty_free_list_algorithm_basic
Post xtradb 5.6.36 merge the output has changed.
2017-05-17 15:44:11 +03:00
Vicențiu Ciorbaru
339a290d22 Merge remote-tracking branch 'origin/5.5' into 10.0 2017-05-17 15:42:36 +03:00
Vicențiu Ciorbaru
b87873b221 Merge branch 'merge-innodb-5.6' into bb-10.0-vicentiu
This merge reverts commit 6ca4f693c1ce472e2b1bf7392607c2d1124b4293
from current 5.6.36 innodb.

Bug #23481444	OPTIMISER CALL ROW_SEARCH_MVCC() AND READ THE
                       INDEX APPLIED BY UNCOMMITTED ROW
Problem:
========
row_search_for_mysql() does whole table traversal for range query
even though the end range is passed. Whole table traversal happens
when the record is not with in transaction read view.

Solution:
=========

Convert the innodb last record of page to mysql format and compare
with end range if the traversal of row_search_mvcc() exceeds 100,
no ICP involved. If it is out of range then InnoDB can avoid the
whole table traversal. Need to refactor the code little bit to
make it compile.

Reviewed-by: Jimmy Yang <jimmy.yang@oracle.com>
Reviewed-by: Knut Hatlen <knut.hatlen@oracle.com>
Reviewed-by: Dmitry Shulga <dmitry.shulga@oracle.com>
RB: 14660
2017-05-17 14:53:28 +03:00
Marko Mäkelä
e22d86a3eb fil_create_new_single_table_tablespace(): Correct a bogus nonnull attribute
The parameter path can be passed as NULL.
This error was reported by GCC 7.1.0 when compiling
CMAKE_BUILD_TYPE=Debug with -O3.
2017-05-17 13:49:51 +03:00
Vicențiu Ciorbaru
5064623ce4 Revert "Fix unit test after merge from mysql 5.5.35 perfschema"
This reverts commit 4799af0925.

Upstream provided adequate fix. This commit is no longer necessary.
2017-05-17 12:13:09 +03:00
Vicențiu Ciorbaru
d8b45b0c00 Merge branch 'merge-xtradb-5.6' into 10.0 2017-05-17 12:11:12 +03:00
Marko Mäkelä
956d2540c4 Remove redundant UT_LIST_INIT() calls
The macro UT_LIST_INIT() zero-initializes the UT_LIST_NODE.
There is no need to call this macro on a buffer that has
already been zero-initialized by mem_zalloc() or mem_heap_zalloc()
or similar.

For some reason, the statement UT_LIST_INIT(srv_sys->tasks) in
srv_init() caused a SIGSEGV on server startup when compiling with
GCC 7.1.0 for AMD64 using -O3. The zero-initialization was attempted
by the instruction movaps %xmm0,0x50(%rax), while the proper offset
of srv_sys->tasks would seem to have been 0x48.
2017-05-17 10:33:49 +03:00
Marko Mäkelä
febe88198e Make some variables const in fil_iterate()
This is a non-functional change to make it slightly easier
to read the code. We seem to have some bugs in this
IMPORT TABLESPACE code; see MDEV-12396.
2017-05-17 08:54:16 +03:00
Marko Mäkelä
408ef65f84 Never pass NULL to innobase_get_stmt() 2017-05-17 08:27:04 +03:00
Marko Mäkelä
71cd205956 Silence bogus GCC 7 warnings -Wimplicit-fallthrough
Do not silence uncertain cases, or fix any bugs.

The only functional change should be that ha_federated::extra()
is not calling DBUG_PRINT to report an unhandled case for
HA_EXTRA_PREPARE_FOR_DROP.
2017-05-17 08:27:04 +03:00
Marko Mäkelä
4754f88cff Never pass NULL to innobase_get_stmt() 2017-05-17 08:11:01 +03:00
Marko Mäkelä
7972da8aa1 Silence bogus GCC 7 warnings -Wimplicit-fallthrough
Do not silence uncertain cases, or fix any bugs.

The only functional change should be that ha_federated::extra()
is not calling DBUG_PRINT to report an unhandled case for
HA_EXTRA_PREPARE_FOR_DROP.
2017-05-17 08:07:02 +03:00