Commit graph

182270 commits

Author SHA1 Message Date
Nikita Malyavin
b0b5485251 MDEV-17005 add debug logs and set up deterministic test 2019-07-22 20:29:42 +10:00
Julius Goryavsky
f27a00435b The test for the wsrep_info plugin needs the same flexible wsrep version checking as the tests for Galera (continuation of MDEV-18565 task) 2019-07-22 12:16:39 +02:00
Sergei Golubchik
6e98f6810c fix libsepol version detection for SUSE 2019-07-21 13:12:18 +02:00
Oleksandr Byelkin
e2bbb6f5e9 switch to CC 3.1 2019-07-20 09:09:28 +02:00
Sergei Petrunia
731ef75175 MDEV#20107: rocksdb.check_ignore_unknown_options fails on OS X again
Make it to work on Windows, too.
2019-07-19 21:24:28 +03:00
Sergei Petrunia
8ec4aa4b6b MDEV#20107: rocksdb.check_ignore_unknown_options fails on OS X again
Rewrite the unportable sed/shell code in Perl.
2019-07-19 18:22:32 +03:00
Eugene Kosov
53a3594b90 MDEV-19471 Add ASAN-poisoned redzones for mem_heap_t
Store REDZONE_SIZE poined bytes before every allocated chunk of memory
2019-07-19 13:28:03 +03:00
Marko Mäkelä
d9dcb8ba02 Merge 10.1 into 10.2 2019-07-19 11:45:55 +03:00
Marko Mäkelä
059968dc5d Remove a conditionally unused declaration
The embedded server does not HAVE_PSI_STAGE_INTERFACE.
2019-07-19 11:45:35 +03:00
Eugene Kosov
9c29d06862 MDEV-20097 potential use-after-free
row_merge_read_clustered_index(): fix one more place with buf and merge_buf[i]
2019-07-19 11:42:08 +03:00
Marko Mäkelä
4aa97ba594 Fix innodb-system-table-view for --embedded 2019-07-19 09:48:17 +03:00
Marko Mäkelä
6a55aeb2af Merge 10.1 into 10.2 2019-07-18 23:38:48 +03:00
Marko Mäkelä
864f0005f9 MDEV-20094: Disable innodb.check_ibd_filesize
The results are nondeterministic on MariaDB Server 10.1.
2019-07-18 23:26:52 +03:00
Marko Mäkelä
a24e824cc4 MDEV-20097: Also fix XtraDB 2019-07-18 23:24:13 +03:00
Eugene Kosov
5b205458d9 MDEV-20097 potential use-after-free
row_merge_read_clustered_index(): make buf always equals to merge_buf[i]
2019-07-18 22:28:11 +03:00
Marko Mäkelä
e55cc2d8cc Merge 10.1 into 10.2
MDEV-20094 was filed for the unexpected result differences for the test
innodb.check_ibd_filesize.
2019-07-18 18:01:04 +03:00
Marko Mäkelä
f616e2b97f MDEV-13625: Add innodb.check_ibd_filesize 2019-07-18 17:41:35 +03:00
Marko Mäkelä
eb14806e6c MDEV-13625: Adapt the test innodb-system-table-view 2019-07-18 17:41:35 +03:00
Marko Mäkelä
5a22c45604 MDEV-13626: Add the test innodb.trx_id_future 2019-07-18 17:41:35 +03:00
Marko Mäkelä
adbab0d4cd MDEV-13625: Add the test innodb.innodb-wl5980-debug 2019-07-18 17:01:59 +03:00
Julius Goryavsky
c0eb3a4d92 Fixed dependency checking in some Galera tests 2019-07-18 14:56:39 +02:00
Marko Mäkelä
6962855185 Merge 10.1 into 10.2 2019-07-18 13:10:09 +03:00
Julius Goryavsky
26b594e411 Set the garbd_exe variable to empty string to avoid warning about an uninitialized variable when wsrep_provider is not initialized correctly, set to 'none' or when wsrep is switched off 2019-07-18 11:37:01 +02:00
Julius Goryavsky
4e02e502f6 MDEV-18565: Galera mtr-suite fails if galera library is not installed
Currently, running mtr with an incorrect (for example, new or
obsolete) version of wsrep_provider (for example, with the 26
version of libgalera_smm.so) leads to the failure of tests in
several suites with vague error diagnostics.

