Commit df5444d4 authored by Sunny Bains's avatar Sunny Bains

Bug#13997024 SEGV IN SYNC_ARRAY_CELL_PRINT PRINTING OUT LONG SEMAPHORE WAIT DATA

Backport fix from mysql-5.6.
parent 7a89d68f
...@@ -936,6 +936,8 @@ sync_array_print_long_waits( ...@@ -936,6 +936,8 @@ sync_array_print_long_waits(
return(FALSE); return(FALSE);
} }
sync_array_enter(sync_primary_wait_array);
for (i = 0; i < sync_primary_wait_array->n_cells; i++) { for (i = 0; i < sync_primary_wait_array->n_cells; i++) {
double diff; double diff;
...@@ -970,6 +972,8 @@ sync_array_print_long_waits( ...@@ -970,6 +972,8 @@ sync_array_print_long_waits(
} }
} }
sync_array_exit(sync_primary_wait_array);
if (noticed) { if (noticed) {
fprintf(stderr, fprintf(stderr,
"InnoDB: ###### Starts InnoDB Monitor" "InnoDB: ###### Starts InnoDB Monitor"
......
...@@ -932,6 +932,8 @@ sync_array_print_long_waits( ...@@ -932,6 +932,8 @@ sync_array_print_long_waits(
return(FALSE); return(FALSE);
} }
sync_array_enter(sync_primary_wait_array);
for (i = 0; i < sync_primary_wait_array->n_cells; i++) { for (i = 0; i < sync_primary_wait_array->n_cells; i++) {
double diff; double diff;
...@@ -966,6 +968,8 @@ sync_array_print_long_waits( ...@@ -966,6 +968,8 @@ sync_array_print_long_waits(
} }
} }
sync_array_exit(sync_primary_wait_array);
if (noticed) { if (noticed) {
fprintf(stderr, fprintf(stderr,
"InnoDB: ###### Starts InnoDB Monitor" "InnoDB: ###### Starts InnoDB Monitor"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment