Commit graph

176155 commits

Author SHA1 Message Date
Vicențiu Ciorbaru
df2675a9cc Merge connect/10.0 into 10.0
This is a squashed merge.
2017-09-19 02:05:11 +03:00
Vicențiu Ciorbaru
0f44c8ab28 Fix merge error 2017-09-19 02:05:11 +03:00
Vicențiu Ciorbaru
d6a7de2022 Merge branch '5.5' into 10.0 2017-09-19 01:02:01 +03:00
Vicențiu Ciorbaru
b4606367d7 5.6.37-82.2 2017-09-19 00:44:27 +03:00
Vicențiu Ciorbaru
e7bb818116 Merge remote-tracking branch 'merge/merge-xtradb-5.5' into 5.5 2017-09-19 00:31:15 +03:00
Vicențiu Ciorbaru
f534eef794 5.5.57-38.9 2017-09-19 00:25:34 +03:00
Marko Mäkelä
532333ee48 MDEV-12893 innodb.log_data_file_size failed in buildbot with InnoDB: Database page corruption
Another fix (work around MDEV-12699): Ensure that the 1234-byte
truncated page is all zero, so that after data file extension
pads the page with zeroes to full page size, the page will read
as a valid one (consisting of zero bytes only).
2017-09-18 17:17:52 +03:00
Sergei Golubchik
a5ee77393f MDEV-13157 Specifying DATA DIRECTORY in tables leads to failing EXCHANGE PARTITION 2017-09-18 10:40:26 +02:00
Sergei Golubchik
be3490f01f cleanup parts.partition_exch_* tests 2017-09-18 10:40:26 +02:00
Sergei Golubchik
f7294f5b36 MDEV-13208 Cannot import libmariadbclient.so.18 from python
create libmariadbclient.so compatibility symlinks on debian
2017-09-18 10:40:26 +02:00
Sergei Golubchik
1fce368089 MDEV-13636 ALTER TABLE ... DELAY_KEY_WRITE=1 creates table copy for MyISAM table with DATA DIRECTORY/INDEX DIRECTORY options
correct detection of changes in DATA/INDEX DIRECTORY
2017-09-18 10:40:26 +02:00
Sergei Golubchik
7e56e9ea77 MDEV-13650 Backport fix for MDEV-13060 (crash when both AWS plugin and server_audit are loaded) to 10.1
MDEV-13060 Server Audit Plugin Crashes with AWS KMS plugin

don't do auditing if thd is NULL.