As for the galera_3nodes suite, the mtr also does not effectively
check all the prerequisites after merge with MDEV-18426 fixes.
For example, tests that using mariabackup do not check for presence
of ss and socat/nc. This is due to improper handling of relative
paths in mtr scripts.

In addition, some tests in different suites can be run without
setting the environment variables such as MTR_GALERA_TFMT, XBSTREAM,
and so on.

To eliminate all these issues, this patch makes the following changes:

1. Added auxiliary wsrep_mtr_check utility (which located in the
mysql-test/lib/My/SafeProcess subdirectory), which compares the
versions of the wsrep API that used by the server and by the wsrep
provider library, and it does this comparison safely, without
accessing the API if the versions do not match.

2. All checks related to the presence of mariabackup and utilities
that necessary for its operation transferred from the local directories
of different mtr suites (from the suite.pm files) to the main suite.pm
file. This not only reduces the amount of code and eliminates duplication
of identical code fragments, but also avoids problems due to the inability
of mtr to consider relative paths to include files when checking skip
combinations.

3. Setting the values of auxiliary environment variables that
are necessary for Galera, SST scripts and mariabackup (to work
properly) is moved to the main mysql-test-run.pl script, so as
not to duplicate this code in different suites, and to avoid
partial corrections of the same errors for different suites
(while other suites remain uncorrected).

4. Fixed duplication of the have_file_key_management.inc and
have_filekeymanagement.inc files between different suites,
these checks are also transferred to the top level.

5. Added garbd presence check and garbd path variable.

https://jira.mariadb.org/browse/MDEV-18565
2019-07-17 12:54:12 +02:00
Sergei Petrunia
52f6aa1c54 Disable rocksdb_rpl.rpl_gtid_crash_safe_optimized
It uses slave_gtid_info=optimized which is not supported in MariaDB
2019-07-16 18:42:19 +03:00
Sergei Petrunia
a2dc3b9461 Disable rocksdb_rpl.optimize_myrocks_replace_into
It requires @@enable_blind_replace which MariaDB doesn't support
2019-07-16 17:16:59 +03:00
Sergei Petrunia
e9a1918376 Disable rocksdb.rpl_row_not_found
It requires slave_exec_mode='SEMI_STRICT'
2019-07-16 16:50:05 +03:00
Sergei Petrunia
612f4908d2 rocksdb.unique_check: attempt to remove race condtitions from the test 2019-07-16 12:23:52 +03:00
Sergei Petrunia
143fede177 Disable rocksdb.force_shutdown, rocksdb.shutdown is fine
Fix this patch (two csets before):
  Disable rocksdb.shutdown test

  It was introduced by this patch in fb/mysql-5.6:
  Author: Yoshinori Matsunobu <yoshinori@fb.com>
  Date:   Mon Jun 10 14:09:28 2019 -0700

      Extending SHUTDOWN query to support read_only/aborting

      Summary:
      This diff extends SHUTDOWN query to support the following
      features.
      - Aborting with any specified exit code (range is 0..255).
      If nothing is specified or 0 is given, it does default clean
      shutdown. If 1+ is given, exits with the given error code
      immediately. This is helpful to shutting down instance
      even if it is stuck somewhere.

   MariaDB doesn't support SHUTDOWN statement or have any other way
   to exit the server process.
2019-07-16 11:10:59 +03:00
Sergei Petrunia
537893b072 Fix rocksdb.tbl_opt_data_index_dir on a mac
Part #2: also replace error text in SHOW WARNINGS
2019-07-16 11:07:46 +03:00
Sergei Petrunia
d2f094d9e6 Disable rocksdb.shutdown test
It was introduced by this patch in fb/mysql-5.6:
Author: Yoshinori Matsunobu <yoshinori@fb.com>
Date:   Mon Jun 10 14:09:28 2019 -0700

    Extending SHUTDOWN query to support read_only/aborting

    Summary:
    This diff extends SHUTDOWN query to support the following
    features.
    - Aborting with any specified exit code (range is 0..255).
    If nothing is specified or 0 is given, it does default clean
    shutdown. If 1+ is given, exits with the given error code
    immediately. This is helpful to shutting down instance
    even if it is stuck somewhere.

