lp:maria

Owned by Maria-captains
Get this repository:
git clone https://git.launchpad.net/maria

Import details

Import Status: Reviewed

This repository is an import of the Git repository at https://github.com/MariaDB/server.git.

The next import is scheduled to run in 1 hour.

Last successful import was 4 hours ago.

Import started 4 hours ago on alnitak and finished 4 hours ago taking 4 minutes — see the log
Import started 10 hours ago on alnitak and finished 10 hours ago taking 8 minutes — see the log
Import started 17 hours ago on izar and finished 17 hours ago taking 3 minutes — see the log
Import started 23 hours ago on izar and finished 23 hours ago taking 3 minutes — see the log
Import started on 2021-03-08 on alnitak and finished on 2021-03-08 taking 3 minutes — see the log
Import started on 2021-03-07 on alnitak and finished on 2021-03-07 taking 3 minutes — see the log
Import started on 2021-03-07 on izar and finished on 2021-03-07 taking 1 hour — see the log
Import started on 2021-03-07 on alnitak and finished on 2021-03-07 taking 3 minutes — see the log
Import started on 2021-03-07 on alnitak and finished on 2021-03-07 taking 2 minutes — see the log
Import started on 2021-03-06 on izar and finished on 2021-03-06 taking 4 minutes — see the log

Branches

Name Last Modified Last Commit
bb-10.6-midenok-MDEV-16417-atomic 2021-03-08 22:31:57 UTC 10 hours ago
MDEV-21053 Crash safety of foreign key DDL

Author: midenok
Author Date: 2020-02-04 14:19:03 UTC

MDEV-21053 Crash safety of foreign key DDL

DDL log extensions (and other stuff):

- New `.file` handler which means treat ddl_log_entry->name and
  ddl_log_entry->from_name as file names. Previously they were used
  without .frm extension.

- New ddl_log_entry_code: DDL_TRY_LOG_ENTRY_CODE ('t') which means try
  log action but not fail the whole chain if action fails. Previously
  it failed action chain unconditionally dispite the comment:

  /* Write to error log and continue with next log entry */

- Better ddl_log tracing.

New classes:

- ddl_log_info: tracks DDL logging state;

- FK_backup: contains update FRM procedures;

- FK_share_backup, FK_ddl_backup: track (and possibly rollback)
  foreign key changes for TABLE_SHARE;

- FK_backup_storage: collection of FK_ddl_backup, can rollback the
  whole bunch of shares in memory and FRMs on disk.

Other:

- Test case for multi-rename.

bb-10.6-midenok-MDEV-12483 2021-03-08 22:30:13 UTC 10 hours ago
ER_BAD_FIELD_ERROR fix

Author: midenok
Author Date: 2021-03-08 22:20:57 UTC

ER_BAD_FIELD_ERROR fix

bb-10.3-serg 2021-03-08 20:24:38 UTC 12 hours ago
MDEV-24868 Server crashes in optimize_schema_tables_memory_usage after select...

Author: Nayuta Yanagisawa
Author Date: 2021-03-05 17:51:17 UTC

MDEV-24868 Server crashes in optimize_schema_tables_memory_usage after select from information_schema.innodb_sys_columns

optimize_schema_tables_memory_usage() crashed when its argument included
TABLE struct that was not fully initialized.

To prevent such a crash, we check if a table is an information schema table at
the beginning of each iteration.

Closes #1768

bb-10.3-sachin 2021-03-08 19:03:47 UTC 13 hours ago
MDEV-19157 Optimistic Parallel Replication fails when gtid_slave_pos table is...

Author: Sachin Setiya
Author Date: 2020-06-16 09:31:22 UTC

MDEV-19157 Optimistic Parallel Replication fails when gtid_slave_pos table is non transactional and binlog events are transactional

Problem:- In Optimistic/Aggressive mode of parallel replication when we have
conflict, we retry the transaction, But if gtid_slave_pos is non transactional
In that case retry may result into duplicate key error for table because
the conflicted transaction can not rollback the changes in gtid_slave_pos table
So when we try the same trans again, We get the Duplicate Key error

Solution:- Users are advised to use transactional storage engine for gtid_slave_pos.
In this patch we are throwing warning when we see that gtid_slave_pos in non
transactional.

Working:- is_gtid_slave_pos_transactional variable is added into rpl_slave_state
which will take care of caching result of gtid_slave_pos transactionality
We are updating this variable in find_gtid_pos_tables_cb, this function will
be called for each gtid_slave_pos_XYZ table at the time of start slave by
handle_slave_sql.
We are also checking for opt_gtid_pos_auto_plugins while giving warning
because it can be possible that respective gtid_slave_pos_XYZ table has
not been created yet but user has set the variable.

10.6 2021-03-08 17:23:42 UTC 15 hours ago
Remove trailing newline from error message in dlerror() on Windows

Author: Sergey Zolotarev
Author Date: 2021-01-31 13:41:29 UTC

Remove trailing newline from error message in dlerror() on Windows

1. Add FORMAT_MESSAGE_MAX_WIDTH_MASK flag to remove trailing \r\n from
   the error message returned by FormatMessageA().
2. Also, add FORMAT_MESSAGE_IGNORE_INSERTS to avoid potential problems
   with system messages that have argument placeholders.

Quote from FormatMessage docs on MSDN:

If this function is called without FORMAT_MESSAGE_IGNORE_INSERTS, the
Arguments parameter must contain enough parameters to satisfy all insertion
sequences in the message string, and they must be of the correct type.
Therefore, do not use untrusted or unknown message strings with inserts
enabled because they can contain more insertion sequences than Arguments
provides, or those that may be of the wrong type. In particular, it is
unsafe to take an arbitrary system error code returned from an API and use
FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS.

10.5 2021-03-08 17:00:55 UTC 15 hours ago
Fix Windows clang build with newest cmake

Author: Vladislav Vaintroub
Author Date: 2021-03-08 17:00:55 UTC

Fix Windows clang build with newest cmake

10.4 2021-03-08 16:02:45 UTC 16 hours ago
MDEV-24363 (followup fix) mysql.user view should

Author: Robert Bindar
Author Date: 2021-03-08 15:51:33 UTC

MDEV-24363 (followup fix) mysql.user view should

not be dropped if the DEFINER is custom. Revert changes
to MDEV-23102 tests as they were designed to catch
this corner case.
The explanation for this corner case is that users
historically used to tweak the mysql.user table and
probably still do even though mysql.user is now a view.
Thus, if the DEFINER of the view is not default, i.e.
root@localhost or mariadb.sys@localhost, we should avoid
dropping the view during upgrade process to not discard
potential custom changes.

bb-10.6-MDEV-11384 2021-03-08 15:52:27 UTC 16 hours ago
MDEV-11384: Simplify instrumentation for LRU eviction

Author: Marko Mäkelä
Author Date: 2021-03-08 15:41:49 UTC

MDEV-11384: Simplify instrumentation for LRU eviction

Let us add the status variable innodb_buffer_pool_pages_LRU_freed
to monitor the number of pages that were freed by a buffer pool LRU
eviction scan, without flushing.

Also, let us simplify the monitor interface:
MONITOR_LRU_BATCH_FLUSH_COUNT, MONITOR_LRU_BATCH_FLUSH_PAGES,
MONITOR_LRU_BATCH_EVICT_COUNT, MONITOR_LRU_BATCH_EVICT_PAGES:
Remove.

MONITOR_LRU_BATCH_FLUSH_TOTAL_PAGE: Track buf_lru_flush_page_count
(innodb_buffer_pool_pages_LRU_flushed).

MONITOR_LRU_BATCH_EVICT_TOTAL_PAGE: Track buf_lru_freed_page_count
(buffer_pool_pages_LRU_freed).

bb-10.2-alice1 2021-03-08 15:29:19 UTC 17 hours ago
reenable tests from engines/funcs

Author: Larysa Sherepa
Author Date: 2021-03-08 15:28:41 UTC

reenable tests from engines/funcs

codership-sst-ssl-fixes-10.2 2021-03-08 15:27:53 UTC 17 hours ago
Merge branch 'sst-ssl-fixes-10.2' of https://github.com/codership/mariadb-ser...

Author: Julius Goryavsky
Author Date: 2021-03-08 15:27:53 UTC

Merge branch 'sst-ssl-fixes-10.2' of https://github.com/codership/mariadb-server into codership-sst-ssl-fixes-10.2

bb-10.2-ssl 2021-03-08 15:27:53 UTC 17 hours ago
Merge branch 'sst-ssl-fixes-10.2' of https://github.com/codership/mariadb-ser...

