Commit graph

177129 commits

Author SHA1 Message Date
Marko Mäkelä
45dbd47026 MDEV-17003 service_manager_extend_timeout() being called too often
buf_dump(): Only generate the output when shutdown is in progress.

log_write_up_to(): Only generate the output before actually writing
to the redo log files.

srv_purge_should_exit(): Rate-limit the output, and instead of
displaying the work done, indicate the work that remains to be done
until the completion of the slow shutdown.
2018-08-21 12:33:40 +03:00
Oleksandr Byelkin
b4210f3640 Merge branch '10.0' into 10.1 2018-08-21 10:07:26 +02:00
Oleksandr Byelkin
bcc677bb72 Merge branch '5.5' into 10.0 2018-08-15 16:48:13 +02:00
Sergei Petrunia
b62ac16185 MDEV-6439: Server crashes in Explain_union::print_explain with explain in slow log, tis620 charset
Item_subselect::is_expensive() used to return FALSE (Inexpensive) whenever
it saw that one of SELECTs in the Subquery's UNION is degenerate. It
ignored the fact that other parts of the UNION might not be inexpensive,
including the case where pther parts of the UNION have no query plan yet.

For a subquery in form col >= ANY (SELECT 'foo' UNION SELECT 'bar')
this would cause the query to be considered inexpensive when there is
no query plan for the second part of the UNION, which in turn would
cause the SELECT 'foo' to compute and free itself while still inside
JOIN::optimize for that SELECT (See MDEV comment for full description).
2018-08-15 15:25:14 +03:00
Oleksandr Byelkin
1b797e9e63 MDEV-15475: Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed on EXPLAIN EXTENDED with constant table and view
Print constant ISNULL value independent.
Fix of printing of view FRM and CREATE VIEW output
2018-08-15 14:23:07 +02:00
Julius Goryavsky
75dfd4acb9 This is patch for the https://jira.mariadb.org/browse/MDEV-9519 issue:
If we have a 2+ node cluster which is replicating from an async master
and the binlog_format is set to STATEMENT and multi-row inserts are executed
on a table with an auto_increment column such that values are automatically
generated by MySQL, then the server node generates wrong auto_increment
values, which are different from what was generated on the async master.

The causes and fixes:

1. We need to improve processing of changing the auto-increment values
after changing the cluster size.

2. If wsrep auto_increment_control switched on during operation of
the node, then we should immediately update the auto_increment_increment
and auto_increment_offset global variables, without waiting of the next
invocation of the wsrep_view_handler_cb() callback. In the current version
these variables retain its initial values if wsrep_auto_increment_control
is switched on during operation of the node, which leads to inconsistent
results on the different nodes in some scenarios.

3. If wsrep auto_increment_control switched off during operation of the node,
then we must return the original values of the auto_increment_increment and
auto_increment_offset global variables, as the user has set. To make this
possible, we need to add a "shadow copies" of these variables (which stores
the latest values set by the user).
2018-08-15 14:17:28 +03:00
Jan Lindström
5960815630
Merge pull request #844 from codership/10.1-MDEV-15933
MDEV-15933 Cannot resume Node SYNCED state when wsrep_desync is done after FTWRL
2018-08-15 10:35:54 +03:00
Vladislav Vaintroub
68eb9b1a78 MDEV-16220 Do not pass UTF8 to mysql in command line parameters, on Windows
Moved parts of mysql.test to mysql_not_windows.test
2018-08-14 22:42:46 +02:00
mkaruza
dfb19c06b8 MDEV-15933 Cannot resume Node SYNCED state when wsrep_desync is done after FTWRL
Manually setting wsrep_desync after FTWRL should not be allowed.
2018-08-14 12:06:21 +02:00
Vladislav Vaintroub
074b672b5d MDEV-16963 Tighten named pipe access control
Use real DACL instead of NULL DACL.
Grant Everyone just read/write access to pipe
(instead of all access like previously with NULL ACL)
2018-08-13 19:43:59 +01:00
Sergei Golubchik
3ff0801c73 MDEV-16810 AddressSanitizer: stack-buffer-overflow in int10_to_str
truncate incorrect values in convert_period_to_month() so that
PERIOD_DIFF never returns a value outside of 2^23 range.