MariaDB doesn't support SHUTDOWN statement or have any other way
to exit the server process.
2019-07-15 22:50:18 +03:00
Sergei Petrunia
1da844124d Fix rocksdb.tbl_opt_data_index_dir on a mac 2019-07-15 12:26:13 +03:00
Sujatha
10ebdb7f1d MDEV-11154: Write_on_release_cache(log_event.cc) function will not write "COMMIT", if use "mysqlbinlog ... | mysql ..."
Problem:
=======
Executing command, "mysqlbinlog --read-from-remote-server --host='xx.xx.xx.xx'
--port=3306 --user=xxx --password=xxx --database=mysql --to-last-log
mysql-bin.000001 --start-position=1098699 --stop-never |mysql -uxxx -pxxx", we
found that last data read from remote couldn't commit.

Analysis:
========
The purpose of 'Write_on_release_cache' is that the contents of the Cache will
automatically be written to a dedicated result file on destruction. Flush
operation on the result file is controlled by a flag 'FLUSH_F'. Events which
require force flush upon their destruction will have to enable this
'Write_on_release_cache::FLUSH_F'. At present the 'FLUSH_F' flag is defined as
an enum as shown below.

enum flag
{
  FLUSH_F
};

Since 'FLUSH_F' is the first member without initialization it get the default
value '0'. Because of this the following flush condition never succeeds.

if (m_flags & FLUSH_F)
  fflush(m_file);

At present the file gets flushed only during my_fclose(result_file) operation.
When continuous streaming is enabled through --stop-never option it never gets
flushed and hence events are not replicated.

Fix:
===
Initialize the enum value to non zero value.
2019-07-15 13:30:10 +05:30
Jan Lindström
ec49976e38 MDEV-19746: Galera test failures because of wsrep_slave_threads identification
Problem was that tests select INFORMATION_SCHEMA.PROCESSLIST processes
from user system user and empty state. Thus, there is not clear
state for slave threads.

Changes:
- Added new status variables that store current amount of applier threads
(wsrep_applier_thread_count) and rollbacker threads
(wsrep_rollbacker_thread_count). This will make clear how many slave threads
of certain type there is.
- Added THD state "wsrep applier idle" when applier slave thread is
waiting for work. This makes finding slave/applier threads easier.
- Added force-restart option for mtr to always restart servers between tests
to avoid race on start of the test
- Added wait_condition_with_debug to wait until the passed statement returns
true, or the operation times out. If operation times out, the additional error
statement will be executed

Changes to be committed:
	new file:   mysql-test/include/force_restart.inc
	new file:   mysql-test/include/wait_condition_with_debug.inc
	modified:   mysql-test/mysql-test-run.pl
	modified:   mysql-test/suite/galera/disabled.def
	modified:   mysql-test/suite/galera/r/MW-336.result
	modified:   mysql-test/suite/galera/r/galera_kill_applier.result
	modified:   mysql-test/suite/galera/r/galera_var_slave_threads.result
	new file:   mysql-test/suite/galera/t/MW-336.cnf
	modified:   mysql-test/suite/galera/t/MW-336.test
	modified:   mysql-test/suite/galera/t/galera_kill_applier.test
	modified:   mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test
	modified:   mysql-test/suite/galera/t/galera_parallel_autoinc_manytrx.test
	modified:   mysql-test/suite/galera/t/galera_var_slave_threads.test
	modified:   mysql-test/suite/wsrep/disabled.def
	modified:   mysql-test/suite/wsrep/r/variables.result
	modified:   mysql-test/suite/wsrep/t/variables.test
	modified:   sql/mysqld.cc
	modified:   sql/wsrep_mysqld.cc
	modified:   sql/wsrep_mysqld.h
	modified:   sql/wsrep_thd.cc
	modified:   sql/wsrep_var.cc