Author: Julius Goryavsky
Author Date: 2021-03-08 15:27:53 UTC

Merge branch 'sst-ssl-fixes-10.2' of https://github.com/codership/mariadb-server into codership-sst-ssl-fixes-10.2

bb-10.6-MDEV-16708-2 2021-03-08 14:50:23 UTC 17 hours ago
MDEV-16708: Unsupported commands for prepared statements

Author: Dmitry Shulga
Author Date: 2021-03-08 14:50:23 UTC

MDEV-16708: Unsupported commands for prepared statements

Incorrect number of fields were sent via binary protocol
in result set metadata for the HELP command in some cases

bb-10.2-serg 2021-03-08 13:54:05 UTC 18 hours ago
Correct the value of global memory_used

Author: Sergei Golubchik
Author Date: 2021-03-07 00:33:51 UTC

Correct the value of global memory_used

As a special hack global memory_used isn't SHOW_LONG_STATUS
but still relies on calc_sum_of_all_status() being called.

followup for 63f91927870

10.2 2021-03-08 13:54:05 UTC 18 hours ago
Correct the value of global memory_used

Author: Sergei Golubchik
Author Date: 2021-03-07 00:33:51 UTC

Correct the value of global memory_used

As a special hack global memory_used isn't SHOW_LONG_STATUS
but still relies on calc_sum_of_all_status() being called.

followup for 63f91927870

bb-10.5-MDEV-24949 2021-03-08 13:03:00 UTC 19 hours ago
MDEV-24949: Enable idle flushing (after MDEV-23855 disabled it)

Author: Marko Mäkelä
Author Date: 2021-03-08 13:03:00 UTC

MDEV-24949: Enable idle flushing (after MDEV-23855 disabled it)

Thanks to Krunal Bauskar for noticing this regression and providing
a suggested fix that this one is based on.

After MDEV-23855, the page cleaner thread will stop flushing if
dirty_pct < innodb_max_dirty_pages_pct_lwm.

The page cleaner used to flush all pages when the server is idle
(no write transactions have been committed recently). That is useful,
because it will limit the maximum checkpoint age and thus reduce
the likelihood of log_free_check() stalls during a write burst.

With this change, the page cleaner will avoid entering untimed sleep
when the server is not executing write transactions, and it will
keep writing up to innodb_io_capacity pages per second until the
buffer pool is clean or some write activity is recognized.

bb-10.4-robert 2021-03-08 10:17:46 UTC 22 hours ago
test

Author: Robert Bindar
Author Date: 2021-03-08 10:17:46 UTC

test

bb-10.5-sachin 2021-03-08 07:46:35 UTC 2021-03-08
Trigger Buildbot

Author: Sachin Setiya
Author Date: 2021-03-08 07:46:35 UTC

Trigger Buildbot

bb-10.2-MDEV-24853 2021-03-08 04:03:06 UTC 2021-03-08
MDEV-24853: Duplicate key generated during cluster configuration change

Author: Julius Goryavsky
Author Date: 2021-03-08 04:03:06 UTC

MDEV-24853: Duplicate key generated during cluster configuration change

Incorrect processing of an auto-incrementing field in the
WSREP-related code during applying transactions results in
a duplicate key being created. This is due to the fact that
at the beginning of the write_row() and update_row() functions,
the values of the auto-increment parameters are used, which
are read from the parameters of the current thread, but further
along the code other values are used, which are read from global
variables (when applying a transaction). This can happen when
the cluster configuration has changed while applying a transaction
(for example in the high_priority_service mode for Galera 4).
Further during IST processing duplicating key is detected, and
processing of the DB_DUPLICATE_KEY return code (inside innodb,
in the write_row() handler) results in a call to the
wsrep_thd_self_abort() function.

bb-10.6-danielblack-MDEV-5536-socket-activation 2021-03-08 02:38:53 UTC 2021-03-08
remote systemd mysql{,d}.service compat links

Author: Daniel Black
Author Date: 2021-03-04 06:43:27 UTC

remote systemd mysql{,d}.service compat links

bb-10.6-mdev7317 2021-03-07 20:14:48 UTC 2021-03-07
MDEV-25075: Ignorable index makes the resulting CREATE TABLE invalid

Author: varun
Author Date: 2021-03-07 19:50:58 UTC

MDEV-25075: Ignorable index makes the resulting CREATE TABLE invalid

bb-10.4-serg 2021-03-07 13:12:00 UTC 2021-03-07
MDEV-24975 Server consumes extra 4G memory upon querying INFORMATION_SCHEMA.O...

Author: Sergei Golubchik
Author Date: 2021-03-07 00:53:52 UTC

MDEV-24975 Server consumes extra 4G memory upon querying INFORMATION_SCHEMA.OPTIIMIZER_TRACE

if a query used no fields from an I_S table, we were creating a temp
table with one, first, field (as a table cannot have zero fields),
with its length truncated to 1.

Now - force also this dummy field to be a normal field, not a BLOB

bb-10.6-refactor-limit 2021-03-07 11:11:35 UTC 2021-03-07
DO NOT PUSH! Fix remove_const with window functions

Author: Vicențiu Ciorbaru
Author Date: 2021-03-02 15:27:37 UTC

DO NOT PUSH! Fix remove_const with window functions

fk_in_progress 2021-03-07 10:19:44 UTC 2021-03-07
Add referenced table to prelocking list during CREATE TABLE with FK

Author: Nikita Malyavin
Author Date: 2021-03-02 21:16:27 UTC

Add referenced table to prelocking list during CREATE TABLE with FK

10.6-rucha-mdev-8334 2021-03-06 20:08:48 UTC 2021-03-06
fixed collation test

Author: Rucha Deodhar
Author Date: 2021-02-22 13:05:27 UTC

fixed collation test

bb-10.3-MDEV-24730 2021-03-06 00:33:47 UTC 2021-03-06
MDEV-24730 Insert log operation fails after purge resets n_core_fields

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2021-03-06 00:25:14 UTC

MDEV-24730 Insert log operation fails after purge resets n_core_fields

Online log for insert operation of redundant table fails with
index->is_instant() assert. Purge can reset the n_core_fields when
alter is waiting to upgrade MDL for commit phase of DDL. In the
meantime, any insert DML tries to log the operation fails with
index is not being instant.

row_log_get_n_core_fields(): Get the n_core_fields of online log
for the given index.

rec_get_converted_size_comp_prefix_low(): Use n_core_fields of online
log when InnoDB calculates the size of data tuple during redundant
row format table rebuild.

rec_convert_dtuple_to_rec_comp(): Use n_core_fields of online log
when InnoDB does the conversion of data tuple to record during
redudant row format table rebuild.

- Adding the test case which has more than 129 instant columns.

bb-10.6-mdev17399-hf 2021-03-05 20:13:40 UTC 2021-03-05
MDEV-17399 JSON_TABLE.

Author: Alexey Botchkov
Author Date: 2021-03-05 20:13:40 UTC

MDEV-17399 JSON_TABLE.

cur_last_sibling renamed to the last_sibling_hook.

10.3 2021-03-05 12:12:56 UTC 2021-03-05
Fixed that unit.pcre_test works again.

Author: Monty
Author Date: 2021-03-05 12:12:35 UTC

Fixed that unit.pcre_test works again.

10.6-mdev8306 2021-03-05 10:00:21 UTC 2021-03-05
WIP

Author: varun
Author Date: 2021-03-05 10:00:21 UTC

WIP

Checking whether the join cardinality estimates are accurate
should only be done when the order by limit optimization is
enabled.

bb-10.2-galera 2021-03-05 09:54:37 UTC 2021-03-05
MDEV-24923 : Port selected Galera conflict resolution changes from 10.6

Author: Jan Lindström
Author Date: 2021-03-03 10:14:23 UTC

MDEV-24923 : Port selected Galera conflict resolution changes from 10.6

Add condition on trx->state == TRX_STATE_COMMITTED_IN_MEMORY in order to
avoid unnecessary work. If a transaction has already been committed or
rolled back, it will release its locks in lock_release() and let
the waiting thread(s) continue execution.

Let BF wait on lock_rec_has_to_wait and if necessary other BF
is replayed.

bg_wsrep_kill_trx
  Make sure victim_trx is found and check also its state. If
  state is TRX_STATE_COMMITTED_IN_MEMORY we can return.

wsrep_assert_no_bf_bf_wait
  Check both bf trx and conflicting trx state and if one of them
  is TRX_STATE_COMMITTED_IN_MEMORY we can let BF wait for locks
  to be released.

