diff --git a/storage/innobase/include/trx0sys.h b/storage/innobase/include/trx0sys.h index 716365a9868..ef238b89a66 100644 --- a/storage/innobase/include/trx0sys.h +++ b/storage/innobase/include/trx0sys.h @@ -627,6 +627,12 @@ public: */ if (!trx_id) return NULL; + if (caller_trx && caller_trx->id == trx_id) + { + if (do_ref_count) + caller_trx->reference(); + return caller_trx; + } trx_t *trx= 0; LF_PINS *pins= caller_trx ? get_pins(caller_trx) : lf_hash_get_pins(&hash);