2019-07-15 10:17:07 +03:00
Sergei Petrunia
b3bd51c992 Fix rocksdb.autoinc_vars_thread test 2019-07-15 00:50:46 +03:00
Sergei Petrunia
9ccbe8d581 Fix intermittent test failure in rocksdb.rocksdb_cf_per_partition
was getting rows=2 instead of 1 on kvm-rpm-centos74-amd64
2019-07-14 11:25:24 +03:00
Sergei Petrunia
fbbc2354c8 MDEV-14455: rocksdb.2pc_group_commit failed in buildbot
Use RocksDB debug sync points to introduce a sync delay. This
commits to get grouped even when the datadir is on ramdisk.

For some unclear reason the effect is visible on write_prepared
but not write_committed, so run the test only with write_prepared.
2019-07-12 21:41:01 +03:00
Thirunarayanan Balathandayuthapani
aba2b41e9e MDEV-19978 Page read from tablespace is corrupted
Problem:
=======
  Checksum fields can have value as zero. In that case, InnoDB falsely
consider that page should be all zeroes. It leads to wrong detection of page
corruption.

Solution:
========
	Remove the condition that checks if checksum fields are zero then
page should be all zeroes.
2019-07-11 18:25:25 +05:30
Anel Husakovic
e52fea3fe9 Fix typo open_table_def() 2019-07-11 02:59:22 -07:00
Thirunarayanan Balathandayuthapani
64900e3d7c MDEV-15641 InnoDB crash while committing table-rebuilding ALTER TABLE
Problem:
========
 There is a possibility that there can be more concurrent DMLs While the
alter table thread is waiting for upgrading to MDL_EXCLUSIVE before commit phase.
In commit phase, InnoDB acquires dict_operation_lock and it already holds MDL_EXCLUSIVE
on the table. After that, InnoDB applies the concurrent DML logs in commit phase.
This could lead to blocking of the following things:

  1) DML on the particular table (due to MDL_EXCLUSIVE on the table)
  2) InnoDB DDLs (due to dict_operation_lock)
  3) Purge thread, stats thread, the master thread (due to dict_operation_lock)

Fix:
====
Apply the concurrent DML logs in commit phase but before acquiring
dict_operation_lock in commit phase. It makes sure that (2), (3) can't be
blocked for longer time.
2019-07-10 12:43:51 +05:30
Sergei Golubchik
578e822985 bugfix: RPM installation complains about policy files, mariadb.service is not installed
add a versioned libsepol dependency to the server rpm
2019-07-10 09:02:10 +02:00
Sergei Golubchik
ab3a6ca670 cleanup: CPACK_RPM_* package description
add cmake helper macro SET_IF_UNSET()
and use it for CPACK_* variables
2019-07-10 09:02:10 +02:00
Sergei Golubchik
e47a143fc0 package ed25519 in debs
partial backport from 10.3
2019-07-10 09:02:10 +02:00
Sergei Golubchik
d91dd2878a MDEV-9409 workaround 2019-07-10 08:58:28 +02:00
Sergei Golubchik
a43edf73f3 restore RESTRICT_SYMBOL_EXPORTS(zlib)
that was lost in c54271723c

remove zlib/libxml2 workaround in CONNECT
2019-07-10 08:58:28 +02:00
Sergei Golubchik
5d04391f58 MDEV-19726 MariaDB server or backup RPM install assumes mysql user exists
also get rid of

   chown: cannot access ‘/var/lib/mysql’: No such file or directory

before someone reports a bug that
MariaDB server or backup RPM install assumes mysql datadir exists

followup for bee24fe181
2019-07-10 08:58:28 +02:00
Jan Lindström
01d3e39288 Galera test fixes.
Changes to be committed:
	modified:   suite/galera/r/galera_kill_ddl.result
	modified:   suite/galera/r/galera_sync_wait_show.result
	modified:   suite/galera/t/galera_kill_ddl.test
2019-07-10 09:43:49 +03:00
Sachin
bdc961acc7 MDEV-17588 replicate-do filters cause errors when creating filtered-out tables on master with syntax unsupported on slave
Add only test case for MDEV , because MDEV-19653 already fixed the issue.
2019-07-10 11:51:43 +05:30
Eugene Kosov
46c9268b0a post-merge fixes
rebuild galera.galera_as_slave_gtid and multi_source.mdev-8874
2019-07-09 22:24:50 +03:00
Eugene Kosov
4f1e4aa2ca fix clang warnings 2019-07-09 22:16:43 +03:00