Skip to content

Commit 387bdf0

Browse files
committed
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.
1 parent cc3057f commit 387bdf0

File tree

2 files changed

+0
-48
lines changed

2 files changed

+0
-48
lines changed

storage/innobase/handler/ha_innodb.cc

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2896,48 +2896,6 @@ check_trx_exists(
28962896
return(trx);
28972897
}
28982898

2899-
#ifdef MYSQL_REPLACE_TRX_IN_THD
2900-
/** InnoDB transaction object that is currently associated with THD is
2901-
replaced with that of the 2nd argument. The previous value is
2902-
returned through the 3rd argument's buffer, unless it's NULL. When
2903-
the buffer is not provided (value NULL) that should mean the caller
2904-
restores previously saved association so the current trx has to be
2905-
additionally freed from all association with MYSQL.
2906-
2907-
@param[in,out] thd MySQL thread handle
2908-
@param[in] new_trx_arg replacement trx_t
2909-
@param[in,out] ptr_trx_arg pointer to a buffer to store old trx_t */
2910-
static
2911-
void
2912-
innodb_replace_trx_in_thd(
2913-
THD* thd,
2914-
void* new_trx_arg,
2915-
void** ptr_trx_arg)
2916-
{
2917-
trx_t*& trx = thd_to_trx(thd);
2918-
2919-
ut_ad(new_trx_arg == NULL
2920-
|| (((trx_t*) new_trx_arg)->mysql_thd == thd
2921-
&& !((trx_t*) new_trx_arg)->is_recovered));
2922-
2923-
if (ptr_trx_arg) {
2924-
*ptr_trx_arg = trx;
2925-
2926-
ut_ad(trx == NULL
2927-
|| (trx->mysql_thd == thd && !trx->is_recovered));
2928-
2929-
} else if (trx->state == TRX_STATE_NOT_STARTED) {
2930-
ut_ad(thd == trx->mysql_thd);
2931-
trx_free_for_mysql(trx);
2932-
} else {
2933-
ut_ad(thd == trx->mysql_thd);
2934-
ut_ad(trx_state_eq(trx, TRX_STATE_PREPARED));
2935-
trx_disconnect_prepared(trx);
2936-
}
2937-
trx = static_cast<trx_t*>(new_trx_arg);
2938-
}
2939-
#endif /* MYSQL_REPLACE_TRX_IN_THD */
2940-
29412899
/*************************************************************************
29422900
Gets current trx. */
29432901
trx_t*
@@ -3839,11 +3797,6 @@ innobase_init(
38393797
innobase_hton->flags =
38403798
HTON_SUPPORTS_EXTENDED_KEYS | HTON_SUPPORTS_FOREIGN_KEYS;
38413799

3842-
#ifdef MYSQL_REPLACE_TRX_IN_THD
3843-
innobase_hton->replace_native_transaction_in_thd =
3844-
innodb_replace_trx_in_thd;
3845-
#endif
3846-
38473800
#ifdef WITH_WSREP
38483801
innobase_hton->abort_transaction=wsrep_abort_transaction;
38493802
innobase_hton->set_checkpoint=innobase_wsrep_set_checkpoint;

storage/innobase/include/ha_prototypes.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ class THD;
4141
#undef MYSQL_FT_INIT_EXT
4242
#undef MYSQL_PFS
4343
#undef MYSQL_RENAME_INDEX
44-
#undef MYSQL_REPLACE_TRX_IN_THD
4544
#undef MYSQL_STORE_FTS_DOC_ID
4645

4746
/*******************************************************************//**

0 commit comments

Comments
 (0)