maria:bb-10.4-20574

Last commit made on 2019-10-01
Get this branch:
git clone -b bb-10.4-20574 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.4-20574
Repository:
lp:maria

Recent commits

a7bd465... 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.

c42c423... by seppo <email address hidden>

MDEV-20225 BF aborting SP execution (#1394)

* MDEV-20225 BF aborting SP execution

When stored procedure execution was chosen as victim for a BF abort, the old implemnetationn called for rollback immediately
when execution was inside SP isntruction. Technically this happened in wsrep_after_statement() call, which identified the
need for a rollback.
The problem was that MariaDB does not accept rollback (nor commit) inside sub statement, there are several asserts about it,
checking for THD::in_sub_stmt.

This patch contains a fix, which skips calling wsrep_after_statement() for SP execution, which is marked as BF must abort. Instead,
we return error code to upper level, where rollback will eventually happen, ouside of SP execution.
Also, appending the affected trigger table (dropped or created) in the populated key set for the write set,
which prevents parallel applying of other transactions working on the same table.

* MDEV-20225 BF aborting SP execution, second patch

First PR missed 4 commits, which are now squashed in this patch:
- Added galera_sp_bf_abort test.
  A MTR test case which will reproduce BF-BF conflict if all keys
  corresponding to affected tables are not assigned for DROP TRIGGER.
- Fixed incorrect use of sync pointsin MDEV-20225
- Added condition for SQLCOM_DROP_TRIGGER in wsrep_can_run_in_toi()
  to make it replicate.

* MDEV-20225 BF aborting SP execution, third patch

The galera_trigger.test caused a situation, where SP invocation caused a trigger
to fire, and the trigger executed as sub statement SP, and was BF aborted by applier.
because of wsrep_after_statement() was called for the sub-statement level, it ended up
in exeuting rollback and asserted there.
Thus fix will catch sub-statement level SP execution, and avoids calling wsrep_after_statement()

dc588e3... by Alexander Barkov

Merge remote-tracking branch 'origin/10.3' into 10.4

7e44c45... by Alexander Barkov

Merge remote-tracking branch 'origin/10.2' into 10.3

f203245... by Alexander Barkov

Merge remote-tracking branch 'origin/10.1' into 10.2

4bcf524... by Alexander Barkov

Merge remote-tracking branch 'origin/5.5' into 10.1

d481f69... by Alexander Barkov

MDEV-20704 An index on a double column erroneously uses prefix compression

576a5f0... by Robert Bindar

MDEV-20647 Fix and enable SphinxSE tests

6c2724f... by Alexey Botchkov

MDEV-19628 JSON with starting double quotes key is not valid.

Make the skip_key a bit faster.

6ac2a35... by Alexey Botchkov

MDEV-19628 JSON with starting double quotes key is not valid.

First character of the key name is just skipped, so the escapement
wasn't handled properly.