lock_rec_has_to_wait
  We very well can let bf to wait normally as other BF will be
  replayed in case of conflict. For debug builds we will do
  additional sanity checks to catch unsupported bf wait if any.

wsrep_kill_victim
  Check is victim already in TRX_STATE_COMMITTED_IN_MEMORY state and
  if it is we can return.

lock_rec_dequeue_from_page
lock_rec_unlock
  Remove unnecessary wsrep_assert_no_bf_bf_wait function call.
  We can very well let BF wait here.

bb-10.2-MDEV-24978 2021-03-05 09:10:52 UTC 2021-03-05
MDEV-24978 : SIGABRT in __libc_message

Author: Jan Lindström
Author Date: 2021-03-04 12:28:50 UTC

MDEV-24978 : SIGABRT in __libc_message

Keyvalue can be longer than REC_VERSION_56_MAX_INDEX_COL_LEN
and this leads out-of-array reference. Use dynamic memory
allocation using actual max length of key value.

bb-10.4-MDEV-25057 2021-03-05 08:05:29 UTC 2021-03-05
MDEV-25057 Assertion `n_fields < dtuple_get_n_fields(entry)'

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2021-03-05 08:05:29 UTC

MDEV-25057 Assertion `n_fields < dtuple_get_n_fields(entry)'
  failed in dtuple_convert_big_rec

In dtuple_convert_big_rec(), InnoDB fails to consider the
instant metadata blob while choosing the variable length
field.

bb-10.2-wlad 2021-03-04 22:09:22 UTC 2021-03-04
MDEV-22929 fixup. Print "completed OK!" if page corruption and --log-innodb-...

Author: Vladislav Vaintroub
Author Date: 2021-03-04 22:09:22 UTC

MDEV-22929 fixup. Print "completed OK!" if page corruption and --log-innodb-page-corruption

Since we do not stop at corrupted page error, there is no reason to log
a backup error.

bb-10.6-MDEV-24853 2021-03-04 14:41:57 UTC 2021-03-04
MDEV-24853: Duplicate key generated during cluster configuration change

Author: Julius Goryavsky
Author Date: 2021-03-03 15:40:16 UTC

MDEV-24853: Duplicate key generated during cluster configuration change

Incorrect processing of an auto-incrementing field in the
WSREP-related code during applying transactions results in
a duplicate key being created. This is due to the fact that
at the beginning of the write_row() and update_row() functions,
the values of the auto-increment parameters are used, which
are read from the parameters of the current thread, but further
along the code other values are used, which are read from global
variables (when applying a transaction). This can happen when
the cluster configuration has changed while applying a transaction
(for example in the high_priority_service mode for Galera 4).
Further during IST processing duplicating key is detected, and
processing of the DB_DUPLICATE_KEY return code (inside innodb,
in the write_row() handler) results in a call to the
wsrep_thd_self_abort() function.

bb-10.6-MDEV-25029 2021-03-04 13:08:19 UTC 2021-03-04
Merge MDEV-25029 for testing

Author: Marko Mäkelä
Author Date: 2021-03-04 13:08:19 UTC

Merge MDEV-25029 for testing

bb-10.4-MDEV-24916 2021-03-04 12:55:58 UTC 2021-03-04
MDEV-24916 : Assertion `current_stmt_binlog_format == BINLOG_FORMAT_STMT || c...

Author: Jan Lindström
Author Date: 2021-03-02 12:39:25 UTC

MDEV-24916 : Assertion `current_stmt_binlog_format == BINLOG_FORMAT_STMT || current_stmt_binlog_format == BINLOG_FORMAT_ROW' failed in THD::is_current_stmt_binlog_format_row

If inconsistency is introduced using debug_dbug instrumentation
node will drop from cluster and that would close mysql_bin_log.
This assertion is present only in debug builds and we should
make sure that binlog is open if it is called.

bb-10.2-igor 2021-03-04 03:33:04 UTC 2021-03-04
MDEV-21104 Wrong result (extra rows and wrong values) with incremental BNLH

Author: Igor Babaev
Author Date: 2021-03-04 03:33:04 UTC

MDEV-21104 Wrong result (extra rows and wrong values) with incremental BNLH

This bug could affect multi-way join queries with embedded outer joins that
contained a conjunctive IS NULL predicate over a non-nullable column from
inner table of an outer join. The predicate could occur in WHERE condition
or in ON condition. Due to this bug a wrong result set could be returned by
the query. The bug manifested itself only when join buffers were employed
for join operations.

The problem appeared because
- a bug in the function JOIN_CACHE::get_match_flag_by_pos that not always
  returned proper match flags for embedding outer joins stored together
  with table rows put a join buffer.
- bug in the function JOIN_CACHE::join_matching_records that not always
  correctly determined that a row from the buffer could be skipped due
  to applied 'not_exists' optimization.

The patch introduces a new function that finds the match flag for a record
from join buffer specifying the the buffer where this flag has to be found.
The function is called JOIN_CACHE::get_match_flag_by_pos_from_join_buffer().
Now this function rather than JOIN_CACHE::get_match_flag_by_pos() is used
in JOIN_CACHE::skip_if_matched() to check whether a record from the join
buffer must be ignored when extending the record by null complements.
Also the code of the function JOIN_CACHE::skip_if_not_needed_match() has
been changed. The function checks whether a record from the join buffer
still may produce some useful extensions.
Also some clarifying comments has been added.

Approved by monty@mariadb.com.

bb-10.6-sysschema 2021-03-03 17:43:46 UTC 2021-03-03
MDEV-9077 - sys schema

Author: Vladislav Vaintroub
Author Date: 2021-03-03 17:43:46 UTC

MDEV-9077 - sys schema

Babysit Aria engine. Try to avoid random "Zerofilling moved file" messages
coming seemingly from trying to access sys_config table, mostly likely after
bootstrap.

bb-10.3-igor 2021-03-03 17:16:15 UTC 2021-03-03
MDEV-22786 Crashes with nested table value constructors

Author: Igor Babaev
Author Date: 2021-03-03 17:16:15 UTC

MDEV-22786 Crashes with nested table value constructors

The bug caused crashes of the server when processing queries with nested
table value constructors (TVC) . It happened because the grammar rules to
parse TVC used the same global lists for both nested TVC and nesting TVC.
As a result invalid select trees were constructed for queries with nested
TVC and this led to crashes at the prepare stage.
This patch provides its own lists structures for each TVC nest level.

Besides the patch fixes a bug in the function wrap_tvc() that missed
inheritance of the SELECT_LEX::exclude_from_table_unique_test for
selects that wrapped TVCs. This inheritance is critical for specifications
of derived tables that employ nested TVCs.

bb-10.6-MDEV-14180_1 2021-03-03 11:57:31 UTC 2021-03-03
MDEV-14180 Automatically disable key rotation checks for file_key_managment p...

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2021-02-26 11:07:24 UTC

MDEV-14180 Automatically disable key rotation checks for file_key_managment plugin

- InnoDB iterates the fil_system space list to encrypt the
tablespace in case of key rotation.But it is not necessary
for any encryption plugin which doesn't do any key rotation.
InnoDB should avoid key rotation for file key management
encryption plugin.

Introduce new encryption service called encryption_set_no_rotation()
and encryption_get_rotation(). Encryption plugin should
call encryption_set_no_rotation() in case it doesn't
support key rotation. Introduce a new variable called
srv_encrypt_rotate and it should be assigned via
encryption_get_rotation(). If it doesn't do key rotation
then InnoDB should add the tablespace to rotation list.

