Commit a0c86794 authored by Jan Lindström's avatar Jan Lindström

Added correct mutexing on trx handling.

parent f222e7d4
......@@ -7944,9 +7944,12 @@ ha_innobase::update_row(
if (!error && wsrep_thd_exec_mode(user_thd) == LOCAL_STATE &&
wsrep_on(user_thd)) {
WSREP_DEBUG("WSREP: UPDATE_ROW_KEY");
DBUG_PRINT("wsrep", ("update row key"));
if (wsrep_append_keys(user_thd, false, old_row, new_row)) {
WSREP_DEBUG("WSREP: UPDATE_ROW_KEY FAILED");
DBUG_PRINT("wsrep", ("row key failed"));
err = HA_ERR_INTERNAL_ERROR;
goto wsrep_error;
......@@ -9458,6 +9461,8 @@ ha_innobase::wsrep_append_keys(
} else {
ut_a(table->s->keys <= 256);
uint i;
WSREP_DEBUG("WSREP: append key");
for (i=0; i<table->s->keys; ++i) {
uint len;
char keyval0[WSREP_MAX_SUPPORTED_KEY_LENGTH+1] = {'\0'};
......@@ -9510,6 +9515,7 @@ ha_innobase::wsrep_append_keys(
uchar digest[16];
int rcode;
WSREP_DEBUG("WSREP: append key 2");
wsrep_calc_row_hash(digest, record0, table, prebuilt, thd);
if ((rcode = wsrep_append_key(thd, trx, table_share, table,
(const char*) digest, 16,
......@@ -16864,8 +16870,10 @@ wsrep_abort_transaction(handlerton* hton, THD *bf_thd, THD *victim_thd,
if (victim_trx)
{
mutex_enter(&trx_sys->mutex);
int rcode = wsrep_innobase_kill_one_trx(bf_trx, victim_trx,
signal);
mutex_exit(&trx_sys->mutex);
wsrep_srv_conc_cancel_wait(victim_trx);
DBUG_RETURN(rcode);
} else {
......@@ -16905,7 +16913,9 @@ wsrep_fake_trx_id(
handlerton *hton,
THD *thd) /*!< in: user thread handle */
{
mutex_enter(&trx_sys->mutex);
trx_id_t trx_id = trx_sys_get_new_trx_id();
mutex_exit(&trx_sys->mutex);
(void *)wsrep_trx_handle_for_id(wsrep_thd_trx_handle(thd), trx_id);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment