Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
bea2f430
Commit
bea2f430
authored
Jul 12, 2004
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InnoDB: Increment the lock wait watchdog timeout during CHECK TABLE
(Bug #2694)
parent
74f3da33
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
7 deletions
+23
-7
innobase/include/srv0srv.h
innobase/include/srv0srv.h
+1
-0
innobase/include/sync0arr.h
innobase/include/sync0arr.h
+1
-1
innobase/row/row0mysql.c
innobase/row/row0mysql.c
+11
-1
innobase/srv/srv0srv.c
innobase/srv/srv0srv.c
+3
-0
innobase/sync/sync0arr.c
innobase/sync/sync0arr.c
+7
-5
No files found.
innobase/include/srv0srv.h
View file @
bea2f430
...
...
@@ -149,6 +149,7 @@ extern ulint srv_test_n_mutexes;
extern
ulint
srv_test_array_size
;
extern
ulint
srv_activity_count
;
extern
ulint
srv_fatal_semaphore_wait_threshold
;
extern
mutex_t
*
kernel_mutex_temp
;
/* mutex protecting the server, trx structs,
query threads, and lock table: we allocate
...
...
innobase/include/sync0arr.h
View file @
bea2f430
...
...
@@ -95,7 +95,7 @@ void
sync_arr_wake_threads_if_sema_free
(
void
);
/*====================================*/
/**************************************************************************
Prints warnings of long semaphore waits to stderr.
Currently > 120 sec.
*/
Prints warnings of long semaphore waits to stderr. */
void
sync_array_print_long_waits
(
void
);
...
...
innobase/row/row0mysql.c
View file @
bea2f430
...
...
@@ -2805,7 +2805,12 @@ row_check_table_for_mysql(
REPEATABLE READ here */
prebuilt
->
trx
->
isolation_level
=
TRX_ISO_REPEATABLE_READ
;
/* Enlarge the fatal lock wait timeout during CHECK TABLE. */
mutex_enter
(
&
kernel_mutex
);
srv_fatal_semaphore_wait_threshold
+=
7200
;
/* 2 hours */
mutex_exit
(
&
kernel_mutex
);
index
=
dict_table_get_first_index
(
table
);
while
(
index
!=
NULL
)
{
...
...
@@ -2853,6 +2858,11 @@ row_check_table_for_mysql(
ret
=
DB_ERROR
;
}
/* Restore the fatal lock wait timeout after CHECK TABLE. */
mutex_enter
(
&
kernel_mutex
);
srv_fatal_semaphore_wait_threshold
-=
7200
;
/* 2 hours */
mutex_exit
(
&
kernel_mutex
);
prebuilt
->
trx
->
op_info
=
(
char
*
)
""
;
return
(
ret
);
...
...
innobase/srv/srv0srv.c
View file @
bea2f430
...
...
@@ -55,6 +55,9 @@ ibool srv_lower_case_table_names = FALSE;
in the server */
ulint
srv_activity_count
=
0
;
/* The following is the maximum allowed duration of a lock wait. */
ulint
srv_fatal_semaphore_wait_threshold
=
600
;
ibool
srv_lock_timeout_and_monitor_active
=
FALSE
;
ibool
srv_error_monitor_active
=
FALSE
;
...
...
innobase/sync/sync0arr.c
View file @
bea2f430
...
...
@@ -890,7 +890,7 @@ sync_arr_wake_threads_if_sema_free(void)
}
/**************************************************************************
Prints warnings of long semaphore waits to stderr.
Currently > 120 sec.
*/
Prints warnings of long semaphore waits to stderr. */
void
sync_array_print_long_waits
(
void
)
...
...
@@ -900,6 +900,7 @@ sync_array_print_long_waits(void)
ibool
old_val
;
ibool
noticed
=
FALSE
;
ulint
i
;
ulint
fatal_timeout
=
srv_fatal_semaphore_wait_threshold
;
for
(
i
=
0
;
i
<
sync_primary_wait_array
->
n_cells
;
i
++
)
{
...
...
@@ -914,12 +915,13 @@ sync_array_print_long_waits(void)
}
if
(
cell
->
wait_object
!=
NULL
&&
difftime
(
time
(
NULL
),
cell
->
reservation_time
)
>
600
)
{
&&
difftime
(
time
(
NULL
),
cell
->
reservation_time
)
>
fatal_timeout
)
{
fp
uts
(
"InnoDB: Error: semaphore wait has lasted >
600
seconds
\n
"
fp
rintf
(
stderr
,
"InnoDB: Error: semaphore wait has lasted >
%lu
seconds
\n
"
"InnoDB: We intentionally crash the server, because it appears to be hung.
\n
"
,
stderr
);
fatal_timeout
);
ut_error
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment