mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 10:31:54 +01:00
MDEV-15914: Fast path for rw_trx_hash::find()
rw_trx_hash_t::find(): Implement a fast path for looking up the current transaction. This helps transactions that visit rows modified by themselves.
This commit is contained in:
parent
6e42d19f25
commit
30553aa37b
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue