maria:bb-10.2-MDEV-17323

Last commit made on 2018-10-14
Get this branch:
git clone -b bb-10.2-MDEV-17323 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.2-MDEV-17323
Repository:
lp:maria

Recent commits

a6d4487... by Vicențiu Ciorbaru

Merge branch 'MDEV1732_check_constraint_10.2_v1' of https://github.com/an3l/server into an3l-MDEV1732_check_constraint_10.2_v1

b715a0f... by Elena Stepanova

Disabled storage_engine test for RocksDB due to unstable execution plan

The failure caused by MDEV-16387

6d29c85... by Igor Babaev

MDEV-17354 Server crashes in add_key_field / .. / Item_func_null_predicate::add_key_fields
           upon INSERT .. SELECT

The function Item *Item_direct_view_ref::derived_field_transformer_for_where()
erroneously did not strip off ref wrappers from references to materialized
derived tables / views. As a result the expressions that contained some
references of the type Item_direct_view_ref to columns of a materialized
derived table / view V were pushed into V incorrectly. This could cause
crashes for some INSERT ... SELECT statements.

e27de08... by Anel Husakovic <email address hidden>

Change information_schema-big to include innodb

bc95d26... by Anel Husakovic <email address hidden>

Backport INFORMATION_SCHEMA.CHECK_CONSTRAINTS

Implement according to standard SQL specification 2008.
The check_constraints table is used for fetching metadata about
the constraints defined for tables in all databases.

There were some result files which failed after running mtr.
These files are updated with newly create record with mtr --record.

81a5b6c... by Marko Mäkelä

MDEV-17433 Allow InnoDB start up with empty ib_logfile0 from mariabackup --prepare

A prepared backup from Mariabackup does not really need to contain any
redo log file, because all log will have been applied to the data files.

When the user copies a prepared backup to a data directory (overwriting
existing files), it could happen that the data directory already contained
redo log files from the past. mariabackup --copy-back) would delete the
old redo log files, but a user’s own copying script might not do that.
To prevent corruption caused by mixing an old redo log file with data
files from a backup, starting with MDEV-13311, Mariabackup would create
a zero-length ib_logfile0 that would prevent startup.

Actually, there is no need to prevent InnoDB from starting up when a
single zero-length file ib_logfile0 is present. Only if there exist
multiple data files of different lengths, then we should refuse to
start up due to inconsistency. A single zero-length ib_logfile0 should
be treated as if the log files were missing: create new log files
according to the configuration.

open_log_file(): Remove. There is no need to open the log files
at this point, because os_file_get_status() already determined
the size of the file.

innobase_start_or_create_for_mysql(): Move the creation of new
log files a little later, not when finding out that the first log
file does not exist, but after finding out that it does not exist
or it exists as a zero-length file.

b8944e8... by Marko Mäkelä

Fix a sign mismatch

6319c0b... by Marko Mäkelä

MDEV-13564: Replace innodb_unsafe_truncate with innodb_safe_truncate

Rename the 10.2-specific configuration option innodb_unsafe_truncate
to innodb_safe_truncate, and invert its value.

The default (for now) is innodb_safe_truncate=OFF, to avoid
disrupting users with an undo and redo log format change within
a Generally Available (GA) release series.

3448ceb... by Marko Mäkelä

MDEV-13564: Implement innodb_unsafe_truncate=ON for compatibility

While MariaDB Server 10.2 is not really guaranteed to be compatible
with Percona XtraBackup 2.4 (for example, the MySQL 5.7 undo log format
change that could be present in XtraBackup, but was reverted from
MariaDB in MDEV-12289), we do not want to disrupt users who have
deployed xtrabackup and MariaDB Server 10.2 in their environments.

With this change, MariaDB 10.2 will continue to use the backup-unsafe
TRUNCATE TABLE code, so that neither the undo log nor the redo log
formats will change in an incompatible way.

Undo tablespace truncation will keep using the redo log only. Recovery
or backup with old code will fail to shrink the undo tablespace files,
but the contents will be recovered just fine.

In the MariaDB Server 10.2 series only, we introduce the configuration
parameter innodb_unsafe_truncate and make it ON by default. To allow
MariaDB Backup (mariabackup) to work properly with TRUNCATE TABLE
operations, use loose_innodb_unsafe_truncate=OFF.

MariaDB Server 10.3.10 and later releases will always use the
backup-safe TRUNCATE TABLE, and this parameter will not be
added there.

recv_recovery_rollback_active(): Skip row_mysql_drop_garbage_tables()
unless innodb_unsafe_truncate=OFF. It is too unsafe to drop orphan
tables if RENAME operations are not transactional within InnoDB.

LOG_HEADER_FORMAT_10_3: Replaces LOG_HEADER_FORMAT_CURRENT.

log_init(), log_group_file_header_flush(),
srv_prepare_to_delete_redo_log_files(),
innobase_start_or_create_for_mysql(): Choose the redo log format
and subformat based on the value of innodb_unsafe_truncate.

07815d9... by Marko Mäkelä

Merge 10.1 into 10.2