maria:bb-10.4-sysprg-MDEV-20625

Last commit made on 2019-10-08
Get this branch:
git clone -b bb-10.4-sysprg-MDEV-20625 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.4-sysprg-MDEV-20625
Repository:
lp:maria

Recent commits

2db41bb... by Julius Goryavsky <email address hidden>

MDEV-20625: MariaDB asserting when enabling wsrep=on

c339487... by Jan Lindström

Try to fix galera_parallel_simple test case.

37570e8... by Sergey Petrunia

MDEV-20740: Odd computations in calculate_cond_selectivity_for_table

Make SEL_ARG graph traversal code in sel_arg_range_seq_next() set
max_key_parts first.

(Pushing to 10.4 first)

a5c34bc... by Sergei Golubchik

if the test uses example plugin, it has to check whether plugin exists

b710d01... by Sergei Golubchik

mark PAMv2 plugin stable

fe4f766... by Jan Lindström

Add wait_condition to wait that node returns to ready state before
accessing it.

5709a77... by Marko Mäkelä

MDEV-19956: Do not dereference an uninitialized pointer

LEX::parsed_select_expr_cont(): Replace a condition with an
assertion DBUG_ASSERT(!s2->next_select()), and always
initialize sel1=s2, because all subsequent code paths will
assign to sel1->first_nested.

This was flagged by GCC reporting -Wmaybe-uninitialized
for the statement last->link_neighbour(sel1).

eb0a10b... by Jan Lindström

Add missing have_debug to galera.MDEV-20225 test case.

97d82c3... by Jan Lindström

galera_sp_bf_abort requires debug Galera library.

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()