Commit graph

184737 commits

Author SHA1 Message Date
Marko Mäkelä
ea25bdc135 Do not write MLOG_IBUF_BITMAP_INIT
Use ibuf_bitmap_page_init() only during recovery.

fsp_fill_free_list(): Initialize the FIL_PAGE_TYPE using MLOG_2BYTES.
The page contents will already have been zeroed out by
MLOG_INIT_FILE_PAGE2.

ibuf_bitmap_init_apply(): Replaces ibuf_parse_bitmap_init().
2019-02-08 19:10:33 +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
Teemu Ollakka
58de2bf30d MDEV-18481 Use mlog_memset() to clear wsrep checkpoint 2019-02-08 14:17:23 +00:00
Jan Lindström
eb1d7aeeea
Merge pull request #1165 from codership/10.4-galera_sst_mysqldump-cnf-fix
Fix for failures on galera.galera_sst_mysqldump
2019-02-08 07:58:29 +02: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
Marko Mäkelä
f4f8dd69aa MDEV-18493: Correct a bogus assertion 2019-02-07 16:25:18 +02:00
Marko Mäkelä
0a1c3477bf MDEV-18493 Remove page_size_t
MySQL 5.7 introduced the class page_size_t and increased the size of
buffer pool page descriptors by introducing this object to them.

Maybe the intention of this exercise was to prepare for a future
where the buffer pool could accommodate multiple page sizes.
But that future never arrived, not even in MySQL 8.0. It is much
easier to manage a pool of a single page size, and typically all
storage devices of an InnoDB instance benefit from using the same
page size.

Let us remove page_size_t from MariaDB Server. This will make it
easier to remove support for ROW_FORMAT=COMPRESSED (or make it a
compile-time option) in the future, just by removing various
occurrences of zip_size.
2019-02-07 12:21:35 +02: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
Jan Lindström
c949d61e30
Merge pull request #1152 from codership/10.4-wsrep-lib-update
Updated wsrep-lib to galera cache encryption implementation
2019-02-07 10:28:29 +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
9c9b4590b6 Fix the bug introduced in MDEV-17658
if auth_root_socket is set, root user should be using unix_socket

Followup for 4abb8216a0
2019-02-04 15:54:10 +01:00
Sergei Golubchik
b8344be4fa cleanup 2019-02-04 15:54:10 +01:00
Sergei Golubchik
9b3f177c6d avoid unintentional %union size increases 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
3742f6f9aa cleanup: use only one callback in PAM plugin, not two 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
Sergei Golubchik
eeaaf4a845 stricter json unit tests 2019-02-04 15:54:10 +01:00
Marko Mäkelä
ab2458c61f Merge 10.2 into 10.3 2019-02-04 15:12:14 +02:00
Kentoku
5b996782be MDEV-16279 Spider crashes on CHECKSUM TABLE with spider_quick_mode=3
add tests
2019-02-03 15:58:45 +05:30
Kentoku
540e82d1b4 MDEV-16787 optimistic parallel replication fails on spider
Add a system variable spider_slave_trx_isolation.
- spider_slave_trx_isolation
  The transaction isolation level when Spider table is used by slave SQL thread.
  -1 : OFF
   0 : READ UNCOMMITTED
   1 : READ COMMITTED
   2 : REPEATABLE READ
   3 : SERIALIZABLE
  The default value is -1

Miscellaneous Spider typos
2019-02-03 15:58:45 +05:30
Kentoku
41e60e7fe8 MDEV-16520 Out-Of-Memory running big aggregate query on Spider Engine
Change default value of the followings
quick_mode 0 -> 3
quick_page_size 100 -> 1024

Add the following parameter for limiting result page size by byte
- quick_page_byte(qpb)
  Number of bytes in a page when acquisition one by one.
  When quick_mode is 1 or 2, Spider stores at least 1 record even if
  quick_page_byte is smaller than 1 record. When quick_mode is 3,
  quick_page_byte is used for judging using temporary table.
  That is given to priority when server parameter spider_quick_page_byte
  is set.
  The default value is 10485760

