1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

wt_thd_lazy_init(), per-thread deadlock search depths and timeouts

mysys/array.c:
  lazy alloc in dynamic array
sql-common/client.c:
  for dynamic array, specify init_alloc==alloc_increment explicitly
sql/mysqld.cc:
  per-thread deadlock search depths and timeouts
sql/set_var.cc:
  per-thread deadlock search depths and timeouts
sql/sql_class.h:
  per-thread deadlock search depths and timeouts
This commit is contained in:
Sergei Golubchik
2008-08-08 13:11:27 +02:00
parent f8c1059cbf
commit e2219ec965
8 changed files with 112 additions and 62 deletions

View File

@ -353,6 +353,9 @@ struct system_variables
DATE_TIME_FORMAT *time_format;
my_bool sysdate_is_now;
/* deadlock detection */
ulong wt_timeout_short, wt_deadlock_search_depth_short;
ulong wt_timeout_long, wt_deadlock_search_depth_long;
};
@ -1349,9 +1352,14 @@ public:
st_transactions()
{
#ifdef USING_TRANSACTIONS
THD *thd=current_thd;
bzero((char*)this, sizeof(*this));
xid_state.xid.null();
init_sql_alloc(&mem_root, ALLOC_ROOT_MIN_BLOCK_SIZE, 0);
wt_thd_lazy_init(&wt, &thd->variables.wt_deadlock_search_depth_short,
&thd->variables.wt_timeout_short,
&thd->variables.wt_deadlock_search_depth_long,
&thd->variables.wt_timeout_long);
#else
xid_state.xa_state= XA_NOTR;
#endif