Commit graph

186330 commits

Author SHA1 Message Date
Monty
4733464975 Fixed that mariadb-# binaries reads their corresponding entry from my.cnf
- Added mariadb-# to load_default_groups to all mariadb-# scripts and
  mariadb-binaries.
- Added mariadbd and mariadbd-"version" to load_default_groups for the
  mysqld/mariadb server
- Added mariadb-client to load_default_groups for the mysql/mariadb client

Other things
- Ignored mysql-test/lib/My/SafeProcess/wsrep_check_version
- mysql_install_db will now automatically detect if run from srcdir
2019-07-18 15:32:22 +03:00
Julius Goryavsky
5a95a33e30 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:39:57 +02:00
Julius Goryavsky
f5390eea9a 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:57:38 +02:00
Jan Lindström
ee3ef790ca MDEV-19970 Galera test failure on galera_sr.galera-features#56
Move test to big_test as it takes significant amount of time and
add wait to get slave threads start and setup to replicate.
2019-07-16 09:21:26 +03:00
Jan Lindström
5244813114 MDEV-19968: Galera test failure on galera_load_data
In this test we are not interested a real cardinality etc
numbers. We are interested if they are not same in both
galera nodes as they should be.
2019-07-16 07:54:57 +03:00
Teemu Ollakka
61cc932781 Wsrep crash caused by COM_CHANGE_USER, COM_RESET_CONNECTION (#1358)
COM_CHANGE_USER and COM_RESET_CONNECTION commands cause
THD::cleanup() to be called in the middle of command handling.
This causes wsrep client_state sanity checks to fail.

As a fix, temporarily close wsrep client_state before THD::change_user()
is called when handling COM_CHANGE_USER and COM_RESET_CONNECTION,
and restore the state after THD::change_user() returns.

This commit also updates wsrep-lib to version which removes
exception usage in wsrep client_state sanity checks.
2019-07-15 12:06:24 +03:00
Eugene Kosov
a0230bc76d MDEV-18266 Changing an index comment unnecessarily rebuilds index
ALTER_CHANGE_INDEX_COMMENT: new handler flag added

Compare_keys::EqualButComment: new outcome of compare_keys_but_name()
2019-07-10 21:36:29 +03:00
Alexander Barkov
70c2bde931 MDEV-19996 Bison grammar: turn singe-character operators into <kwd> 2019-07-09 15:10:45 +04:00
Aleksey Midenkov
6974962945 MDEV-16222 Assertion `0' failed in row_purge_remove_sec_if_poss_leaf on table with virtual columns and indexes
Cause
Stale thd->m_stmt_da->m_sql_errno which is from different invocation.

Fix
Reset error state before attempt to open table.
2019-07-08 14:55:59 +03:00
Aleksey Midenkov
af5b0dbab6 MDEV-19175 Server crashes in ha_partition::vers_can_native upon INSERT DELAYED into versioned partitioned table
Uninitialized LEX::part_info on ha_partition::vers_can_native().
2019-07-08 13:25:05 +03:00
Aleksey Midenkov
c7f818928d Tests: versioning suite fix when no test_versioning plugin 2019-07-08 13:25:04 +03:00
Aleksey Midenkov
1bb57e59a1 MDEV-19785 Storage CONNECT compilation error: unknown type name 'UNZFAM'
Another fail fix:

undefined reference to `ZipLoadFile`
2019-07-08 13:25:04 +03:00
Kentoku SHIBA
9d6b601e79
MDEV-19866 With a Spider table, a SELECT with WHERE involving primary key breaks following SELECTs (#1356)
Change checking scanning partitions from part_spec to part_info->read_partitions
2019-07-06 23:54:53 +09:00
Kentoku SHIBA
fa7051c419
MDEV-19842 Crash while creating statistics for Spider table (#1355)
Added checks of the number of columns of the system tables.
Move install_spider.sql into source code except installing Spider
2019-07-06 23:52:53 +09:00
Kentoku SHIBA
4a739d7650
MDEV-16248 Row based replication to spider with float column fails on delete/update (#1354) 2019-07-06 22:38:43 +09:00
Eugene Kosov
fb3998c351 fix build 2019-07-05 18:27:44 +03:00
Sergei Golubchik
c6dff51276 Workaround for https://github.com/systemd/systemd/issues/1221
Put all capabilities in one CapabilityBoundingSet line,
otherwise buggy systemd sets CapabilityBoundingSet=0
2019-07-05 17:12:46 +02:00
Eugene Kosov
c9aa495fb6 MDEV-19955 make argument of handler::ha_write_row() const
MDEV-19486 and one more similar bug appeared because handler::write_row() interface
welcomes to modify buffer by storage engine. But callers are not ready for that
thus bugs are possible in future.

handler::write_row():
handler::ha_write_row(): make argument const
2019-07-05 13:14:19 +03:00
Eugene Kosov
23c12ed5cb MDEV-19951 use override keyword across the InnoDB
Use on every virtual function override.

ha_innobase: mark a final

ha_innobase::bas_ext(): remove as unused

ha_innobase::get_cascade_foreign_key_table_list: remove as unused

ha_innobase::end_stmt(): merge into ha_innobase::reset()
2019-07-04 16:28:27 +03:00
Robert Bindar
e8392e58b2 MDEV-19696 - Cleanup gcc sync builtins
Since 10.4 requires C++11 capable compiler, gcc sync builtins became
dead code. Remove relevant cmake checks and cleanup include files.
2019-07-03 12:11:22 +03:00
Sergei Golubchik
3acf741051 fix suite.pm to not garble $_ 2019-07-02 21:27:12 +02:00
Marko Mäkelä
7a3d34d645 Merge 10.3 into 10.4 2019-07-02 21:44:58 +03:00
Marko Mäkelä
1d45b3b055 Merge 10.2 into 10.3 2019-07-02 21:41:40 +03:00
Marko Mäkelä
c1cb5c17be MDEV-19869: Correct the logic, and avoid type mismatch 2019-07-02 21:40:34 +03:00
Marko Mäkelä
0c6514eece MDEV-19781: Skip the test for embedded server 2019-07-02 21:33:54 +03:00
Sergei Golubchik
faeaf978b8 fix suite.pm for windows 2019-07-02 20:17:01 +02:00
Marko Mäkelä
e82fe21e3a Merge 10.2 into 10.3 2019-07-02 17:46:22 +03:00
Marko Mäkelä
709f0510e3 MDEV-19845: Adjust for Skylake based on benchmarks
Even though the PAUSE instruction latency was increased from
about 10 to 140 clock cycles in the Intel Skylake microarchitecture,
it seems to be optimal to reduce the amount of subsequently executed
PAUSE instructions not to 1/14, but to 1/2.
2019-07-02 17:44:05 +03:00
LingBin
6842a1538a Fix github urls of submodules
Uniformly use the `.git` suffix format
2019-07-02 17:25:36 +04:00
Sergei Golubchik
4fef644303 cleanup: mtr and plugins
* in --parallel mode don't copy/symlinks plugins individually
  in each forked child's vardir, use the common parent vardir with
  all plugins
* move pam plugin specific code from mysql-test-run.pl to
  suite/plugins/suite.pm
2019-07-02 14:27:32 +02:00
Sergei Golubchik
d84792b689 Skip pam tests unless $USER owns auth_pam_tool_dir
(meaning, if MariaDB is installed system-wide, pam tests
require mtr to be run as mysql user)
2019-07-02 14:27:32 +02:00
Sergei Golubchik
4f87ad1975 MDEV-19879 server can send empty error message to client with pam_use_cleartext_plugin
fixed in MDEV-19878, here just adding tests
2019-07-02 14:27:31 +02:00
Sergei Golubchik
3914a792d8 MDEV-19880 pam v1: pam password authentication doesn't work at all in MariaDB 10.4
* fix incorrect parentheses
* if there was no password on the command line or in .cnf file,
  pkt will be "", and we need to request the user to enter the password
2019-07-02 14:27:31 +02:00
Sergei Golubchik
dd93028dae MDEV-19878 pam v2: pam password authentication doesn't work at all
* wait() for the child process to die, let it rest in peace
* fix incorrect parentheses
* if there was no password on the command line or in .cnf file,
  pkt will be "", and we need to request the user to enter the password
* make sure that auth->salt is always allocated on a permanent memroot.
  when called from set_user_salt_if_needed(), user_copy and its auth_str
  are on the thd memroot, but auth_copy->salt is then copied to auth->salt
* adjust service files so that systemd wouldn't interfere with our
  setuid executables

also
* print the pam error message in debug mode
2019-07-02 14:27:31 +02:00
Sergei Golubchik
ec494cb1fa MDEV-19876 pam v2: auth_pam_tool_dir and auth_pam_tool permissions are wrong in RPMs
in fact, permissions were fine in RPM, but mysql_install_db
was resetting them.

Also fix Debian, while we're at it
2019-07-02 14:27:31 +02:00
Sergei Golubchik
a07c10f53f build pam test module as a part of the build
and install in mysql-test/suite/plugins/pam
so that it could be manually copied into /etc if needed
2019-07-02 14:27:31 +02:00
Sergei Golubchik
9c74cc4df7 Alter pam test to ask for a password first
this matches the common behavior with pam_unix and helps to
catch password related errors

also, use abort() instead of sigsegv to avoid polluting
/var/log/messages with intentional crashes
2019-07-02 14:27:31 +02:00
Sergei Golubchik
e46b87aaed enable TLSv1.0 in WolfSSL 2019-07-02 14:27:31 +02:00
Sergei Golubchik
e79b9005f1 don't run tls_version test if TLSv1.1 is disabled
in /etc/ssl/openssl.cnf

as it happens to be on the buster builder
2019-07-02 14:27:31 +02:00
Sergei Golubchik
4bfb19d407 cleanup: mtr suite.pm ssl checks 2019-07-02 14:27:31 +02:00
Marko Mäkelä
7f1e1309bb MDEV-12626: Import innodb_buffer_pool_dump_pct adjusted for MDEV-11454 2019-07-02 15:24:23 +03:00
Marko Mäkelä
6bb922e58e MDEV-13626: Import and adjust innodb.blob-crash 2019-07-02 15:18:12 +03:00
Sujatha
4bad6aa9ae MDEV-19716: ASAN use-after-poison in Query_log_event::Query_log_event / THD::log_events_and_free_tmp_shares
Analysis:
========
When a given client session ends on a master, the server logs a DROP TEMPORARY
TABLE IF EXISTS statement for each temporary table that still exists in the
current session. It ensures a proper temporary table cleanup on the slave. In
order to write the DROP TEMPORARY TABLE query in binary log a 'Query_log_event'
object is created. Within the 'Query_log_event' constructor
'thd->lex->sql_command' is read to identify what type of cache needs to be
used to write the query. When the code reaches here as part of THD::cleanup
the 'thd->lex->sql_command' will be in an invalid state. The 'thd->lex' could
have been cleared or it could be pointing to a statement which was in the
middle of execution when the session ended. In such cases ASAN reports
use-after-poison error.

Fix:
===
The 'THD::Cleanup' code invokes 'THD::log_events_and_free_tmp_shares' to look
for temporary tables and write appropriate DROP TABLE stmts for them. This
cleanup code provides a special flag named 'direct=TRUE' to the
Query_log_event constructor. Having 'direct=TRUE' means that this query
doesn't require any caching. Hence in this scenario the 'Query_log_event'
constructor should respect the 'direct' flag and simply skip the logic of
deciding the type of cache to be used for the statement. Hence the code will
not access the stale lex object.
2019-07-02 12:25:08 +05:30
Thirunarayanan Balathandayuthapani
41f6e68878 MDEV-19781 Add page id matching check in innochecksum tool
- Changed the assert to ignore SRV_LOG_SPACE_FIRST_ID. Post push
fix to address the previous commit failure.
2019-07-01 21:58:20 +05:30
Marko Mäkelä
9c16460e63 Merge 10.3 into 10.4 2019-07-01 18:37:15 +03:00
Marko Mäkelä
0e1ba364a1 MDEV-19916 Corruption after instant ADD/DROP and shrinking the tree
btr_lift_page_up(): Correct the incorrect condition.

page_validate(): Validate the page type.
2019-07-01 18:24:54 +03:00
Marko Mäkelä
92bbf4f53d MDEV-19916: Improve page_validate()
page_validate(): Validate also the page type, and try to list all
errors that were encountered for the page, with a little more detail.
2019-07-01 18:24:35 +03:00
Marko Mäkelä
685b527f0c MDEV-16060: Speed up the test by 1 second 2019-07-01 18:17:29 +03:00
Thirunarayanan Balathandayuthapani
40c1f4bd4c MDEV-19781 Add page id matching check in innochecksum tool
Changed the debug insert inside fil_io() to check whether it writes
the page to wrong offset only for user tablespace.
2019-07-01 20:21:26 +05:30
Thirunarayanan Balathandayuthapani
dca9792a24 MDEV-17228 Encrypted temporary tables are not encrypted
- log_crypt_init() should be called from create_log_files(). Because
it should re-create the new random nonce compared to the old ones.
2019-07-01 18:50:44 +05:30