diff options
author | Sergei Golubchik <serg@mysql.com> | 2008-08-08 13:11:27 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mysql.com> | 2008-08-08 13:11:27 +0200 |
commit | e2219ec965a80b2034d9debcbf12d3e73a684d89 (patch) | |
tree | b3536b97676a1a4775570820a6ff59a628ed4e99 /include/waiting_threads.h | |
parent | f8c1059cbf62e95d2684fdf8b9badc398f845173 (diff) | |
download | mariadb-git-e2219ec965a80b2034d9debcbf12d3e73a684d89.tar.gz |
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
Diffstat (limited to 'include/waiting_threads.h')
-rw-r--r-- | include/waiting_threads.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/waiting_threads.h b/include/waiting_threads.h index cf55e586d48..154fb19800b 100644 --- a/include/waiting_threads.h +++ b/include/waiting_threads.h @@ -38,9 +38,6 @@ struct st_wt_resource_id { } value; }; -extern uint wt_timeout_short, wt_deadlock_search_depth_short; -extern uint wt_timeout_long, wt_deadlock_search_depth_long; - #define WT_WAIT_STATS 24 #define WT_CYCLE_STATS 32 extern ulonglong wt_wait_table[WT_WAIT_STATS]; @@ -105,6 +102,11 @@ typedef struct st_wt_thd { */ WT_RESOURCE *waiting_for; LF_PINS *pins; + + /* pointers to values */ + ulong *timeout_short, *deadlock_search_depth_short; + ulong *timeout_long, *deadlock_search_depth_long; + /* weight relates to the desirability of a transaction being killed if it's part of a deadlock. In a deadlock situation transactions with lower weights @@ -149,7 +151,7 @@ typedef struct st_wt_thd { void wt_init(void); void wt_end(void); -void wt_thd_init(WT_THD *); +void wt_thd_lazy_init(WT_THD *, ulong *, ulong *, ulong *, ulong *); void wt_thd_destroy(WT_THD *); int wt_thd_will_wait_for(WT_THD *, WT_THD *, WT_RESOURCE_ID *); int wt_thd_dontwait(WT_THD *); |