Commit graph

70783 commits

Author SHA1 Message Date
Jan Lindström
c2c637c583
Merge pull request #1180 from codership/10.4-load-data-splitting
10.4 make wsrep_load_data_splitting use streaming replication
2019-02-13 13:29:51 +02:00
Jan Lindström
6476126cba MDEV-18564: Change wsrep_load_data_splitting off by default
Variable wsrep_load_data_splitting is deprecated and should be off
by default.
2019-02-13 13:19:37 +02:00
Varun Gupta
be8709eb7b MDEV-6111 Optimizer Trace
This task involves the implementation for the optimizer trace.

This feature produces a trace for any SELECT/UPDATE/DELETE/,
which contains information about decisions taken by the optimizer during
the optimization phase (choice of table access method, various costs,
transformations, etc). This feature would help to tell why some decisions were
taken by the optimizer and why some were rejected.

Trace is session-local, controlled by the @@optimizer_trace variable.
To enable optimizer trace we need to write:
   set @@optimizer_trace variable= 'enabled=on';

To display the trace one can run:
   SELECT trace FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;

This task also involves:
    MDEV-18489: Limit the memory used by the optimizer trace
    introduces a switch optimizer_trace_max_mem_size which limits
    the memory used by the optimizer trace. This was implemented by
    Sergei Petrunia.
2019-02-13 11:52:36 +05:30
Sergei Golubchik
b9f3f06857 MDEV-12484 Enable unix socket authentication by default
Change the default authentication for root@localhost to

  IDENTIFIED VIA mysql_native_password USING 'invalid' OR unix_socket

which provides secure passwordless login, while still allowing
SET PASSWORD to work as expected.

Also create a second all-privilege account for the user that owns
datadir (and thus has full access to the data anyway).