Fix "out of sync" issue at using quick_mode = 1 or 2
2019-02-03 15:58:45 +05:30
Kentoku
b27284db4a MDEV-16279 Spider crashes on CHECKSUM TABLE with spider_quick_mode=3
The fields of the temporary table were not created in create_tmp_table function. Because item->const_item() was true. But the temporary tables that is created by Spider are always used all columns. So Spider should call create_tmp_table function with TMP_TABLE_ALL_COLUMNS flag.
2019-02-03 15:58:45 +05:30
Kentoku
4a28a79e48 Update Spider to version 3.3.14. Add direct left outer join/right outer join/inner join feature 2019-02-03 15:58:45 +05:30
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
mkaruza
239b2dcf6e Updated wsrep-lib to galera cache encryption implementation 2019-02-01 18:08:36 +01:00
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
Vladislav Vaintroub
a2641b2611 MDEV-18380 : adjust max_statement_time in mariabackup 2019-02-01 08:53:50 +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
Vladislav Vaintroub
20e19f6975 MDEV-17479 Assertion `mysql_socket.fd != -1' failed in inline_mysql_socket_send on server shutdown
Do not try to write ER_SHUTDOWN error message to socket, when it is forcefully closed by the shutdown.
This will avoid the race condition (attempt to write to closed socket,  if connection shuts down by itself).
2019-01-31 22:12:24 +01:00
Jan Lindström
14a58cea59
Merge pull request #1147 from tempesta-tech/sysprg/MDEV-18426
MDEV-18426: Most of the mtr tests in the galera_3nodes suite fail
2019-01-31 19:52:11 +02:00
Kentoku
4e599c74bb MDEV-18313 Supports 'wrapper mariadb' for connection information 2019-01-31 08:51:34 +01:00
Kentoku
470c1b8d56 Fix an error at using spider_direct_sql with temporary table 2019-01-31 08:51:34 +01:00
Kentoku
ea347fcb28 remove unnecessary drop database/table from slave_trx_isolation.test
add simplified slave_trx_isolation.test
2019-01-31 08:51:34 +01:00
Kentoku
be556f817b remove unnecessary drop database/table from quick_mode.test
add simplified quick_mode.test
2019-01-31 08:51:34 +01:00
Kentoku
6d80d35d91 MDEV-16787 optimistic parallel replication fails on spider
Add a system variable spider_slave_trx_isolation.
- spider_slave_trx_isolation
  The transaction isolation level when Spider table is used by slave SQL thread.
  -1 : OFF
   0 : READ UNCOMMITTED
   1 : READ COMMITTED
   2 : REPEATABLE READ
   3 : SERIALIZABLE
  The default value is -1

Miscellaneous Spider typos
2019-01-31 08:51:34 +01:00
Kentoku
bef6b197fc MDEV-16520 Out-Of-Memory running big aggregate query on Spider Engine
Change default value of the followings
quick_mode 0 -> 3
quick_page_size 100 -> 1024

Add the following parameter for limiting result page size by byte
- quick_page_byte(qpb)
  Number of bytes in a page when acquisition one by one.
  When quick_mode is 1 or 2, Spider stores at least 1 record even if
  quick_page_byte is smaller than 1 record. When quick_mode is 3,
  quick_page_byte is used for judging using temporary table.
  That is given to priority when server parameter spider_quick_page_byte
  is set.
  The default value is 10485760

Fix "out of sync" issue at using quick_mode = 1 or 2
2019-01-31 08:51:34 +01:00
Kentoku
3cb7c5f27b MDEV-16279 Spider crashes on CHECKSUM TABLE with spider_quick_mode=3
The fields of the temporary table were not created in create_tmp_table function. Because item->const_item() was true. But the temporary tables that is created by Spider are always used all columns. So Spider should call create_tmp_table function with TMP_TABLE_ALL_COLUMNS flag.
2019-01-31 08:51:34 +01:00
Kentoku
6caf9ec425 Update Spider to version 3.3.14. Add direct left outer join/right outer join/inner join feature 2019-01-31 08:51:34 +01: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
Daniel Bartholomew
ac55d3e448 bump the VERSION 2019-01-29 13:24:19 -05:00
Sergey Vojtovich
4b3656a44d Avoid taking LOCK_thread_count for thread_count protection
Replaced wait on COND_thread_count with busy waiting with 1 millisecond
sleep.

Aim is to reduce usage of LOCK_thread_count and COND_thread_count.
2019-01-29 11:56:35 +04:00