Commit graph

178471 commits

Author SHA1 Message Date
Guido Günther
7d49aab32c apparmor: allow to read /etc/mysql/mariadb.conf.d/*
At least the Debian package reads configuration from there.
2017-09-18 22:04:42 +04:00
Jan Lindström
956b5f16e8 Merge pull request #446 from darkain/patch-1
Fixes Galera rsync sst on FreeBSD
2017-09-18 19:32:03 +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
Sergei Golubchik
55c5448ab7 MDEV-13751 Interrupted SELECT fails with 1030: 'Got error 1 "Operation not permitted" from storage engine MyISAM'
quick select returns 1, not proper HA_ERR_xxx error code,
so don't send it to handler::print_error().
2017-09-18 10:12:23 +02:00
Sergei Golubchik
6670b4e58c MDEV-13712 Spelling errors in the error message 2017-09-18 10:12:23 +02:00
Sergei Golubchik
203e2176fe MDEV-13698 stack overflow (OpenSSL on Windows)
avoid CRYPTO_free recursively calling itself on Windows
2017-09-18 10:12:23 +02:00
Sergei Golubchik
50a8beedfe MDEV-13708 Crash with indexed virtual columns and FK cascading deletes
InnoDB was too eager to forget the open table (m_mysql_table=NULL)
and that caused it to try to open a table which was opened by the user
not FK-prelocked. The server didn't expect that.

After fixing this, it crashed in gcol.innodb_virtual_fk test, trying to
compute virtual columns for a table that didn't have them. Because
row_upd_store_row() was deleting a row from node->table, while computing
virtual columns in thr->prebuilt->m_mysql_table. Which wasn't necessarily
the same table, and might've not even had virtual columns, even if
node->table did.
2017-09-18 10:12:23 +02:00
Sergei Golubchik
fb2035a1a3 MDEV-13673 Bad result in view
When printing an expression, like a/(b*c), we need to print parentheses,
even though / and * have the same precedence. Basically, we should
always treat the second argument as having one level higher precedence
than it normally is.
2017-09-18 10:12:23 +02:00
Sergei Golubchik
16b1cb6502 MDEV-13623 Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed in virtual longlong Field_long::val_int
multi-update first runs a select to find affected rows, then performs
a separate update step. On the second step WITH CHECK OPTION rows
are read with rnd_read, but the first step might've been done with
keyread.

keyread over indexed virtual columns only reads the column's value, not
dependent base columns. This is reflected in the read_set too.  But on
the rnd_read step base columns must be read - thus we need to update the
read_set before doing updates.
2017-09-18 10:12:23 +02:00
Sergei Golubchik
4c6c352138 MDEV-13596 CHECK constraints disallow NULL to pass through, violating SQL
SQL Standard (4.23.3.4 Table check constraints, part 2, SQL:2016) says
that CHECK constraint rejects rows *only* if the condition is FALSE.
That is, both TRUE and NULL should be allowed.
2017-09-18 10:12:23 +02:00
Sergei Golubchik
e6ce97a592 MDEV-12951 Server crash [mysqld got exception 0xc0000005]
Same as MDEV-12725 but for federated (not X).
Set and reset mysql.net->thd appropriately.
2017-09-18 10:12:23 +02:00
Sergei Golubchik
e78712d464 cleanup: remove dead code 2017-09-18 10:12:23 +02:00
Sergei Golubchik
0267cad5e2 bugfix: mtr non-reliable failure detection
The $result variable was supposed to accumulate failures from
all mysqltest processes (that analyzed all error logs in parallel).
But it was mistakenly put in the loop, so it was reset for each process.
2017-09-18 10:12:23 +02:00
Sergei Golubchik
6dfb73a97b bugfix: deadlock on shutdown
When slow innodb shutdown is requested, thd_destructor_proxy waits
for all transactions to end, for trx_sys_any_active_transactions() == 0,
and then signals purge threads to exit.

But purge threads own THDs, and these THDs may own transactions too.
On shutdown they'll be idle (TRX_STATE_NOT_STARTED), though, so
let's skip idle transactions in trx_sys_any_active_transactions().
2017-09-18 10:12:23 +02:00
Sergei Golubchik
8b1f145c82 cleanup
Item_func_format::print() was redundant
and other changes
2017-09-18 10:12:23 +02:00
Sergei Golubchik
3af191b7e1 compiler warning
thread_id is uint64 in 10.2
2017-09-18 10:12:23 +02:00
Sergei Golubchik
c4dc2b877a bugfix: TIME_FORMAT() should be ok in stored generated columns 2017-09-18 10:12:23 +02:00
Sergei Golubchik
3e5cdfae93 bugfix: TIME_FORMAT() allowed some non-time format specifiers
it contradicted the manual and was inconsistent
2017-09-18 10:12:23 +02:00
Sergei Golubchik
3878baddf1 MDEV-13773 client packages need my_global.h and/or my_config.h 2017-09-18 10:12:23 +02:00
Sergei Golubchik
79ddd86615 bugfix: don't overwrite tokudb.cnf during the build 2017-09-18 10:12:23 +02:00
Sergei Golubchik
bba169b984 MDEV-12763 10.2 uses deprecated openssl 1.0 apis even with 1.1
Use OpenSSL 1.1 when applicable.
Create compatibility macros for OpenSSL 1.0- and YaSSL.
2017-09-18 10:12:23 +02:00
Sergei Golubchik
031a0404e7 bugfix: debian dependencies
mariadb-client-core-10.2, mariadb-client-10.2, and
mariadb-server-core-10.2 should not depend on libmariadb3 - they
do not have any binaries dynamically linked with libmariadb3.so
2017-09-18 10:12:23 +02:00
Sergei Golubchik
862fbc277c bugfix: debian, fix *.so symlinks in libmariadb-dev
The symlink

/usr/lib/libmysqlclient.so -> /usr/lib/libmysqlclient.so.18

was invalid, because the library was not in /usr/lib.
The correct symlink is

/usr/lib/x86_64-linux-gnu/libmysqlclient.so -> /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18
2017-09-18 10:12:23 +02:00
Sergei Golubchik
b5ead3a658 MDEV-13589 libmariadbclient18 is broken when using mariadb repo instead of debian's
put libmariadbclient18 symlinks into libmariadbclient18.deb package,
not into libmariadb3.deb, because installing/reinstalling
libmariadbclient18.deb must recreate these symlinks.
2017-09-18 10:12:23 +02:00
Sergei Golubchik
0757a1b3e2 bugfix: allow dropping a constraint and a column together
post-fix for 04b288ae47
2017-09-18 10:12:23 +02:00
Marko Mäkelä
429ca9a881 Merge 10.1 into 10.2 2017-09-18 11:10:21 +03:00
Marko Mäkelä
4bf087986f Fix the WSREP build 2017-09-18 11:10:06 +03:00
Jan Lindström
3894fdd47a MDEV-13678: DELETE with CASCADE takes a long time when Galera is enabled
Ported fix from mysql-wsrep-bugs with some refactoring.

Test case is MW-402 where MariaDB needs record as there is
extra connection <con_name> lines.
2017-09-18 10:26:29 +03:00
sjaakola
d186b99251 MW-402 cascading FK issue (5.7 version)
Optimizing cascade node list traversal, which could turn out as
performance bottleneck
Even this current cascade node check could be skipped, but a dedicated
mtr test is needed to confirm that
2017-09-18 10:25:05 +03:00
Jan Lindström
16b374b978 MDEV-13678: DELETE with CASCADE takes a long time when Galera is enabled
Use wsrep_must_process_fk function to check if foreign key
constraint needs to be processed in case of Galera is enabled.
2017-09-18 09:29:35 +03:00
sjaakola
6a524ca56b MW-402 cascading FK issue (5.7 version)
Optimizing cascade node list traversal, which could turn out as
performance bottleneck
Even this current cascade node check could be skipped, but a dedicated
mtr test is needed to confirm that
2017-09-18 09:29:35 +03:00
sjaakola
efb673fe5f MW-402 cascading FK issues
* created tests focusing in multi-master conflicts during cascading foreign key
  processing
* in row0upd.cc, calling wsrep_row_ups_check_foreign_constraints only when
  running in cluster
* in row0ins.cc fixed regression from MW-369, which caused crash with MW-402.test
2017-09-18 09:29:35 +03: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
Marko Mäkelä
72c838b9fc Null-merge 10.1 into 10.2 2017-09-17 13:54:43 +03:00
Marko Mäkelä
d6baf3d364 MDEV-12634 after-merge test fix: Exercise row_merge_write(), row_merge_read()
MySQL 5.7 introduced some optimizations to avoid file I/O during
ALGORITHM=INPLACE operations. While both innodb-index-online and
innodb-table-online will exercise both the merge sort files and
the online log files in 10.1, in 10.2 they would only exercise the
online log files.

Modify one test case in innodb.innodb-table-online so that
skip_pk_sort will not hold. In this way, this test case will
write and read the merge sort files. The other instrumented tests
in innodb-index-online and innodb-table-online will only write
and read online_log files.
2017-09-17 13:46:51 +03:00
Marko Mäkelä
d9277732d7 Merge 10.1 into 10.2
This should also fix the MariaDB 10.2.2 bug
MDEV-13826 CREATE FULLTEXT INDEX on encrypted table fails.

MDEV-12634 FIXME: Modify innodb-index-online, innodb-table-online
so that they will write and read merge sort files. InnoDB 5.7
introduced some optimizations to avoid using the files for small tables.

Many collation test results have been adjusted for MDEV-10191.
2017-09-17 11:05:33 +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