maria:bb-10.2-MDEV-18546-nikita

Last commit made on 2019-10-11
Get this branch:
git clone -b bb-10.2-MDEV-18546-nikita https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.2-MDEV-18546-nikita
Repository:
lp:maria

Recent commits

fe7c409... by Nikita Malyavin

MDEV-18546 ASAN heap-use-after-free in innobase_get_computed_value / row_purge

the bug was already fixed in MDEV-17005, so now only test is added

dd8768b... by Nikita Malyavin

add innodb_debug_sync var to support DEBUG_SYNC from purge threads

24232ec... by Marko Mäkelä

Merge 10.1 into 10.2

ed0793e... by Eugene

MDEV-19783: Add more REC_INFO_MIN_REC_FLAG checks

btr_cur_pessimistic_delete(): code changed in a way that allows
to put more REC_INFO_MIN_REC_FLAG assertions inside btr_set_min_rec_mark().
Without that change tests innodb.innodb-table-online,
innodb.temp_table_savepoint and innodb_zip.prefix_index_liftedlimit fail.

Removed basically duplicated page_zip_validate() calls
which fails because of temporary(!) invariant violation.
That fixed innodb_zip.wl5522_debug_zip and
innodb_zip.prefix_index_liftedlimit

99dc40d... by Eugene

MDEV-19783 Random crashes and corrupt data in INSTANT-added columns

The bug affects MariaDB Server 10.3 or later, but it makes sense
to improve CHECK TABLE in earlier versions already.

page_validate(): Check REC_INFO_MIN_REC_FLAG in the records.
This allows CHECK TABLE to catch more bugs.

d480d28... by Marko Mäkelä

Add page_has_prev(), page_has_next(), page_has_siblings()

Until now, InnoDB inefficiently compared the aligned fields
FIL_PAGE_PREV, FIL_PAGE_NEXT to the byte-order-agnostic value FIL_NULL.

This is a backport of 32170f8c6d55c497ae7a791997e17ff7c992b86f
from MariaDB Server 10.3.

d95f96a... by Marko Mäkelä

Merge 5.5 into 10.1

27664ef... by Sachin Setiya

MDEV-20574 Position of events reported by mysqlbinlog is wrong with encrypted binlogs, SHOW BINLOG EVENTS reports the correct one.

Analysis

Mysqlbinlog output for encrypted binary log
#Q> insert into tab1 values (3,'row 003')
#190912 17:36:35 server id 10221 end_log_pos 980 CRC32 0x53bcb3d3 Table_map: `test`.`tab1` mapped to number 19
# at 940
#190912 17:36:35 server id 10221 end_log_pos 1026 CRC32 0xf2ae5136 Write_rows: table id 19 flags: STMT_END_F

Here we can see Table_map_log_event ends at 980 but Next event starts at 940.
And the reason for that is we do not send START_ENCRYPTION_EVENT to the slave

Solution:-
Send Start_encryption_log_event as Ignorable_log_event to slave(mysqlbinlog),
So that mysqlbinlog can update its log_pos.
Since Slave can request multiple FORMAT_DESCRIPTION_EVENT while master does not
have so We only update slave master pos when master actually have the
FORMAT_DESCRIPTION_EVENT. Similar logic should be applied for START_ENCRYPTION_EVENT.

Also added the test case when new server reads the data from old server which
does not send START_ENCRYPTION_EVENT to slave.

Master Slave Upgrade Scenario.
When Slave is updated first, Slave will have extra logic of handling
START_ENCRYPTION_EVENT But master willnot be sending START_ENCRYPTION_EVENT.
So there will be no issue.
When Master is updated first, It will send START_ENCRYPTION_EVENT to
slave , But slave will ignore this event in queue_event.

db9a4d9... by Marko Mäkelä

Remove orphan declaration buf_flush_wait_batch_end_wait_only()

The function was declared but not defined in
commit 9d6d1902e091c868bb288e0ccf9f975ccb474db9

adefaef... by Sergey Vojtovich

MDEV-19536 - Server crash or ASAN heap-use-after-free in is_temporary_table /
             read_statistics_for_tables_if_needed

Regression after 279a907, read_statistics_for_tables_if_needed() was
called after open_normal_and_derived_tables() failure.

Fixed by moving read_statistics_for_tables() call to a branch of
get_schema_stat_record() where result of open_normal_and_derived_tables()
is checked.

Removed THD::force_read_stats, added read_statistics_for_tables() instead.
Simplified away statistics_for_command_is_needed().