Compile unix_socket plugin statically into the server.
2019-02-12 19:14:37 +01:00
Teemu Ollakka
f20dfeecc6 Recorded galera_sr_load_data_splitting, galera_sr_load_data 2019-02-12 10:37:05 +02:00
Alexander Barkov
ce6505f890 MDEV-18447 Assertion `!is_zero_datetime()' failed in Timestamp_or_zero_datetime::tv 2019-02-12 11:59:17 +04:00
Marko Mäkelä
9f56dd7382 Merge 10.3 into 10.4 2019-02-11 17:55:25 +02:00
Jan Lindström
3a269a8b52 Record galera_var_load_data_splitting result after deprecating
warning.
2019-02-11 14:59:59 +02:00
Marko Mäkelä
4e7ee166a9 MDEV-18295 IMPORT TABLESPACE fails with instant-altered tables
When importing a tablespace, we must initialize dummy DEFAULT NULL
values for any instantly added columns in order to avoid a debug
assertion failure when PageConverter::update_records() invokes
rec_get_offsets(). Finally, when the operation completes, we must
evict and reload the table definition, so that the correct
default values for instantly added columns will be loaded.

ha_innobase::discard_or_import_tablespace(): On successful
IMPORT TABLESPACE, evict and reload the table definition,
so that btr_cur_instant_init() will load the correct metadata.

PageConverter::update_index_page(): Fill in dummy DEFAULT NULL values
for instantly added columns. These will be replaced upon the
completion of the operation by evicting and reloading the metadata.

row_discard_tablespace(): Invoke dict_table_t::remove_instant().
After DISCARD TABLESPACE, the table is no longer in "instant ALTER"
format, because there is no data file attached.
2019-02-11 14:42:48 +02:00
Jan Lindström
cbfbb70dd2
Merge pull request #1170 from codership/10.4-rsync_fix
MDEV-18178, mariabackup script timestamp change, galera suite fixed & re-recorded tests
2019-02-11 13:46:26 +02:00
Marko Mäkelä
b8e867e869 MDEV-18219 Assertion index->n_core_null_bytes <= ... after DROP COLUMN
rec_init_offsets(): Relax a debug assertion that is too strict
during the execution of btr_cur_instant_init_low().
2019-02-08 18:46:03 +02:00
mkaruza
131a4680c7 Fixed and re-recorded tests for galera
Re-recorded: galera.galera_gcache_recover_manytrx
Fixed: galera_3nodes.galera_evs_suspect_timeout
2019-02-08 14:26:56 +01:00
mkaruza
accc7f6029 MDEV-18178 Galera test failure on galera_sst_rsync2
* Donor node will now provide binlog-index argument to wsrep_sst_rsync script if binlog is used.
* Write correct path and binlog file names into joiner binlog-index file
2019-02-08 11:18:18 +01:00
mkaruza
59028d49eb Fix for certification failure on galera.galera_sst_mysqldump
Test galera_sst_mysqldump could fail occasionally due certification failure. Enforcing stricter causality checks by removing wsrep_sync_wait=0 from test configuration.
2019-02-07 16:55:44 +01:00
Eugene Kosov
10dac4293f MDEV-18444 ROW_FORMAT=COMPRESSED unnecessarily requires NOCOPY for INSTANT operation
instant_alter_column_possible(): allow non-rebuilding operations for
ROW_FORMAT=COMPRESSED
2019-02-07 12:20:53 +02:00
Marko Mäkelä
e80bcd7f64 Merge 10.3 into 10.4 2019-02-05 12:48:02 +02:00
Sergei Golubchik
7075d7fce6 MDEV-11340 Allow multiple alternative authentication methods for the same user
test a multi-auth with a missing auth plugin on the client

update (and simplify) plugin_auth.test to match
2019-02-04 16:07:12 +01:00
Sergei Golubchik
5b15cc613e MDEV-11340 Allow multiple alternative authentication methods for the same user
introduce the syntax

... IDENTIFIED { WITH | VIA }
      plugin [ { USING | AS } auth ]
 [ OR plugin [ { USING | AS } auth ]
 [ OR ... ]]

Server will try auth plugins in the specified order until the first
success. No protocol changes, server uses the existing "switch plugin"
packet.

The auth chain is stored in json as

  "auth_or":[{"plugin":"xxx","authentication_string":"yyy"},
             {},
             {"plugin":"foo","authentication_string":"bar"},
            ...],
  "plugin":"aaa", "authentication_string":"bbb"

Note:
* "auth_or" implies that there might be "auth_and" someday;
* one entry in the array is an empty object, meaning to take plugin/auth
  from the main json object. This preserves compatibility with
  the existing mysql.global_priv table and with the mysql.user view.
  This entry is preferrably a mysql_native_password plugin for a
  non-empty mysql.user.password column.

SET PASSWORD is supported and changes the password for the *first*
plugin in the chain that has a notion of a "password"
2019-02-04 16:06:57 +01:00
Sergei Golubchik
798d1a9ddf upgrade C/C to 3.1 2019-02-04 16:06:31 +01:00
Sergei Golubchik
3416e8ac9a cleanup: sys_vars.cc
add DEPRECATED() warning for variables with "deprecated" in the
help text. Remove redundant initializers.
2019-02-04 15:54:10 +01:00
Sergei Golubchik
103a32fdd3 ed25519: better error message for an incorrect password hash 2019-02-04 15:54:10 +01:00
Sergei Golubchik
c94ec9fc67 MDEV-17950 SHOW GRANTS FOR does not work for a user identified with non-existing plugin
Revert the side effect of 7c40996cc8.
Do not convert password hash to its binary representation when a user
entry is loaded. Do it lazily on the first authenticatation attempt.

As a collateral - force all authentication plugins to follow the
protocol and read_packet at least once before accessing info->username
(username is not available before first client handshake packet is read).

Fix PAM and GSSAPI plugins to behave.
2019-02-04 15:54:10 +01:00
Sergei Golubchik
3ab445819e MDEV-18119 upgrading from 10.3 to 10.4 can result in the password for a user to be wiped ou 2019-02-04 15:54:10 +01:00
Eugene Kosov
7293ce0ee8 MDEV-18470 improve alter_varchar_change.test
Make ALGORITHM=INSTANT explicit.
2019-02-04 17:52:39 +03:00
Marko Mäkelä
ab2458c61f Merge 10.2 into 10.3 2019-02-04 15:12:14 +02:00
Vladislav Vaintroub
e214aa1cd3 MDEV-18281 COM_RESET_CONNECTION changes the connection encoding
Store original charset during client authentication, and restore it for
COM_RESET_CONNECTION
2019-02-02 17:29:33 +01:00
Varun Gupta
74eb4fc9fc MDEV-17484: New defaults for eq_range_index_dive_limit in 10.4
The default value for eq_range_index_dive_limit is set to 10
2019-02-01 23:43:38 +05:30
Alexey Botchkov
09cea8703f MDEV-17148 DROP DATABASE throw "Directory not empty" after changed lower_case_table_names.
No need to lowercase table names on case-sensitive file systems, as the
cache won't contain the 'lowercased' table anyway. And it prevents the
UPPERCASE.frm from being deleted.
2019-02-01 17:10:27 +04:00
Thirunarayanan Balathandayuthapani
7c7161a1bd MDEV-18194 Incremental prepare tries to access page which is out of tablespace bounds
Problem:
=======
Mariabackup incremental prepare creates new tablespace when it encounter
new tablespace. It sets the intial size as FIL_IBD_FILE_INITIAL_SIZE (4).
But while applying redo log, it tries to access 5th page and then
it leads to out of tablespace error.

Fix:
===
While parsing the redo log record, track FSP_SIZE in recv_spaces for the
respective space id. Assign the recv_size for the tablespace when it
is loaded. Extend the tablespace depends on recv_size while applying
the redo log record.
2019-02-01 09:15:53 +02:00
Thirunarayanan Balathandayuthapani
f669cecbe3 MDEV-18415 mariabackup.mdev-14447 test case fails with Table 'test.t' doesn't exist in engine
- Added retry logic if validation of first page fails with checksum
mismatch.
2019-02-01 08:53:50 +02:00
Julius Goryavsky
c9f0a4a9bf MDEV-18426: Most of the mtr tests in the galera_3nodes suite fail
Most of the mtr tests in the galera_3nodes suite fail
for a variety of reasons with a variety of errors.
Some tests simply need to add the missing "connection"
lines to the result files, but many of them fail due
to substantial errors that require reworking test files.

This patch adds the missing "connection" lines to
the result files and fixes several substantial flaws
in the galera_3nodes suite tests and in the mtr framework
service files, adapting the tests from galera_3nodes
for the current version of MariaDB.

https://jira.mariadb.org/browse/MDEV-18426
2019-01-30 22:28:23 +01:00
Thirunarayanan Balathandayuthapani
b8aef87221 MDEV-16849 Extending indexed VARCHAR column should be instantaneous
Analysis:
========
Increasing the length of the indexed varchar column is not an instant operation for
innodb.

Fix:
===
- Introduce the new handler flag 'Alter_inplace_info::ALTER_COLUMN_INDEX_LENGTH' to
indicate the index length differs due to change of column length changes.

- InnoDB makes the ALTER_COLUMN_INDEX_LENGTH flag as instant operation.

This is a port of Mysql fix.

    commit 913071c0b16cc03e703308250d795bc381627e37
    Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
    Date:   Wed May 30 14:54:46 2018 +0530

        BUG#26848813: INDEXED COLUMN CAN'T BE CHANGED FROM VARCHAR(15)
                      TO VARCHAR(40) INSTANTANEOUSLY
2019-01-30 15:33:32 +05:30
Marko Mäkelä
923415ffdb Merge bb-10.4-release into 10.4 2019-01-30 09:13:38 +02:00
Marko Mäkelä
36be0a5aef MDEV-18399 Recognize the deprecated parameters innodb_file_format, innodb_large_prefix
The parameters innodb_file_format and innodb_large_prefix were overridden
in the Debian-distributed configuration files, because the default values
of these parameters between MariaDB 5.5 and MariaDB 10.2
did not make any sense.

To allow a more seamless upgrade from MariaDB 10.1 to later versions,
let InnoDB recognize the parameters innodb_file_format and
innodb_large_prefix and issue deprecation warnings for them if they
are specified. A deprecation period of only one major release
(one year between the MariaDB 10.2 and 10.3 releases) is insufficient
for these widely used parameters.
2019-01-28 17:58:14 +02:00
Vladislav Vaintroub
c2318291be MDEV-15135 - Make LOCK_show_status rwlock, to enable parallelism of
fill_status.

Also, remove LOCK_status around calc_sum_of_all_status()

Also, rename LOCK_show_status into LOCK_all_status_vars.
This reflects the variable the lock protects.
2019-01-28 17:49:53 +04:00
Sergei Golubchik
9c60535f86 SSL test fixes
* fix CRL tests to work
* regenerate certificates to be at least 2048 bit
  (fixes buster and rhel8 in buildbot)
* update generate-ssl-cert.sh to generate crl files
* make all SSL tests to use certificates generated
  in generate-ssl-cert.sh, remove unused certificates
2019-01-28 14:41:39 +01:00
Sergei Golubchik
eff7f9bea2 update the result file after the merge 2019-01-28 14:41:38 +01:00
Sergey Vojtovich
891be49a36 Simplified THD::current_linfo locking
LOG_INFO::lock was useless. It could've only protect against concurrent
iterators execution, which was already protected by LOCK_thread_count.

Use LOCK_thd_data instead of LOCK_thread_count as a protection against
THD::current_linfo reset.

Aim is to reduce usage of LOCK_thread_count and COND_thread_count.
Part of MDEV-15135.
2019-01-28 17:39:07 +04:00
Jan Lindström
97930df13c
Merge pull request #1142 from codership/10.2-MDEV-15740
MDEV-15740 Fixes to Galera transaction recovery
2019-01-28 12:01:35 +02:00
Teemu Ollakka
4ef556955f MDEV-15740 Enabled and recorded galera_gcache_recover_manytrx 2019-01-27 16:07:18 +02:00
Teemu Ollakka
ddfc789098 MDEV-15740 Recorded wsrep-recover-v25 2019-01-27 15:44:35 +02:00
Monty
d0bfa4afc4 Fixed failing testcase when blackhole engine is not enabled 2019-01-26 19:18:22 +02:00
Sergei Golubchik
9b76e2843b Merge branch '10.3' into 10.4 2019-01-26 01:13:41 +01:00
Aleksey Midenkov
06a37d37a1 MDEV-18122 Assertion 'table->versioned() == m_prebuilt->table->versioned()' failed in ha_innobase::open
Closes #1134
2019-01-25 23:30:45 +02:00
Sergei Golubchik
3b1b665fcb Merge branch '10.2' into 10.3 2019-01-25 20:35:40 +01:00
Sergei Golubchik
3fb6d2587d Don't run tests that check privileges in --embedded 2019-01-25 19:57:37 +01:00
Sergei Golubchik
74f184aff2 Fix tests not to fail with OpenSSL 1.1.1 with TLSv1.3 2019-01-25 19:57:37 +01:00
Eugene Kosov
0e1f7f5c4a MDEV-18057 Assertion `(node->state == 5) || (node->state == 6)' failed in row_upd_sec_step upon DELETE after UPDATE failed due to FK violation
The idea of the fix: reset state from previous query.

row_upd_clust_step(): reset cached index before updating a clustered index

Closes #1133
2019-01-25 16:35:50 +02:00
Marko Mäkelä
9bd80ada6f Merge 10.2 into 10.3 2019-01-25 16:35:13 +02:00
Teemu Ollakka
ce28fa5303 Backported wsrep-recover test from 10.4.
Backported wsrep-recover test from 10.4 to test the wsrep recovery
after database shutdown or crash. Renamed the test to wsrep-recover-v25
to avoid conflicts with existing test in 10.4 and to provide coverage
for wsrep-API v25 compatible behavior.

The test case in 10.2 is simpler because out of order prepare
step cannot happen, the commit order critical section is grabbed
before prepare phase.

Test is not recorded since it does not produce expected result.
2019-01-25 16:03:14 +02:00