And, for safety, increase buffer sizes for int10_to_str
to be sufficienly big for any int10_to_str result.
2018-08-11 12:19:46 +02:00
faust
0496bbc120 MDEV-15869 Mariabackup is lacking some dependencies declaration (#771)
* Backport from 10.4 to resolve dependency problem

Using the dependency syntax from 10.4 branch because {$LIBSSL} can not
be used.
2018-08-09 21:05:40 +03:00
Daniel Bartholomew
757e3b88d2 bump the VERSION 2018-08-07 10:43:08 -04:00
Sachin
ad577091ed MDEV-16904 inline void swap(base_list &rhs) should swap list only when list is...
not empty

We should swap the list only when list is not empty.
2018-08-07 15:41:13 +05:30
Rasmus Johansson
ebaacf0747
Update rules 2018-08-06 16:46:19 +03:00
Jan Lindström
3b37edee1a MDEV-13333: Deadlock failure that does not occur elsewhere
InnoDB executed code that is mean to execute only when Galera
is used and in bad luck one of the transactions is selected
incorrectly as deadlock victim. Fixed by adding wsrep_on_trx()
condition before entering actual Galera transaction handling.

No always repeatable test case for this issue is known.
2018-08-06 15:45:44 +03:00
Jan Lindström
998b1c0e75 Fix galera test MW-44 2018-08-05 18:16:26 +03:00
Varun Gupta
9419908f38 MDEV-15433: Optimizer does not use group by optimization with distinct
After the commit b76b69cd5f
loose index scan for queries with DISTINCT stopped working.
That is why that commit has to be reverted.
Additionally this patch  fixes the problem of MDEV-10880.
2018-08-05 13:25:40 +03:00
Jan Lindström
b9f0112248
Merge pull request #609 from benrubson/stunnel
MDEV-15511 - Use stunnel during rsync SST if available
2018-08-05 09:27:13 +03:00
Vladislav Vaintroub
50c4262002 MDEV-16544 - crash in ha_sphinx::create()
Use table_arg that was passed to the function, instead of dereferencing
this->table, which is a NULL pointer.
2018-08-04 22:53:16 +01:00
Elena Stepanova
1e37fa70bd Updated list of unstable tests for 10.1.35 release 2018-08-04 03:06:27 +03:00
sachin
68ebfb31f2 MDEV-16166 RBR breaks with HA_ERR_KEY_NOT_FOUND upon DELETE from table...
with spatial index

So the issue is since it is spatial index , at the time of searching index
for key (Rows_log_event::find_row) we use wrong field image we use
Field::itRAW while we should be using Field::itMBR
2018-08-04 01:39:35 +05:30
Oleksandr Byelkin
701f0b8e36 Fix gcc 7.3 compiler warnings. 2018-08-03 14:37:55 +02:00
Oleksandr Byelkin
9d42eb5e28 Disable an unstable test 2018-08-03 12:30:50 +03:00
Marko Mäkelä
769f6d2db7 Fix -Wclass-memaccess in WSREP,InnoDB,XtraDB 2018-08-03 12:21:13 +03:00
Marko Mäkelä
0d3972c6be Merge 10.0 into 10.1 2018-08-03 12:03:10 +03:00
Marko Mäkelä
9dfef6e29b Fix -Wclass-memaccess warnings in InnoDB,XtraDB 2018-08-03 11:53:57 +03:00
Marko Mäkelä
b963cbaf4b Follow-up fix to MDEV-16865: InnoDB fts_query() ignores KILL
fts_query(): Remove a redundant condition (result will never be NULL),
and instead check if *result is NULL, to prevent SIGSEGV in
fts_query_free_result().
2018-08-03 11:49:49 +03:00
Oleksandr Byelkin
b4f7f12e2b fix galera test. 2018-08-02 20:27:10 +02:00
Daniel Bartholomew
90b66c1699 bump the VERSION 2018-08-01 12:09:33 -04:00
Marko Mäkelä
2fb68244b4 Merge 10.0 into 10.1 2018-08-01 08:45:59 +03:00
Marko Mäkelä
a7f84f09bf MDEV-16865 InnoDB fts_query() ignores KILL
The functions fts_ast_visit() and fts_query() inside
InnoDB FULLTEXT INDEX query processing are not checking
for THD::killed (trx_is_interrupted()), like anything
that potentially takes a long time should do.

This is a port of the following change from MySQL 5.7.23,
with a completely rewritten test case.

commit c58c6f8f66ddd0357ecd0c99646aa6bf1dae49c8
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Fri May 4 15:53:13 2018 +0530

Bug #27155294 MAX_EXECUTION_TIME NOT INTERUPTED WITH FULLTEXT SEARCH USING MECAB
2018-08-01 08:43:12 +03:00
Marko Mäkelä
b3e95086e1 Fix function pointer type mismatch 2018-08-01 08:43:12 +03:00
Daniel Bartholomew
33110db055 bump the VERSION 2018-07-31 10:46:16 -04:00
Marko Mäkelä
87ec6a0448 Merge 10.0 into 10.1 2018-07-31 15:19:56 +03:00
Elena Stepanova
e023f9a4d5 Unstable tests for 10.0.36 release, latest additions 2018-07-31 15:19:01 +03:00
Oleksandr Byelkin
865e807125 Merge branch '10.0' into 10.1 2018-07-31 11:58:29 +02:00
Marko Mäkelä
e52315a4a2 MDEV-16855 Fix fts_sync_synchronization in InnoDB
This is a backport of the following fix from MySQL 5.7.23.
Some code refactoring has been omitted, and the test case has
been adapted to MariaDB.

commit 7a689acaa65e9d602575f7aa53fe36a64a07460f
Author: Krzysztof Kapuścik <krzysztof.kapuscik@oracle.com>
Date:   Tue Mar 13 12:34:03 2018 +0100

Bug#27082268 Invalid FTS sync synchronization

The fix closes two issues:
Bug #27082268 - INNODB: FAILING ASSERTION: SYM_NODE->TABLE != NULL DURING FTS SYNC
Bug #27095935 - DEADLOCK BETWEEN FTS_DROP_INDEX AND FTS_OPTIMIZE_SYNC_TABLE

Both issues were related to a FTS cache sync being done during
operations that perfomed DDL actions on internal FTS tables
(ALTER TABLE, TRUNCATE). In some cases the FTS tables and/or
internal cache structures could get removed while still being
used to perform FTS synchronization leading to crashes. In other
the sync operations could not get finishes as it was waiting for
dict lock which was taken by thread waiting for the background
sync to be finished.

The changes done includes:
- Stopping background operations during ALTER TABLE and TRUNCATE.
- Removal of unused code in FTS.
- Cleanup of FTS sync related code to make it more readable and
easier to maintain.

RB#18262
2018-07-30 18:06:30 +03:00
Marko Mäkelä
5ed2da9587 Apply the 5.6.40 security fixes to XtraDB
We did not merge Percona XtraDB 5.6.40-84.0 yet.
The changes in it are mostly cosmetic, except for
2 bug fixes from Oracle MySQL 5.6.40, which could
be security bugs.

This was achieved by taking the applicable parts
of an earlier InnoDB commit to XtraDB:

git diff 15ec8c2f28f08517ecbffb959d756b4bdd53ab45{~,} storage/innobase|
sed -e s+/innobase/+/xtradb/+|patch -p1
2018-07-30 16:28:20 +03:00
Marko Mäkelä
7c773abdf7 Merge 5.5 into 10.0 2018-07-30 15:44:31 +03:00
Karthik Kamath
a49ec98042 2018-07-30 15:32:22 +03:00
Marko Mäkelä
4c21c367b3 Merge InnoDB MySQL 5.6.41 to 10.0 2018-07-30 15:21:11 +03:00
Sachin Agarwal
29ddc6e9e3 Bug #27326796 - MYSQL CRASH WITH INNODB ASSERTION FAILURE IN FILE PARS0PARS.CC
Problem:
As part of bug #24938374 fix, dict_operation_lock was not taken by
fts_optimize_thread while syncing fts cache.
Due to this change, alter query is able to update SYS_TABLE rows
simultaneously. Now when fts_optimizer_thread goes open index table,
It doesn't open index table if the record corresponding to that table is
set to REC_INFO_DELETED_FLAG in SYS_TABLES and hits an assert.

Fix:
If fts sync is already in progress, Alter query would wait for sync to
complete before renaming table.

RB: #19604
Reviewed by : Jimmy.Yang@oracle.com
2018-07-30 15:18:51 +03:00
Marko Mäkelä
91181b225c Merge 5.5 into 10.0 2018-07-30 15:09:25 +03:00
Marko Mäkelä
d17e9a02c4 Fix InnoDB/XtraDB warnings by GCC 8.2.0 2018-07-30 14:05:24 +03:00
Marko Mäkelä
8bdd125067 MDEV-16851 On schema mismatch in IMPORT TABLESPACE, display ROW_FORMAT in clear text
This is motivated by Oracle MySQL Bug #27542720 SCHEMA MISMATCH
- TABLE FLAGS DON'T MATCH, BUT FLAGS ARE NUMBERS
but using a different approach.

row_import::match_schema(): In case of a mismatch, display the
ROW_FORMAT and optionally KEY_BLOCK_SIZE of the .cfg file.
2018-07-30 13:13:43 +03:00
Marko Mäkelä
340963351c Use a more precise argument for memset() 2018-07-30 10:39:42 +03:00
Oleksandr Byelkin
fceda2dab6 Merge remote-tracking branch 'mysql/5.5' into 5.5
We do not accept:
1. We did not have this problem (fixed earlier and better)
 d982e717ab Bug#27510150: MYSQLDUMP FAILS FOR SPECIFIC --WHERE CLAUSES
2. We do not have such options (an DBUG_ASSERT put just in case)
 bbc2e37fe4 Bug#27759871: BACKRONYM ISSUE IS STILL IN MYSQL 5.7
3. Serg fixed it in other way in this release:
 e48d775c6f Bug#27980823: HEAP OVERFLOW VULNERABILITIES IN MYSQL CLIENT LIBRARY
2018-07-29 13:10:29 +02:00
Jan Lindström
14306bcbec MDEV-16831: Galera test failure on galera_sst_mysqldump_with_key
Test case was not written correctly.
2018-07-27 10:05:26 +03:00
Varun Gupta
bd0b368119 Fix added along with a test for a case missed in the patch for MDEV-16751 2018-07-27 11:34:34 +05:30