Collaterals:
* copy-paste bugs server_audit.c
2017-09-18 10:40:26 +02:00
Marko Mäkelä
df24f8469d MDEV-12893 innodb.log_data_file_size failed in buildbot with InnoDB: Database page corruption
The purpose of the test is to ensure that redo log apply will
extend data files before applying page-level redo log records.
The test intermittently failed, because the doublewrite buffer
would sometimes contain data for the pages that the test
truncated. When the test truncates data files, it must also remove
the doublewrite buffer entries, because under normal operation, the
doublewrite buffer would only be written to if the data file already
has been extended.
2017-09-18 09:05:16 +03:00
Marko Mäkelä
372dba097d Silence a -Wimplicit-fallthrough warning 2017-09-17 14:13:32 +03:00
Vladislav Vaintroub
d1253e19a1 Fix compilation in mariabackup
Compilation got confused  about 2 wsrep.h headers in include path
Rename backup's wsrep.h to backup_wsrep.h to fixO
2017-09-16 22:19:16 +02:00
Marko Mäkelä
836d4e74d9 Write proper tests for MDEV-12634: Uninitialised ROW_MERGE_RESERVE_SIZE bytes
Introduce innodb_encrypt_log.combinations and prove that
the encryption and decryption take place during both
online ADD INDEX (WL#5266) and online table-rebuilding ALTER (WL#6625).
2017-09-16 21:15:38 +03:00
Marko Mäkelä
f24d36ae1e Clean up a directory to avoid a failure of another test 2017-09-16 21:15:38 +03:00
Marko Mäkelä
75dd3bcb4c Clean up after commit 93087d5fe7
Apply the same changes to both InnoDB and XtraDB.
2017-09-16 15:05:22 +03:00
Vladislav Vaintroub
1d7bc3b582 Innodb : do not call fflush() in os_get_last_error_low(), if no error
message was written.
2017-09-16 09:45:38 +00:00
Vladislav Vaintroub
ad17e8e518 MDEV-13821 : mariabackup sometimes could lose ib_logf(FATAL) messages,
The messages are getting lost because they are written with fprintf()
but without fflush(), so abort() would lose buffered text.

Applied fix from 10.2, which makes in_logf() use
sql_print_information(), which in turn does proper flush after each message
2017-09-16 09:45:38 +00:00
Vladislav Vaintroub
93087d5fe7 Fix some warnings 2017-09-16 09:45:38 +00:00
Marko Mäkelä
8c4df595b8 MDEV-13807 mariabackup --apply-log-only does generate redo log by performing rollback and possibly other tasks
Skip rollback and other redo-log-generating tasks if
srv_apply_log_only is set.

Instead of assigning the debug variable recv_no_log_write = FALSE,
assign it to srv_apply_log_only, so that any unwanted writes are caught.
2017-09-16 09:55:49 +03:00
Alexander Barkov
65d26d1f31 MDEV-10191 non convertible chars convert() resulted in Null instead "?" on Windows
The problem was introduced by the patch for MDEV-7661,
which (in addition to the fix itself) included an attempt to make
CONVERT/CAST work in the same way with fields
(i.e. return NULL in strict mode if a non-convertable character found).
It appeared to be a bad idea and some users were affected by this
behavior change. Changing CONVERT/CAST not depend on sql_mode
(restoring pre-10.1.4 behavior).
2017-09-15 20:59:04 +04:00
Vladislav Vaintroub
a870099817 Windows : support vsjitdebugger in MTR's --debugger. 2017-09-15 16:20:38 +00:00
Vladislav Vaintroub
a73b55a9f8 Windows : fix a warning in popular header file 2017-09-15 16:20:38 +00:00
Alexander Barkov
434e283507 MDEV-13685 Can not replay binary log due to Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'concat' 2017-09-15 12:25:06 +04:00
Jan Lindström
fa2701c6f7 MDEV-12634: Uninitialised ROW_MERGE_RESERVE_SIZE bytes written to tem…
…porary file

Fixed by removing writing key version to start of every block that
was encrypted. Instead we will use single key version from log_sys
crypt info.

After this MDEV also blocks writen to row log are encrypted and blocks
read from row log aren decrypted if encryption is configured for the
table.

innodb_status_variables[], struct srv_stats_t
	Added status variables for merge block and row log block
	encryption and decryption amounts.

Removed ROW_MERGE_RESERVE_SIZE define.

row_merge_fts_doc_tokenize
	Remove ROW_MERGE_RESERVE_SIZE

row_log_t
	Add index, crypt_tail, crypt_head to be used in case of
	encryption.

row_log_online_op, row_log_table_close_func
	Before writing a block encrypt it if encryption is enabled

row_log_table_apply_ops, row_log_apply_ops
	After reading a block decrypt it if encryption is enabled

row_log_allocate
	Allocate temporary buffers crypt_head and crypt_tail
	if needed.

row_log_free
	Free temporary buffers crypt_head and crypt_tail if they
	exist.

row_merge_encrypt_buf, row_merge_decrypt_buf
	Removed.

row_merge_buf_create, row_merge_buf_write
	Remove ROW_MERGE_RESERVE_SIZE

row_merge_build_indexes
	Allocate temporary buffer used in decryption and encryption
	if needed.

log_tmp_blocks_crypt, log_tmp_block_encrypt, log_temp_block_decrypt
	New functions used in block encryption and decryption

log_tmp_is_encrypted
	New function to check is encryption enabled.

Added test case innodb-rowlog to force creating a row log and
verify that operations are done using introduced status
variables.
2017-09-14 09:23:20 +03:00
mysql-builder@oracle.com
1da916c37e 2017-09-13 20:45:34 +05:30
Anushree Prakash B
5ac61b2af0 Bug#26372491 - RCE THROUGH THE MISHANDLE OF BACKSLASH
DESCRIPTION:
===========
The bug is related to incorrect parsing of SQL queries
when typed in on the CLI. The incorrect parsing can
result in unexpected results.

ANALYSIS:
========
The scenarios mainly happens for identifier names
with a typical combination of backslashes and backticks.
The incorrect parsing can either result in executing
additional queries or can result in query truncation.
This can impact mysqldump as well.

FIX:
===
The fix makes sure that such identifier names are
correctly parsed and a proper query is sent to the
server for execution.

(cherry picked from commit 31a372aa1c2b93dc75267d1f05a7f7fca6080dc0)
2017-09-13 20:44:55 +05:30
Vladislav Vaintroub
65c94238f8 Merge branch 'bb-10.0-wlad' into 10.0 2017-09-09 10:55:47 +00:00
Vladislav Vaintroub
a46679dcf7 Build improvements and cleanups.
- the probably ultimate fix for dependencies on VS
- remove some GET_TARGET_PROPERTY(LOCATION ...), they are deprecated in
cmake 3.9
- simplify signing targets on Windows.
- remove INSTALL_DEBUG_TARGET, we do not mix binaries from different builds
in the same package
2017-09-08 18:22:15 +00:00
Marko Mäkelä
112d721a74 Merge 10.0 into 10.1 2017-09-07 12:08:34 +03:00
Marko Mäkelä
d861822c4f MDEV-13253 After rebuilding redo logs, InnoDB can leak data from redo log buffer
recv_reset_logs(): Initialize the redo log buffer, so that no data
from the old redo log can be written to the new redo log.

This bug has very little impact before MariaDB 10.2. The
innodb_log_encrypt option that was introduced in MariaDB 10.1
increases the impact. If the redo log used to be encrypted, and
it is being resized and encryption disabled, then previously
encrypted data could end up being written to the new redo log
in clear text. This resulted in encryption.innodb_encrypt_log
test failures in MariaDB 10.2.
2017-09-07 12:01:07 +03:00
Marko Mäkelä
ee844f6c34 Make the SEARCH_ABORT logic actually work
The SEARCH_ABORT logic was not working as intended
(tests were not being aborted).
2017-09-07 11:59:26 +03:00
Marko Mäkelä
3ec8268b4a Follow-up to MDEV-13103: Do not add __attribute__((nonnull))
In XtraDB, buf_block_get_frame() can return NULL, and this value
can be passed to buf_page_print(). Do not declare the parameter
as nonnull.
2017-09-07 11:58:21 +03:00
Marko Mäkelä
7008d46164 Follow-up to MDEV-13227: Shorten the test
The bug only affects ROW_FORMAT=DYNAMIC tables.
It is reproducible already with 2 records in the table.

Keep testing with ROW_FORMAT=REDUNDANT just in case.
2017-09-06 16:13:20 +03:00
Marko Mäkelä
a793b7fd8b Follow-up to MDEV-13227: Do not run unnecessary test combinations
The bug only affected innodb_page_size=64k. There is no point
running the test with smaller page sizes.
2017-09-06 15:57:42 +03:00
Marko Mäkelä
cd694d76ce Merge 10.0 into 10.1 2017-09-06 15:32:56 +03:00
Marko Mäkelä
6b45355e6b MDEV-13103 Assertion `flags & BUF_PAGE_PRINT_NO_CRASH' failed in buf_page_print
buf_page_print(): Remove the parameter 'flags',
and when a server abort is intended, perform that in the caller.

In this way, page corruption reports due to different reasons
can be distinguished better.

This is non-functional code refactoring that does not fix any
page corruption issues. The change is only made to avoid falsely
grouping together unrelated causes of page corruption.
2017-09-06 14:01:15 +03:00
Andrei Elkin
641baa5d03 Post-push for MDEV-13437
A new $MYSQLD_LAST_CMD evaluation was too late in case --manual-gdb.
Now it is done before the server restart type branches which is safe
and the args value has been fully computed by the new point of
evaluation.
2017-09-04 18:42:30 +03:00
Oleksandr Byelkin
17589989ee MDEV-10972: Insert from select / view / union -- repeatable crash in 10.1, 10.2 Linux/Mac/Windows
save thd->select_number between parsing and executions (in case it was not complete executed due to errors (for example epsent table))
2017-09-04 16:45:02 +02:00
Marko Mäkelä
0500899904 MDEV-13705 10.0.32 does not compile on architectures without 64-bit atomics
This is a backport of the following:

MDEV-13009 10.1.24 does not compile on architectures without 64-bit atomics

Add a missing #include "sync0types.h" that was removed in MDEV-12674.
2017-09-04 09:46:47 +03:00
Marko Mäkelä
7f99381288 Fix compiler warnings
metadata_lock_info_duration[]: Remove the unused variable.

Add some comments /* fall through */ to silence -Wimplicit-fallthrough
2017-09-01 15:40:49 +03:00
Marko Mäkelä
be45f083e6 Merge 10.0 into 10.1 2017-08-31 18:04:44 +03:00
Vladislav Vaintroub
6be93c3b8a MDEV-13693 : Fix parameter passing to my_error.
char* parameter is expected by the message ER_KEY_COLUMN_DOES_NOT_EXITS,
thus pass char*, rather than LEX_STRING.
2017-08-31 14:57:56 +00:00
Vladislav Vaintroub
66eb9774e4 MDEV-13691 : my_write() sets inappropriate errno for ERROR_FILE_SYSTEM_LIMITATON
ERROR_FILE_SYSTEM_LIMITATION was seen by support when backing up large
file. However mariabackup error message was not very helpful,
since it mapped the error to generic catch-all EINVAL.

With the patch, ERROR_FILE_SYSTEM_LIMITATION will be mapped to more
appropriate EFBIG. Also add mapping from ERROR_NO_SYSTEM_RESOURCES
to ENOMEM.
2017-08-31 14:57:31 +00:00
Jan Lindström
eba0120d8f Fix test failures on embedded server.
Problem was incorrect definition of wsrep_recovery,
trx_sys_update_wsrep_checkpoint and
trx_sys_read_wsrep_checkpoint functions causing
innodb_plugin not to load as there was undefined symbols.
2017-08-31 14:04:02 +03:00
Marko Mäkelä
38ca9be4de MDEV-13684 InnoDB race condition between fil_crypt_thread and btr_scrub_init
There is a race condition in InnoDB startup. A number of
fil_crypt_thread are created by fil_crypt_threads_init(). These threads
may call btr_scrub_complete_space() before btr_scrub_init() was called.
Those too early calls would be accessing an uninitialized scrub_stat_mutex.

innobase_start_or_create_for_mysql(): Invoke btr_scrub_init() before
fil_crypt_threads_init().

fil_crypt_complete_rotate_space(): Only invoke btr_scrub_complete_space()
if scrubbing is enabled. There is no need to update the statistics if
it is not enabled.
2017-08-31 11:08:43 +03:00
Jan Lindström
28b2896a43 Fixed test failure on innodb_encryption
After MDEV-13583: Improvements for MTR rebootstrap introduced in
MDEV-12042 bootsrap correctly creates mysql/innodb_table_stats
and mysql/innodb_index_stats InnoDB tables before innodb_encryption
test starts. These tables are also encrypted or decrypted, thus
we need to wait also these tables (if not we could randomly
get different results as system tablespace and these tables
are encrypted or decrypted in parallel).
2017-08-31 09:15:23 +03:00
Jan Lindström
b29f26d774 Fix test failures on embedded server.
Problem was incorrect definition of wsrep_recovery,
trx_sys_update_wsrep_checkpoint and
trx_sys_read_wsrep_checkpoint functions causing
innodb_plugin not to load as there was undefined symbols.
2017-08-31 08:38:26 +03:00