summaryrefslogtreecommitdiff
path: root/innobase/sync/sync0arr.c
diff options
context:
space:
mode:
authortimour@mysql.com <>2004-11-25 11:37:28 +0200
committertimour@mysql.com <>2004-11-25 11:37:28 +0200
commit38ab93c6befaca29e2fc36f0f24ce2d1e464550b (patch)
tree29ad0385fdb639f58ab052e5bb498f9429a374d9 /innobase/sync/sync0arr.c
parent5eae363c329978a8d87cadc76a1a4967f38a7d70 (diff)
parentcf722bc3f5040d447f657477485e362b967d1f3e (diff)
downloadmariadb-git-38ab93c6befaca29e2fc36f0f24ce2d1e464550b.tar.gz
Merge for BUG#3759 which was missing from the main tree for some reason.
Diffstat (limited to 'innobase/sync/sync0arr.c')
-rw-r--r--innobase/sync/sync0arr.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/innobase/sync/sync0arr.c b/innobase/sync/sync0arr.c
index 176aedb6ae3..a443d630425 100644
--- a/innobase/sync/sync0arr.c
+++ b/innobase/sync/sync0arr.c
@@ -61,10 +61,7 @@ struct sync_cell_struct {
thread */
ibool waiting; /* TRUE if the thread has already
called sync_array_event_wait
- on this cell but not yet
- sync_array_free_cell (which
- actually resets wait_object and thus
- whole cell) */
+ on this cell */
ibool event_set; /* TRUE if the event is set */
os_event_t event; /* operating system event
semaphore handle */
@@ -892,15 +889,18 @@ sync_arr_wake_threads_if_sema_free(void)
/**************************************************************************
Prints warnings of long semaphore waits to stderr. */
-void
+ibool
sync_array_print_long_waits(void)
/*=============================*/
+ /* out: TRUE if fatal semaphore wait threshold
+ was exceeded */
{
sync_cell_t* cell;
ibool old_val;
ibool noticed = FALSE;
ulint i;
ulint fatal_timeout = srv_fatal_semaphore_wait_threshold;
+ ibool fatal = FALSE;
for (i = 0; i < sync_primary_wait_array->n_cells; i++) {
@@ -917,13 +917,7 @@ sync_array_print_long_waits(void)
if (cell->wait_object != NULL
&& difftime(time(NULL), cell->reservation_time)
> fatal_timeout) {
-
- fprintf(stderr,
-"InnoDB: Error: semaphore wait has lasted > %lu seconds\n"
-"InnoDB: We intentionally crash the server, because it appears to be hung.\n",
- fatal_timeout);
-
- ut_error;
+ fatal = TRUE;
}
}
@@ -951,6 +945,8 @@ sync_array_print_long_waits(void)
fprintf(stderr,
"InnoDB: ###### Diagnostic info printed to the standard error stream\n");
}
+
+ return(fatal);
}
/**************************************************************************