In galera cluster, the definer (and thus binlog invoker) must be set
for CREATE ROLE before Query_log_event is created during TOI on the
originating node.
If a conflict happens under wsrep_on, the THD's wsrep_conflict_state
is typically set to MUST_ABORT and cleared later, when transaction is
aborted. However, when wsrep_on is disabled, no check is performed to
see whether wsrep_conflict_state is set. So this potentially creates
spurious deadlock errors on the subsequent statement that runs with
wsrep_on enabled.
To avoid this problem wsrep_thd_set_conflict_state() sets the conflict
state only if wsrep_on is enabled.
- popping PS reprepare observer before BF aborted PS replaying begins
dangling observer will cause failure in open_table() ater on
- test case for this anomaly
This changes variable wsrep_max_ws_size so that its value
is linked to the value of provider option repl.max_ws_size.
That is, changing the value of variable wsrep_max_ws_size
will change the value of provider option repl.max_ws_size,
and viceversa.
The writeset size limit is always enforced in the provider,
regardless of which option is used.
This patch includes two fixes:
1) Rollback when wsrep_max_ws_rows is exceeded would not switch
back to previous autocommit mode; and 2) Internal rows counter
would not be reset on implicit commits.
Chery-picked commits from codership/mysql-wsrep.
MW-284: Slave I/O retry on ER_COM_UNKNOWN_ERROR
Slave would treat ER_COM_UNKNOWN_ERROR as fatal error and stop.
The fix here is to treat it as a network error and rely on the
built-in mechanism to retry.
MW-284: Add an MTR test
Some statements are always replicated in STATEMENT binlog format.
So upon their execution, the current binlog format is temporarily
switched to STATEMENT even though the session's format is different.
This state, stored in THD's current_stmt_binlog_format, was getting
incorrectly masked by wsrep_forced_binlog_format, causing assertions
and unintended generation of row events.
Backported galera.galera_forced_binlog_format and added a test
specific to this case.
* Total order isolation was started twice for FLUSH TABLES, from
reload_acl_and_cache() and from mysql_execute_command(). Removed
the reload_acl_and_cache() part.
* Removed PXC specific stuff from MTR tests
- Eliminates code duplication in query cache patch
- Reduces the number of iterations in mysql-wsrep#201.test
to shorten the execution time
- Adds a new test case that exercises more scenarios