Commit 387bdf07 authored by Marko Mäkelä's avatar Marko Mäkelä

Remove MYSQL_REPLACE_TRX_IN_THD

The method handlerton::replace_native_transaction_in_thd was added
into MySQL 5.7 in WL#6860, Binlogging XA-prepared transaction.
In MariaDB we do not have that change yet.
parent cc3057fd
......@@ -2896,48 +2896,6 @@ check_trx_exists(
return(trx);
}
#ifdef MYSQL_REPLACE_TRX_IN_THD
/** InnoDB transaction object that is currently associated with THD is
replaced with that of the 2nd argument. The previous value is
returned through the 3rd argument's buffer, unless it's NULL. When
the buffer is not provided (value NULL) that should mean the caller
restores previously saved association so the current trx has to be
additionally freed from all association with MYSQL.
@param[in,out] thd MySQL thread handle
@param[in] new_trx_arg replacement trx_t
@param[in,out] ptr_trx_arg pointer to a buffer to store old trx_t */
static
void
innodb_replace_trx_in_thd(
THD* thd,
void* new_trx_arg,
void** ptr_trx_arg)
{
trx_t*& trx = thd_to_trx(thd);
ut_ad(new_trx_arg == NULL
|| (((trx_t*) new_trx_arg)->mysql_thd == thd
&& !((trx_t*) new_trx_arg)->is_recovered));
if (ptr_trx_arg) {
*ptr_trx_arg = trx;
ut_ad(trx == NULL
|| (trx->mysql_thd == thd && !trx->is_recovered));
} else if (trx->state == TRX_STATE_NOT_STARTED) {
ut_ad(thd == trx->mysql_thd);
trx_free_for_mysql(trx);
} else {
ut_ad(thd == trx->mysql_thd);
ut_ad(trx_state_eq(trx, TRX_STATE_PREPARED));
trx_disconnect_prepared(trx);
}
trx = static_cast<trx_t*>(new_trx_arg);
}
#endif /* MYSQL_REPLACE_TRX_IN_THD */
/*************************************************************************
Gets current trx. */
trx_t*
......@@ -3839,11 +3797,6 @@ innobase_init(
innobase_hton->flags =
HTON_SUPPORTS_EXTENDED_KEYS | HTON_SUPPORTS_FOREIGN_KEYS;
#ifdef MYSQL_REPLACE_TRX_IN_THD
innobase_hton->replace_native_transaction_in_thd =
innodb_replace_trx_in_thd;
#endif
#ifdef WITH_WSREP
innobase_hton->abort_transaction=wsrep_abort_transaction;
innobase_hton->set_checkpoint=innobase_wsrep_set_checkpoint;
......
......@@ -41,7 +41,6 @@ class THD;
#undef MYSQL_FT_INIT_EXT
#undef MYSQL_PFS
#undef MYSQL_RENAME_INDEX
#undef MYSQL_REPLACE_TRX_IN_THD
#undef MYSQL_STORE_FTS_DOC_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