@@ -2896,48 +2896,6 @@ check_trx_exists(
2896
2896
return(trx);
2897
2897
}
2898
2898
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
-
2941
2899
/*************************************************************************
2942
2900
Gets current trx. */
2943
2901
trx_t*
@@ -3839,11 +3797,6 @@ innobase_init(
3839
3797
innobase_hton->flags =
3840
3798
HTON_SUPPORTS_EXTENDED_KEYS | HTON_SUPPORTS_FOREIGN_KEYS;
3841
3799
3842
- #ifdef MYSQL_REPLACE_TRX_IN_THD
3843
- innobase_hton->replace_native_transaction_in_thd =
3844
- innodb_replace_trx_in_thd;
3845
- #endif
3846
-
3847
3800
#ifdef WITH_WSREP
3848
3801
innobase_hton->abort_transaction=wsrep_abort_transaction;
3849
3802
innobase_hton->set_checkpoint=innobase_wsrep_set_checkpoint;
0 commit comments