bb-10.5-for-axel 2021-03-03 10:27:52 UTC 2021-03-03
MDEV-21212 buf_page_get_gen -> buf_pool->stat.n_page_gets++ is a cpu waste (0...

Author: Eugene Kosov
Author Date: 2020-05-19 11:19:20 UTC

MDEV-21212 buf_page_get_gen -> buf_pool->stat.n_page_gets++ is a cpu waste (0.5-1%)

This patch is inspired by wg21.link/P0261

Fix by introducing yet another distributed counter. This one uses
C++11 thread_local specifier to achive a perfect scalability.

In the following benchmark ShardedAtomic is a counter
with 64 shards we use now.

Single thread mode is faster because of a weak atomical semantics of a new
counter. Strong semantics is not needed because only one writer exists for
each counter.

Running ./counter-benchmark
Run on (128 X 200 MHz CPU s)
CPU Caches:
  L1 Data 64 KiB (x128)
  L1 Instruction 64 KiB (x128)
  L2 Unified 512 KiB (x128)
  L3 Unified 65536 KiB (x4)
Load Average: 0.00, 0.13, 0.22
------------------------------------------------------------------------
Benchmark Time CPU Iterations
------------------------------------------------------------------------
BM_SimpleAtomic/threads:1 6.16 ns 6.16 ns 113705842
BM_SimpleAtomic/threads:2 8.17 ns 16.3 ns 42821142
BM_SimpleAtomic/threads:4 21.6 ns 86.5 ns 12652320
BM_SimpleAtomic/threads:8 33.3 ns 266 ns 2148016
BM_SimpleAtomic/threads:16 133 ns 2130 ns 487520
BM_SimpleAtomic/threads:32 124 ns 3952 ns 217344
BM_SimpleAtomic/threads:64 157 ns 10026 ns 64000
BM_SimpleAtomic/threads:128 94.6 ns 12102 ns 128000
BM_SimpleAtomic/threads:256 60.4 ns 15446 ns 256000
BM_SimpleAtomic/threads:512 26.8 ns 13714 ns 512000
BM_SimpleAtomic/threads:1024 14.5 ns 14889 ns 102400
BM_SimpleAtomic/threads:2048 5.65 ns 11566 ns 204800
BM_ShardedAtomic/threads:1 6.16 ns 6.16 ns 113679824
BM_ShardedAtomic/threads:2 3.08 ns 6.16 ns 113721534
BM_ShardedAtomic/threads:4 1.54 ns 6.16 ns 113711620
BM_ShardedAtomic/threads:8 0.769 ns 6.16 ns 113712616
BM_ShardedAtomic/threads:16 0.385 ns 6.16 ns 113628336
BM_ShardedAtomic/threads:32 0.192 ns 6.16 ns 113594432
BM_ShardedAtomic/threads:64 0.228 ns 14.6 ns 52447616
BM_ShardedAtomic/threads:128 0.195 ns 25.0 ns 30016768
BM_ShardedAtomic/threads:256 0.179 ns 45.8 ns 25600000
BM_ShardedAtomic/threads:512 0.122 ns 62.6 ns 58018304
BM_ShardedAtomic/threads:1024 0.073 ns 74.9 ns 10240000
BM_ShardedAtomic/threads:2048 0.054 ns 110 ns 20480000
BM_TlsCounter/threads:1 2.71 ns 2.71 ns 259471815
BM_TlsCounter/threads:2 1.35 ns 2.69 ns 255314508
BM_TlsCounter/threads:4 0.674 ns 2.70 ns 259838580
BM_TlsCounter/threads:8 0.337 ns 2.69 ns 259870616
BM_TlsCounter/threads:16 0.169 ns 2.71 ns 257862656
BM_TlsCounter/threads:32 0.084 ns 2.70 ns 259839840
BM_TlsCounter/threads:64 0.043 ns 2.72 ns 257231104
BM_TlsCounter/threads:128 0.021 ns 2.70 ns 258558848
BM_TlsCounter/threads:256 0.011 ns 2.70 ns 257301248
BM_TlsCounter/threads:512 0.005 ns 2.71 ns 257305088
BM_TlsCounter/threads:1024 0.003 ns 2.72 ns 246151168
BM_TlsCounter/threads:2048 0.001 ns 2.74 ns 235972608

Several counters were translated to a new one because I suppose
they could be slow.

bb-10.5-kevgs 2021-03-02 18:07:47 UTC 2021-03-02
MDEV-21212 buf_page_get_gen -> buf_pool->stat.n_page_gets++ is a cpu waste (0...

Author: Eugene Kosov
Author Date: 2020-05-19 11:19:20 UTC

MDEV-21212 buf_page_get_gen -> buf_pool->stat.n_page_gets++ is a cpu waste (0.5-1%)

This patch is inspired by wg21.link/P0261

Fix by introducing yet another distributed counter. This one uses
C++11 thread_local specifier to achive a perfect scalability.

In the following benchmark ShardedAtomic is a counter
with 64 shards we use now.

Single thread mode is faster because of a weak atomical semantics of a new
counter. Strong semantics is not needed because only one writer exists for
each counter.

Running ./counter-benchmark
Run on (128 X 200 MHz CPU s)
CPU Caches:
  L1 Data 64 KiB (x128)
  L1 Instruction 64 KiB (x128)
  L2 Unified 512 KiB (x128)
  L3 Unified 65536 KiB (x4)
Load Average: 0.00, 0.13, 0.22
------------------------------------------------------------------------
Benchmark Time CPU Iterations
------------------------------------------------------------------------
BM_SimpleAtomic/threads:1 6.16 ns 6.16 ns 113705842
BM_SimpleAtomic/threads:2 8.17 ns 16.3 ns 42821142
BM_SimpleAtomic/threads:4 21.6 ns 86.5 ns 12652320
BM_SimpleAtomic/threads:8 33.3 ns 266 ns 2148016
BM_SimpleAtomic/threads:16 133 ns 2130 ns 487520
BM_SimpleAtomic/threads:32 124 ns 3952 ns 217344
BM_SimpleAtomic/threads:64 157 ns 10026 ns 64000
BM_SimpleAtomic/threads:128 94.6 ns 12102 ns 128000
BM_SimpleAtomic/threads:256 60.4 ns 15446 ns 256000
BM_SimpleAtomic/threads:512 26.8 ns 13714 ns 512000
BM_SimpleAtomic/threads:1024 14.5 ns 14889 ns 102400
BM_SimpleAtomic/threads:2048 5.65 ns 11566 ns 204800
BM_ShardedAtomic/threads:1 6.16 ns 6.16 ns 113679824
BM_ShardedAtomic/threads:2 3.08 ns 6.16 ns 113721534
BM_ShardedAtomic/threads:4 1.54 ns 6.16 ns 113711620
BM_ShardedAtomic/threads:8 0.769 ns 6.16 ns 113712616
BM_ShardedAtomic/threads:16 0.385 ns 6.16 ns 113628336
BM_ShardedAtomic/threads:32 0.192 ns 6.16 ns 113594432
BM_ShardedAtomic/threads:64 0.228 ns 14.6 ns 52447616
BM_ShardedAtomic/threads:128 0.195 ns 25.0 ns 30016768
BM_ShardedAtomic/threads:256 0.179 ns 45.8 ns 25600000
BM_ShardedAtomic/threads:512 0.122 ns 62.6 ns 58018304
BM_ShardedAtomic/threads:1024 0.073 ns 74.9 ns 10240000
BM_ShardedAtomic/threads:2048 0.054 ns 110 ns 20480000
BM_TlsCounter/threads:1 2.71 ns 2.71 ns 259471815
BM_TlsCounter/threads:2 1.35 ns 2.69 ns 255314508
BM_TlsCounter/threads:4 0.674 ns 2.70 ns 259838580
BM_TlsCounter/threads:8 0.337 ns 2.69 ns 259870616
BM_TlsCounter/threads:16 0.169 ns 2.71 ns 257862656
BM_TlsCounter/threads:32 0.084 ns 2.70 ns 259839840
BM_TlsCounter/threads:64 0.043 ns 2.72 ns 257231104
BM_TlsCounter/threads:128 0.021 ns 2.70 ns 258558848
BM_TlsCounter/threads:256 0.011 ns 2.70 ns 257301248
BM_TlsCounter/threads:512 0.005 ns 2.71 ns 257305088
BM_TlsCounter/threads:1024 0.003 ns 2.72 ns 246151168
BM_TlsCounter/threads:2048 0.001 ns 2.74 ns 235972608

Several counters were translated to a new one because I suppose
they could be slow.

bb-10.6-uring 2021-03-02 17:26:53 UTC 2021-03-02
MDEV-24883 add io_uring support for tpool

Author: Eugene
Author Date: 2021-02-12 12:26:46 UTC

MDEV-24883 add io_uring support for tpool

liburing is a new optional dependency

aio_uring: class which wraps io_uring stuff

aio_uring::bind()/unbind(): optional optimization

aio_uring::submit_io(): mutex prevents data race. liburing calls are
thread-unsafe. But if you look into it's implementation you'll see
atomic operations. They're used for synchronization between kernel and
user-space only. That's why our own synchronization is still needed.

Don't link with Linux AIO when liburing is used.

bb-10.5-anel-MDEV-24601-IS.table_field_constraints 2021-03-02 17:23:44 UTC 2021-03-02
MDEV-24601 INFORMATION_SCHEMA doesn't differentiate between column- and table...

Author: Anel Husakovic
Author Date: 2021-03-02 17:23:44 UTC

MDEV-24601 INFORMATION_SCHEMA doesn't differentiate between column- and table-level CHECK constraints

bb-10.2-vicentiu 2021-03-02 14:23:25 UTC 2021-03-02
MDEV-25032: Window functions without column references get removed from ORDER BY

Author: Vicențiu Ciorbaru
Author Date: 2021-03-02 13:37:12 UTC

MDEV-25032: Window functions without column references get removed from ORDER BY

row_number() over () window function can be used without any column in the OVER
clause. Additionally, the item doesn't reference any tables, as it's not
effectively referencing any table. Rather it is specifically built based
on the end temporary table used for window function computation.

This caused remove_const function to wrongly drop it from the ORDER
list. Effectively, we shouldn't be dropping any window function from the
ORDER clause, so adjust remove_const to account for that.

bb-10.5-thiru 2021-03-02 14:18:21 UTC 2021-03-02
MDEV-24863 AHI entries mismatch with the index while reloading the evicted ta...

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2021-02-25 15:21:30 UTC

MDEV-24863 AHI entries mismatch with the index while reloading the evicted tables.

In btr_search_drop_page_hash_index(), InnoDB should take
the exclusive lock on the AHI latch if index is already
freed to avoid the freed memory access during
buf_pool_resize()

bb-10.6-midenok 2021-03-02 10:41:31 UTC 2021-03-02
MDEV-16546 Replication of history modification

Author: midenok
Author Date: 2021-03-01 14:38:11 UTC

MDEV-16546 Replication of history modification

4. Replication of force_fields_visible via option_bits in
OPTIONS_WRITTEN_TO_BIN_LOG.

bb-10.4-thiru 2021-03-02 10:15:23 UTC 2021-03-02
MDEV-20648 InnoDB: Failing assertion: !(*node)->being_extended, innodb.log_da...

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2021-03-02 10:15:23 UTC

MDEV-20648 InnoDB: Failing assertion: !(*node)->being_extended, innodb.log_data_file_size failed in buildbot, assertion `!space->is_stopping()'

InnoDB should check whether the tablespace is being deleted
during extension of tablespace.

bb-10.5-anel-MDEV-24602-check_constraints 2021-03-02 09:54:10 UTC 2021-03-02
MDEV-24598: duplicate CHECK constraint name

Author: Anel Husakovic
Author Date: 2021-03-01 14:13:51 UTC

MDEV-24598: duplicate CHECK constraint name

- Problematic test case:
```
innodb.foreign_key
```

bb-10.1-anel-MDEV-13467-gis-feature-st_sphere-v2 2021-03-02 08:52:38 UTC 2021-03-02
MDEV-13467: Feature request: Support for ST_Distance_Sphere()

Author: Anel Husakovic
Author Date: 2020-10-29 00:40:31 UTC

MDEV-13467: Feature request: Support for ST_Distance_Sphere()

- Cherry-pick 51e48b9f8981 - vscode gitignore
- Thanks Robin Dupret for the review.

Reviewed by:daniel@mariadb.org

fk_list_span 2021-03-01 21:15:50 UTC 2021-03-01
FK_list: change foreign_fields/referenced_fields from List to st_::span

Author: Nikita Malyavin
Author Date: 2021-03-01 21:15:50 UTC

FK_list: change foreign_fields/referenced_fields from List to st_::span

bb-10.5-serg 2021-03-01 15:53:09 UTC 2021-03-01
MDEV-24858 SIGABRT in DbugExit from my_malloc in Query_cache::init_cache Regr...

Author: Sergei Golubchik
Author Date: 2021-03-01 15:53:09 UTC

MDEV-24858 SIGABRT in DbugExit from my_malloc in Query_cache::init_cache Regression

disable warnings, as they're different on 32bit platforms

bb-10.3-monty 2021-03-01 15:51:44 UTC 2021-03-01
Fixed unit test to not 'bail out' if some tests are not compiled.

Author: Monty
Author Date: 2021-03-01 15:51:44 UTC

Fixed unit test to not 'bail out' if some tests are not compiled.

Before the changes two things could happen:
- "path required name explain_filename path" error
- unit test never finishead (as it tried to execute just /bin/sh as
  a test case)

bb-10.2-MDEV-24719-last-skipped-lsn-check 2021-03-01 13:44:14 UTC 2021-03-01
MDEV-24719 backport MDEV-24705 from 10.5 to 10.2, 10.3, 10.4

Author: Vlad Lesin
Author Date: 2021-03-01 13:44:14 UTC

MDEV-24719 backport MDEV-24705 from 10.5 to 10.2, 10.3, 10.4

Do not mark page as modified if log mode is MTR_LOG_ALL. Set log mode to
MTR_LOG_NO_REDO instead of MTR_LOG_ALL for the cases when pages must be
marked as modified but no log records are written for them.

bb-10.6-MDEV-20715 2021-03-01 13:21:31 UTC 2021-03-01
MDEV-20715 : Implement system variable to disallow local GTIDs in Galera

Author: Jan Lindström
Author Date: 2021-03-01 13:21:31 UTC

MDEV-20715 : Implement system variable to disallow local GTIDs in Galera

Added a new wsrep_mode feature DISALLOW_LOCAL_GTID for this.
Nodes can have GTIDs for local transactions in the following scenarios:

A DDL statement is executed with wsrep_OSU_method=RSU set.
A DML statement writes to a non-InnoDB table.
A DML statement writes to an InnoDB table with wsrep_on=OFF set.

If user has set wsrep_mode=DISALLOW_LOCAL_GTID these operations
produce a error ERROR HY000: Galera replication not supported

bb-10.2-MDEV-25006 2021-03-01 06:25:50 UTC 2021-03-01
MDEV-25006: Failed assertion on executing EXPLAIN DELETE statement as a prepa...

Author: Dmitry Shulga
Author Date: 2021-03-01 06:25:50 UTC

MDEV-25006: Failed assertion on executing EXPLAIN DELETE statement as a prepared statement

Attempt to execute EXPLAIN statement on multi-table DELETE statement
leads to firing firing of the assertion
  DBUG_ASSERT(! is_set());
in the method Diagnostics_area::set_eof_status.

For example, above mentioned assertion failure happens
in case any of the following statements
  EXPLAIN DELETE FROM t1.* USING t1
  EXPLAIN DELETE b FROM t1 AS a JOIN t1 AS b
are executed in prepared statement mode provided the table t1
does exist.

This assertion is hit by the reason that a status of
Diagnostics_area is set twice. The first time it is set from
the function do_select() when the method multi_delete::send_eof()
called. The second time it is set when the method
Explain_query::send_explain() calls the method select_send::send_eof
(this method invokes the method Diagnostics_area::set_eof_status that
finally hits assertion)

The second invocation for a setter method of the class Diagnostics_area
is correct and run to send a response containing explain data.

But first invocation of a setter method of the class Diagnostics_area
is wrong since the function do_select() shouldn't be called at all
for handling of the EXPLAIN statement.

The reason by that the function do_select() is called during handling of
the EXPLAIN statement is that the flag SELECT_DESCRIBE not set in the
data member JOIN::select_options. The flag SELECT_DESCRIBE
if is copied from values select_lex->options.

During parsing of EXPLAIN statement this flag is set but latter reset
from the function reinit_stmt_before_use() that is called on
execution of prepared statement.
  void reinit_stmt_before_use(THD *thd, LEX *lex)
  {
    ...
    for (; sl; sl= sl->next_select_in_list())
    {
      if (sl->changed_elements & TOUCHED_SEL_COND)
      {
        /* remove option which was put by mysql_explain_union() */
        sl->options&= ~SELECT_DESCRIBE;
      ...
      }
   ...
  }

So, to fix the issue the flag SELECT_DESCRIBE is set forcibly at the
mysql_select() function in case thd->lex->describe set,
that is in case EXPLAIN being executed.

bb-10.2-varun 2021-02-27 07:23:13 UTC 2021-02-27
MDEV-24519: Server crashes in Charset::set_charset upon SELECT

Author: varun
Author Date: 2021-02-27 06:45:39 UTC

MDEV-24519: Server crashes in Charset::set_charset upon SELECT

Introduced a parameter null_value_inside to Item_cache that
would store be set to TRUE if any of the arguments of the
Item_cache are null.

bb-10.6-sachin 2021-02-26 12:25:12 UTC 2021-02-26
MDEV-7409 On RBR, extend the PROCESSLIST info to include at least the name of...

Author: Sachin Setiya
Author Date: 2021-02-21 09:30:20 UTC

MDEV-7409 On RBR, extend the PROCESSLIST info to include at least the name of the recently used table

When RBR is used, add the db name to db Field and table name to Status
Field of the "SHOW FULL PROCESSLIST" command for SQL thread.

10.6-mdev7317 2021-02-26 09:40:16 UTC 2021-02-26
Updating test results

Author: varun
Author Date: 2021-02-26 05:01:24 UTC

Updating test results

10.5-mdev7317 2021-02-25 14:11:26 UTC 2021-02-25
review addressal

Author: varun
Author Date: 2021-02-25 11:17:21 UTC

review addressal

bb-10.2-danielblack-MDEV-23510-arm-lfhash 2021-02-25 03:57:29 UTC 2021-02-25
MDEV-23510: lf_dynarray_lvalue to return aligned address

Author: Daniel Black
Author Date: 2021-02-17 05:12:06 UTC

MDEV-23510: lf_dynarray_lvalue to return aligned address

Aligned to sizeof(void *).

This ensures that arm64 use of lf_hash remains stable.

Remove abuse of volatile in maria/lockman because it wasn't
necessary or advisable.

10.6-order_by_limit 2021-02-25 02:40:03 UTC 2021-02-25
Attempt to have sort-nest as a bush

Author: varun
Author Date: 2021-02-25 02:34:35 UTC

Attempt to have sort-nest as a bush

10.6-limit 2021-02-25 02:40:03 UTC 2021-02-25
Attempt to have sort-nest as a bush

Author: varun
Author Date: 2021-02-25 02:34:35 UTC

Attempt to have sort-nest as a bush

bb-10.2-anel-MDEV-6899-show-event-mysqldump-v2 2021-02-24 20:36:24 UTC 2021-02-24
MDEV-6899:Database Dump has Syntax Error When Importing

Author: Anel Husakovic
Author Date: 2021-02-24 11:48:10 UTC

MDEV-6899:Database Dump has Syntax Error When Importing

- Adding the test case for MDEV-24200: Syntax error in mysqldump

bb-10.6-MDEV-24946 2021-02-24 12:28:25 UTC 2021-02-24
MENT-411 : Implement wsrep_replicate_aria

Author: Jan Lindström
Author Date: 2020-11-03 08:44:26 UTC

MENT-411 : Implement wsrep_replicate_aria

Introduced two new wsrep_mode options
* REPLICATE_MYISAM
* REPLICATE_ARIA

Depracated wsrep_replicate_myisam parameter and we use
wsrep_mode = REPLICATE_MYISAM instead.

This required small refactoring of wsrep_check_mode_after_open_table
so that both MyISAM and Aria are handled on required DML cases.
Similarly, added Aria to wsrep_should_replicate_ddl to handle DDL
for Aria tables using TOI. Added test cases and improved MyISAM testing.
Changed use of wsrep_replicate_myisam to wsrep_mode = REPLICATE_MYISAM

bb-10.4-MDEV-24964 2021-02-24 10:02:54 UTC 2021-02-24
MDEV-24964 : Heap-buffer-overflow on wsrep_schema.cc ::remove_fragments

Author: Jan Lindström
Author Date: 2021-02-24 10:02:54 UTC

MDEV-24964 : Heap-buffer-overflow on wsrep_schema.cc ::remove_fragments

Problem was that we used heap allocated key using too small
array. Fixed by using dynamic memory allocation using actual
needed size.

bb-10.5-mdev24953 2021-02-23 20:38:57 UTC 2021-02-23
MDEV-24953: 10.5.9 crashes with large IN() list

Author: Sergey Petrunia
Author Date: 2021-02-23 20:38:57 UTC

MDEV-24953: 10.5.9 crashes with large IN() list

The problem was in and_all_keys(), the code of MDEV-9759 which calculates
the new tree weight:

First, it didn't take into account the case when

(next->next_key_part=tmp) == NULL

and dereferenced a NULL pointer when getting tmp->weight.

Second, "if (param->alloced_sel_args > SEL_ARG::MAX_SEL_ARGS) break"
could leave the loop with incorrect value of weight.

Fixed by introducing SEL_ARG::update_weight_locally() and calling it
at the end of the function. This allows to avoid caring about all the
above cases.

bb-10.5-release 2021-02-23 12:06:22 UTC 2021-02-23
Merge branch '10.4' into 10.5

Author: Sergei Golubchik
Author Date: 2021-02-23 12:01:27 UTC

Merge branch '10.4' into 10.5

bb-10.2-alice 2021-02-22 14:44:40 UTC 2021-02-22
reenable partition_open_files_limit.test, as MDEV-18360 is fixed

Author: Larysa Sherepa
Author Date: 2021-02-22 14:44:40 UTC

reenable partition_open_files_limit.test, as MDEV-18360 is fixed

bb-10.2.36-MDEV-24449-MDEV-24709 2021-02-22 14:07:42 UTC 2021-02-22
MDEV-24709 Assertion !recv_no_ibuf_operations failed in ibuf_page_low()

Author: Marko Mäkelä
Author Date: 2021-01-27 14:43:29 UTC

MDEV-24709 Assertion !recv_no_ibuf_operations failed in ibuf_page_low()

recv_recovery_from_checkpoint_start(): Clear the recv_no_ibuf_operations
flag at the same time when we enabled writes to the log.

The failure to clear the flag might have caused some missed
change buffer merges, at least to the secondary index of SYS_TABLES
that were accessed by trx_resurrect_table_locks() while the last
recovery batch was in progress.

Thanks to Thirunarayanan Balathandayuthapani for suggesting this fix.

bb-10.6-MDEV-24830 2021-02-22 11:51:58 UTC 2021-02-22
MDEV-24830 : Write a warning to error log if Galera replicates InnoDB table w...

Author: Jan Lindström
Author Date: 2021-02-10 07:53:37 UTC

MDEV-24830 : Write a warning to error log if Galera replicates InnoDB table with no primary key

Two new features for Galera
* Write a warning to error log if Galera replicates table with storage engine not supported by Galera (at the moment only InnoDB is supported
** Warning is pushed to client also
** MyISAM is allowed if wsrep_replicate_myisam=ON
* Write a warning to error log if Galera replicates table with no primary key
** Warning is pushed to client also
** MyISAM is allowed if wsrep_relicate_myisam=ON
* In both cases apply flood control if > 10 same warning is writen to error log
(requires log_warnings > 1), flood control will suppress warnings for 300 seconds

bb-10.5-danielblack-MDEV-23510-arm-lfhash 2021-02-21 08:31:23 UTC 2021-02-21
innodb/extrabackup: use global my_{[cm]alloc,free}_aligned

Author: Daniel Black
Author Date: 2021-02-17 05:15:19 UTC

innodb/extrabackup: use global my_{[cm]alloc,free}_aligned

Add error handling to most of the mariabackup/innodb
paths to handle failure to allocate memory.

bb-10.6-MDEV-16983-period-fk 2021-02-19 17:49:02 UTC 2021-02-19
Period: add versioning combination

Author: Nikita Malyavin
Author Date: 2020-01-21 09:48:47 UTC

Period: add versioning combination

raw-10.6-MDEV-16983-period-fk 2021-02-19 17:45:55 UTC 2021-02-19
Period: add versioning combination

Author: Nikita Malyavin
Author Date: 2020-01-21 09:48:47 UTC

Period: add versioning combination

bb-10.4-release 2021-02-18 23:19:42 UTC 2021-02-18
Merge branch 'bb-10.3-release' into bb-10.4-release

Author: Sergei Golubchik
Author Date: 2021-02-18 22:17:50 UTC

Merge branch 'bb-10.3-release' into bb-10.4-release

bb-10.3-release 2021-02-18 21:09:53 UTC 2021-02-18
Merge branch 'bb-10.2-release' into bb-10.3-release

Author: Sergei Golubchik
Author Date: 2021-02-18 21:09:53 UTC

Merge branch 'bb-10.2-release' into bb-10.3-release

bb-10.2-release 2021-02-18 18:03:01 UTC 2021-02-18
make @@wsrep_provider and @@wsrep_notify_cmd read-only

Author: Sergei Golubchik
Author Date: 2021-02-18 13:20:48 UTC

make @@wsrep_provider and @@wsrep_notify_cmd read-only

this should simplify run-time cluster management

bb-10.5-MDEV-24917 2021-02-18 16:20:50 UTC 2021-02-18
MDEV-24917 Page cleaner wrongly remains idle

Author: Marko Mäkelä
Author Date: 2021-02-18 16:20:50 UTC

MDEV-24917 Page cleaner wrongly remains idle

commit a9933105938d4d809ea33ac3196e681cd581374f (MDEV-24537)
introduced the regression that the page cleaner will keep sleeping
even if there is work to do.

innodb_max_dirty_pages_pct_update(): Always wake up the page cleaner
on any SET GLOBAL innodb_max_dirty_pages_pct= assignment.

buf_flush_page_cleaner(): If innodb_max_dirty_pages_pct is nonzero,
consult only that parameter when determining whether there is work
to do. Else, consult innodb_max_dirty_pages.

bb-10.6-MDEV-24312 2021-02-18 15:00:32 UTC 2021-02-18
MDEV-24312 Server audit fix of master_host has 60 character limit, increase t...

Author: Oleksandr "Sanja" Byelkin
Author Date: 2020-11-25 16:22:45 UTC

MDEV-24312 Server audit fix of master_host has 60 character limit, increase to 255 bytes

Based on Alexey Botchkov <holyfoot@askmonty.org>

bb-10.6-release 2021-02-17 17:39:05 UTC 2021-02-17
Merge 10.5 into 10.6

Author: Marko Mäkelä
Author Date: 2021-02-17 17:39:05 UTC

Merge 10.5 into 10.6

bb-10.2-MDEV-22110-dont-log-unmodified-pages 2021-02-17 14:38:18 UTC 2021-02-17
MDEV-22110 InnoDB unnecessarily writes unmodified pages

Author: Vlad Lesin
Author Date: 2021-02-09 08:07:52 UTC

MDEV-22110 InnoDB unnecessarily writes unmodified pages

This is backport from 10.5. Strictly speaking this is not a backport because
in 10.5 all the code which writes to mtr was moved to mtr_t class,
and the corresponding mtr_t functions have block_t parameter,
and that is why it's quite easy to mark the block as modified for mtr
in 10.5, it's enough just to call the correcponding function from the
corredponding mtr_t functions, which modify the block.

In 10.2 the code which writes in mtr_t is spread among the code base,
and that is why we can't backport MDEV-22110 as is. The common idea is
to find all mlog_write_initial_log_record_fast() and
mlog_write_initial_log_record_low() calls, and mark blocks as modified
there. We can't do this inside of mlog_write_initial_log_record_fast()
or mlog_write_initial_log_record_low() because when log mode is
MTR_LOG_NONE or MTR_LOG_NO_REDO, the functions are not invoked(see also
mlog_open() and it's invocation).

The downside of such approach is performace impact due to frequent
mtr_t::memo_modify_page() calls from mlog_write_*() and mlog_log_string()
functions.

bb-10.6-robert 2021-02-17 14:30:50 UTC 2021-02-17
MDEV-24887 Tests fail on macos because mysqltest can't use nonblock API

Author: Robert Bindar
Author Date: 2021-02-17 14:30:50 UTC

MDEV-24887 Tests fail on macos because mysqltest can't use nonblock API

bb-10.6-monty 2021-02-17 10:23:54 UTC 2021-02-17
Remove some usage of Check_level_instant_set and Sql_mode_save

Author: Monty
Author Date: 2021-01-30 12:03:23 UTC

Remove some usage of Check_level_instant_set and Sql_mode_save

The reason for the removal are:
- Generates more code
  - Storing and retreving THD
  - Causes extra code and daata to be generated to handle possible throw
    exceptions (which never happens in MariaDB code)
- Uses more stack space

Other things:
- Changed convert_const_to_int() to use item->save_in_field_no_warnings(),
  which made the code shorter and simpler.
- Removed not needed code in Sp_handler::sp_create_routine()
- Added thd as argument to store_key.copy() to make function simpler
- Added thd as argument to some subselect* constructor that inherites
  from Item_subselect.

bb-10.2-MDEV-21039 2021-02-17 04:13:49 UTC 2021-02-17
MDEV-21039: Server fails to start with unknown mysqld_safe options

Author: Julius Goryavsky
Author Date: 2021-02-17 03:45:53 UTC

MDEV-21039: Server fails to start with unknown mysqld_safe options

Adding any unknown option to the "[mysqld_safe]" section makes
mysqld impossible to start with mysqld_multi. For example, after
adding the unknown option "numa_interleave" to the "[mysqld_safe]"
section, mysqld_multi exits with the following diagnostics:

[ERROR] /usr/local/mysql/bin/mysqld: unknown option '--numa_interleave'

To get rid of this behavior, this patch adds the passing of the default
group suffix from mysqld_multi to the mysqld_safe side.

10.6-halfmerge 2021-02-16 13:56:59 UTC 2021-02-16
Merge branch 'bb-10.5-release' into bb-10.6-release

Author: Oleksandr "Sanja" Byelkin
Author Date: 2021-02-16 13:56:59 UTC

Merge branch 'bb-10.5-release' into bb-10.6-release

bb-10.4-MDEV-24865 2021-02-16 06:46:14 UTC 2021-02-16
MDEV-24865 : Server crashes when truncate mysql user table

Author: Jan Lindström
Author Date: 2021-02-16 06:46:14 UTC

MDEV-24865 : Server crashes when truncate mysql user table

For truncate we try to find out possible foreign key tables
using open_tables. However, table_list was not cleaned up
properly and there was no error handling. Fixed by cleaning
table_list and adding proper error handling.

bb-10.6-MDEV-24860 2021-02-15 13:14:11 UTC 2021-02-15
MDEV-24860: Incorrect behaviour of SET STATEMENT in case it is executed as a ...

Author: Dmitry Shulga
Author Date: 2021-02-15 13:14:11 UTC

MDEV-24860: Incorrect behaviour of SET STATEMENT in case it is executed as a prepared statement

Running statements with SET STATEMENT FOR clause is handled incorrectly in
case the whole statement is executed in prepared statement mode.
For example, execution the following statement
  SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT CONCAT('abc') AS c1;
results in different definition of the table t1 depending on whether
the statement is executed as a prepared or as a regular statement.

In first case the column c1 is defined as
  `c1` varchar(3) DEFAULT NULL
in the last case the column c1 is defined as
  `c1` varchar(3) NOT NULL

Different definition for the column c1 arise due to the fact that
a value of the data memeber Item_func_concat::maybe_null depends on
whether strict mode is on or off. Below is definition of the method
fix_fields() of the class Item_str_func that is base class for the
class Item_func_concat that is created on parsing the
SET STATEMENT FOR clause.

bool Item_str_func::fix_fields(THD *thd, Item **ref)
{
  bool res= Item_func::fix_fields(thd, ref);
  /*
    In Item_str_func::check_well_formed_result() we may set null_value
    flag on the same condition as in test() below.
  */
  maybe_null= maybe_null || thd->is_strict_mode();
  return res;
}

Although the clause SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
is parsed on PREPARE phase during processing of the prepared statement,
real setting of the sql_mode system variable is done on EXECUTION phase.
On the other hand, the method Item_str_func::fix_fields is called on PREPARE
phase. In result, thd->is_strict_mode() returns true during calling the method
Item_str_func::fix_fields(), the data member maybe_null is assigned the value
true and column c1 is defined as DEFAULT NULL.

To fix the issue the system variables listed in the SET STATEMENT FOR clause
are set at the beginning of handling the PREPARE phase just right before
calling the function check_prepared_statement() and their original values
restored immediate after return from this function.

Additionally, to avoid code duplication the source code used in the function
mysql_execute_command for setting variables, specified by SET STATEMENT
clause, were extracted to the standalone functions
run_set_statement_if_requested(). This new function is called from
the function mysql_execute_command() and the method
Prepared_statement::prepare().

bb-10.2-MDEV-24860 2021-02-15 13:04:12 UTC 2021-02-15
MDEV-24860: Incorrect behaviour of SET STATEMENT in case it is executed as a ...

Author: Dmitry Shulga
Author Date: 2021-02-15 13:04:12 UTC

MDEV-24860: Incorrect behaviour of SET STATEMENT in case it is executed as a prepared statement

Running statements with SET STATEMENT FOR clause is handled incorrectly in
case the whole statement is executed in prepared statement mode.
For example, execution the following statement
  SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT CONCAT('abc') AS c1;
results in different definition of the table t1 depending on whether
the statement is executed as a prepared or as a regular statement.

In first case the column c1 is defined as
  `c1` varchar(3) DEFAULT NULL
in the last case the column c1 is defined as
  `c1` varchar(3) NOT NULL

Different definition for the column c1 arise due to the fact that
a value of the data memeber Item_func_concat::maybe_null depends on
whether strict mode is on or off. Below is definition of the method
fix_fields() of the class Item_str_func that is base class for the
class Item_func_concat that is created on parsing the
SET STATEMENT FOR clause.

bool Item_str_func::fix_fields(THD *thd, Item **ref)
{
  bool res= Item_func::fix_fields(thd, ref);
  /*
    In Item_str_func::check_well_formed_result() we may set null_value
    flag on the same condition as in test() below.
  */
  maybe_null= maybe_null || thd->is_strict_mode();
  return res;
}

Although the clause SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
is parsed on PREPARE phase during processing of the prepared statement,
real setting of the sql_mode system variable is done on EXECUTION phase.
On the other hand, the method Item_str_func::fix_fields is called on PREPARE
phase. In result, thd->is_strict_mode() returns true during calling the method
Item_str_func::fix_fields(), the data member maybe_null is assigned the value
true and column c1 is defined as DEFAULT NULL.

To fix the issue the system variables listed in the SET STATEMENT FOR clause
are set at the beginning of handling the PREPARE phase just right before
calling the function check_prepared_statement() and their original values
restored immediate after return from this function.

Additionally, to avoid code duplication the source code used in the function
mysql_execute_command for setting variables, specified by SET STATEMENT
clause, were extracted to the standalone functions
run_set_statement_if_requested(). This new function is called from
the function mysql_execute_command() and the method
Prepared_statement::prepare().

bb-10.3-danielblack-MDEV-23510-arm-lfhash 2021-02-15 09:27:20 UTC 2021-02-15
MDEV-23510: arm64 lf_hash

Author: Daniel Black
Author Date: 2021-02-15 01:31:31 UTC

MDEV-23510: arm64 lf_hash

volatile has no memory barrier schemantics, its for mmaped IO
so lets allow some optimizer gains and stop pretending it helps
with memory atomicity.

The MDEV lists a SEGV an assumption is made that an address was
partially read. As C packs structs strictly and on arm64 the
cache line size is 128, move the 32bit hashnr to the end so
we don't get the *key pointer split across two cache lines.

bb-10.5-MDEV-24864 2021-02-15 07:37:01 UTC 2021-02-15
MDEV-24864 Fatal error in buf_page_get_low() / fseg_page_is_free()

Author: Marko Mäkelä
Author Date: 2021-02-15 07:37:01 UTC

MDEV-24864 Fatal error in buf_page_get_low() / fseg_page_is_free()

The fix of MDEV-24569 and MDEV-24695 introduced a race condition when
a table is being rebuilt or dropped during the fseg_page_is_free() check.
The server would occasionally crash during the execution of the test
encryption.create_or_replace.

The fil_space_t::STOPPING flag can be set by DDL operations. Normally,
such concurrent operations are prevented by a metadata lock (MDL).
However, neither the change buffer merge nor the fil_crypt_thread() are
protected by MDL.

fil_crypt_read_crypt_data(), xdes_get_descriptor_const(): Pass the
BUF_GET_POSSIBLY_FREED flag to avoid the fatal error in buf_page_get_low()
if a DDL operation was just initiated.

bb-10.3-midenok 2021-02-14 20:26:12 UTC 2021-02-14
MDEV-22562 Assertion `next_insert_id == 0' upon UPDATE on system-versioned table

Author: midenok
Author Date: 2021-02-14 20:26:12 UTC

MDEV-22562 Assertion `next_insert_id == 0' upon UPDATE on system-versioned table

Don't update autoinc counter on history row insert. Uniqueness is kept
due to merge with row_end.

bb-10.6-wlad 2021-02-14 17:30:39 UTC 2021-02-14
MDEV-24341 Innodb - do not block in foreground thread in log_write_up_to(

Author: Vladislav Vaintroub
Author Date: 2021-02-14 17:30:39 UTC

MDEV-24341 Innodb - do not block in foreground thread in log_write_up_to(

bb-10.5-andrei 2021-02-12 20:47:15 UTC 2021-02-12
Followup to binlog_optimize_thread_scheduling := OFF that

Author: Andrei Elkin
Author Date: 2021-02-12 20:47:15 UTC

Followup to binlog_optimize_thread_scheduling := OFF that

now also simulates no explicit engine prepare().

bb-10.6-MDEV-8334 2021-02-12 15:44:58 UTC 2021-02-12
MDEV-24643: Assertion failed in rw_lock::update_unlock()

Author: Marko Mäkelä
Author Date: 2021-02-12 15:43:10 UTC

MDEV-24643: Assertion failed in rw_lock::update_unlock()

mtr_defer_drop_ahi(): Upgrade the U lock to X lock and downgrade
it back to U lock in case the adaptive hash index needs to be dropped.

This regression was introduced in
commit 03ca6495df31313c96e38834b9a235245e2ae2a8 (MDEV-24142).

10.2-MDEV-24853 2021-02-12 14:58:26 UTC 2021-02-12
MDEV-24853: Duplicate key generated during cluster configuration change

Author: Julius Goryavsky
Author Date: 2021-02-12 14:58:26 UTC

MDEV-24853: Duplicate key generated during cluster configuration change

Incorrect processing of an auto-incrementing field in the
WSREP-related code during applying transactions results in
a duplicate key being created. This is due to the fact that
at the beginning of the write_row() and update_row() functions,
the values of the auto-increment parameters are used, which
are read from the parameters of the current thread, but further
along the code other values are used, which are read from global
variables (when applying a transaction). This can happen when
the cluster configuration has changed while applying a transaction
(for example in the high_priority_service mode for Galera 4).
Further during IST processing duplicating key is detected, and
processing of the DB_DUPLICATE_KEY return code (inside innodb,
in the write_row() handler) results in a call to the
wsrep_thd_self_abort() function.

bb-10.6-MDEV-22010 2021-02-11 09:49:29 UTC 2021-02-11
MDEV-22010: use executables MariaDB named in scripts

Author: Rucha Deodhar
Author Date: 2021-02-08 09:22:04 UTC

MDEV-22010: use executables MariaDB named in scripts

As a part of this MDEV following changes were made:
1) Mariadb named executables used instead of mysql named executables in scripts
2) renamed mysql-test-run and mysql-stress-test to mariadb-test-run and
mariadb-stress-test and created a symlink.

bb-10.2-MDEV-19950 2021-02-10 14:59:57 UTC 2021-02-10
MDEV-19950: Galera test failure on galera_ssl_upgrade

Author: Julius Goryavsky
Author Date: 2021-02-10 13:04:25 UTC

MDEV-19950: Galera test failure on galera_ssl_upgrade

The test requires adaptation for MariaDB, which is done
in this patch. In addition, this patch includes a fix for
the SST script startup code that adds escaping for special
characters on the command line (in case they are contained
in the arguments to mysqld). The fix does not require
separate tests, as the required tests are already part
of the mtr suite for Galera.

bb-10.4-MDEV-19950 2021-02-10 13:04:25 UTC 2021-02-10
MDEV-19950: Galera test failure on galera_ssl_upgrade

Author: Julius Goryavsky
Author Date: 2021-02-10 13:04:25 UTC

MDEV-19950: Galera test failure on galera_ssl_upgrade

The test requires adaptation for MariaDB, which is done
in this patch. In addition, this patch includes a fix for
the SST script startup code that adds escaping for special
characters on the command line (in case they are contained
in the arguments to mysqld). The fix does not require
separate tests, as the required tests are already part
of the mtr suite for Galera.

bb-17399-hf 2021-02-10 12:25:55 UTC 2021-02-10
MDEV-17399 Add support for JSON_TABLE.

Author: Alexey Botchkov
Author Date: 2021-02-10 12:25:55 UTC

MDEV-17399 Add support for JSON_TABLE.

The specific table handler for the table functions was introduced,
and used to implement JSON_TABLE.

bb-10.5-cs 2021-02-09 19:15:22 UTC 2021-02-09
update for columnstore-5.5.1-2

Author: David Hall
Author Date: 2021-02-09 19:15:22 UTC

update for columnstore-5.5.1-2

bb-10.6-MDEV-14180 2021-02-09 10:41:16 UTC 2021-02-09
MDEV-14180 Automatically disable key rotation checks for file_key_management ...

Author: THIRUNARAYANAN BALATHANDAYUTHAPANI
Author Date: 2021-02-09 10:40:46 UTC

MDEV-14180 Automatically disable key rotation checks for file_key_management plugin

- Addressed marko's review comments

1100 of 955 results
This repository contains Public information 
Everyone can see this information.

Subscribers