summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunny Bains <Sunny.Bains@Oracle.Com>2013-01-10 10:01:50 +1100
committerSunny Bains <Sunny.Bains@Oracle.Com>2013-01-10 10:01:50 +1100
commitdf5444d47ca64f4024c959913974a2a06f75ab14 (patch)
treec577f425a496ca065b5f5502e2b254c872b613af
parent7a89d68f01bda710e0195ce448ea2e2fb047ca15 (diff)
downloadmariadb-git-df5444d47ca64f4024c959913974a2a06f75ab14.tar.gz
Bug#13997024 SEGV IN SYNC_ARRAY_CELL_PRINT PRINTING OUT LONG SEMAPHORE WAIT DATA
Backport fix from mysql-5.6.
-rw-r--r--storage/innobase/sync/sync0arr.c4
-rw-r--r--storage/innodb_plugin/sync/sync0arr.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/storage/innobase/sync/sync0arr.c b/storage/innobase/sync/sync0arr.c
index 60a96fe4388..33b0c8d5304 100644
--- a/storage/innobase/sync/sync0arr.c
+++ b/storage/innobase/sync/sync0arr.c
@@ -936,6 +936,8 @@ sync_array_print_long_waits(
return(FALSE);
}
+ sync_array_enter(sync_primary_wait_array);
+
for (i = 0; i < sync_primary_wait_array->n_cells; i++) {
double diff;
@@ -970,6 +972,8 @@ sync_array_print_long_waits(
}
}
+ sync_array_exit(sync_primary_wait_array);
+
if (noticed) {
fprintf(stderr,
"InnoDB: ###### Starts InnoDB Monitor"
diff --git a/storage/innodb_plugin/sync/sync0arr.c b/storage/innodb_plugin/sync/sync0arr.c
index 90ea50b641b..a9100b7003f 100644
--- a/storage/innodb_plugin/sync/sync0arr.c
+++ b/storage/innodb_plugin/sync/sync0arr.c
@@ -932,6 +932,8 @@ sync_array_print_long_waits(
return(FALSE);
}
+ sync_array_enter(sync_primary_wait_array);
+
for (i = 0; i < sync_primary_wait_array->n_cells; i++) {
double diff;
@@ -966,6 +968,8 @@ sync_array_print_long_waits(
}
}
+ sync_array_exit(sync_primary_wait_array);
+
if (noticed) {
fprintf(stderr,
"InnoDB: ###### Starts InnoDB Monitor"