Skip to content

Commit 7547912

Browse files
author
Alexander Nozdrin
committed
Auto-merge from mysql-next-4284.
2 parents e8d19b9 + aab777c commit 7547912

File tree

10 files changed

+17
-294
lines changed

10 files changed

+17
-294
lines changed

include/thr_lock.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ enum enum_thr_lock_result { THR_LOCK_SUCCESS= 0, THR_LOCK_ABORTED= 1,
8383

8484

8585
extern ulong max_write_lock_count;
86-
extern ulong table_lock_wait_timeout;
8786
extern my_bool thr_lock_inited;
8887
extern enum thr_lock_type thr_upgraded_concurrent_insert_lock;
8988

mysql-test/r/mysqld--help-notwin.result

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -717,10 +717,6 @@ The following options may be given as the first argument:
717717
--table-cache=# Deprecated; use --table-open-cache instead.
718718
--table-definition-cache=#
719719
The number of cached table definitions
720-
--table-lock-wait-timeout=#
721-
Timeout in seconds to wait for a table level lock before
722-
returning an error. Used only if the connection has
723-
active cursors
724720
--table-open-cache=#
725721
The number of cached open tables
726722
--tc-heuristic-recover=name
@@ -983,7 +979,6 @@ sync-relay-log-info 0
983979
sysdate-is-now FALSE
984980
table-cache 400
985981
table-definition-cache 400
986-
table-lock-wait-timeout 50
987982
table-open-cache 400
988983
tc-heuristic-recover COMMIT
989984
thread-cache-size 0

mysql-test/r/mysqld--help-win.result

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -721,10 +721,6 @@ The following options may be given as the first argument:
721721
--table-cache=# Deprecated; use --table-open-cache instead.
722722
--table-definition-cache=#
723723
The number of cached table definitions
724-
--table-lock-wait-timeout=#
725-
Timeout in seconds to wait for a table level lock before
726-
returning an error. Used only if the connection has
727-
active cursors
728724
--table-open-cache=#
729725
The number of cached open tables
730726
--tc-heuristic-recover=name
@@ -989,7 +985,6 @@ sync-relay-log-info 0
989985
sysdate-is-now FALSE
990986
table-cache 400
991987
table-definition-cache 400
992-
table-lock-wait-timeout 50
993988
table-open-cache 400
994989
tc-heuristic-recover COMMIT
995990
thread-cache-size 0

mysql-test/r/variables.result

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,11 +1066,9 @@ set global default_storage_engine =@my_storage_engine;
10661066
set global thread_cache_size =@my_thread_cache_size;
10671067
set global max_allowed_packet =@my_max_allowed_packet;
10681068
set global join_buffer_size =@my_join_buffer_size;
1069-
show global variables where Variable_name='table_definition_cache' or
1070-
Variable_name='table_lock_wait_timeout';
1069+
show global variables where Variable_name='table_definition_cache';
10711070
Variable_name Value
10721071
table_definition_cache #
1073-
table_lock_wait_timeout #
10741072

10751073
# --
10761074
# -- Bug#34820: log_output can be set to illegal value.

mysql-test/suite/sys_vars/r/table_lock_wait_timeout_basic.result

Lines changed: 0 additions & 98 deletions
This file was deleted.

mysql-test/suite/sys_vars/t/table_lock_wait_timeout_basic.test

Lines changed: 0 additions & 171 deletions
This file was deleted.

mysql-test/t/variables.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -830,8 +830,8 @@ set global join_buffer_size =@my_join_buffer_size;
830830
# Bug#28580 Repeatation of status variables
831831
#
832832
--replace_column 2 #
833-
show global variables where Variable_name='table_definition_cache' or
834-
Variable_name='table_lock_wait_timeout';
833+
show global variables where Variable_name='table_definition_cache';
834+
# Note: table_lock_wait_timeout no longer exists. See bug#45225.
835835

836836
###########################################################################
837837

mysys/thr_lock.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ multiple read locks.
8383

8484
my_bool thr_lock_inited=0;
8585
ulong locks_immediate = 0L, locks_waited = 0L;
86-
ulong table_lock_wait_timeout;
8786
enum thr_lock_type thr_upgraded_concurrent_insert_lock = TL_WRITE;
8887

8988
/* The following constants are only for debug output */

sql/mdl.cc

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,20 @@ class Deadlock_detection_context
7474
MDL_context *start;
7575
MDL_context *victim;
7676
uint current_search_depth;
77-
static const uint MAX_SEARCH_DEPTH= 1000;
77+
/**
78+
Maximum depth for deadlock searches. After this depth is
79+
achieved we will unconditionally declare that there is a
80+
deadlock.
81+
82+
@note This depth should be small enough to avoid stack
83+
being exhausted by recursive search algorithm.
84+
85+
TODO: Find out what is the optimal value for this parameter.
86+
Current value is safe, but probably sub-optimal,
87+
as there is an anecdotal evidence that real-life
88+
deadlocks are even shorter typically.
89+
*/
90+
static const uint MAX_SEARCH_DEPTH= 32;
7891
};
7992

8093

sql/sys_vars.cc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,13 +1954,6 @@ static Sys_var_ulong Sys_table_cache_size(
19541954
VALID_RANGE(1, 512*1024), DEFAULT(TABLE_OPEN_CACHE_DEFAULT),
19551955
BLOCK_SIZE(1));
19561956

1957-
static Sys_var_ulong Sys_table_lock_wait_timeout(
1958-
"table_lock_wait_timeout",
1959-
"Timeout in seconds to wait for a table level lock before returning an "
1960-
"error. Used only if the connection has active cursors",
1961-
GLOBAL_VAR(table_lock_wait_timeout), CMD_LINE(REQUIRED_ARG),
1962-
VALID_RANGE(1, 1024*1024*1024), DEFAULT(50), BLOCK_SIZE(1));
1963-
19641957
static Sys_var_ulong Sys_thread_cache_size(
19651958
"thread_cache_size",
19661959
"How many threads we should keep in a cache for reuse",

0 commit comments

Comments
 (0)