mirror of
https://github.com/MariaDB/server.git
synced 2026-05-09 08:34:28 +02:00
MDEV-8931: (server part of) session state tracking
Transaction tracker
This commit is contained in:
parent
c8948b0d0d
commit
0ee3e64c55
32 changed files with 1169 additions and 266 deletions
|
|
@ -2093,6 +2093,9 @@ Locked_tables_list::init_locked_tables(THD *thd)
|
|||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
TRANSACT_TRACKER(add_trx_state(thd, TX_LOCKED_TABLES));
|
||||
|
||||
thd->enter_locked_tables_mode(LTM_LOCK_TABLES);
|
||||
|
||||
return FALSE;
|
||||
|
|
@ -2133,6 +2136,8 @@ Locked_tables_list::unlock_locked_tables(THD *thd)
|
|||
}
|
||||
thd->leave_locked_tables_mode();
|
||||
|
||||
TRANSACT_TRACKER(clear_trx_state(thd, TX_LOCKED_TABLES));
|
||||
|
||||
DBUG_ASSERT(thd->transaction.stmt.is_empty());
|
||||
close_thread_tables(thd);
|
||||
|
||||
|
|
@ -4354,6 +4359,13 @@ static bool check_lock_and_start_stmt(THD *thd,
|
|||
table_list->table->file->print_error(error, MYF(0));
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
/*
|
||||
Record in transaction state tracking
|
||||
*/
|
||||
TRANSACT_TRACKER(add_trx_state(thd, lock_type,
|
||||
table_list->table->file->has_transactions()));
|
||||
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue