summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAditya A <aditya.a@oracle.com>2013-07-29 14:45:06 +0530
committerAditya A <aditya.a@oracle.com>2013-07-29 14:45:06 +0530
commit1c4a3c52fdacd583d73c3df6c0fb1f975ea098c2 (patch)
treee0d64b18f9e6a33971003016f7997056feca12ac
parenta1ccfcf84d6528134d6c2b1e51182822821ca6ab (diff)
downloadmariadb-git-1c4a3c52fdacd583d73c3df6c0fb1f975ea098c2.tar.gz
Bug#13417564 SKIP SLEEP IN SRV_MASTER_THREAD WHEN
SHUTDOWN IS IN PROGRESS PROBLEM ------- In the background thread srv_master_thread() we have a a one second delay loop which will continuously monitor server activity .If the server is inactive (with out any user activity) or in a shutdown state we do some background activity like flushing the changes.In the current code we are not checking if server is in shutdown state before sleeping for one second. FIX --- If server is in shutdown state ,then dont go to one second sleep.
-rw-r--r--storage/innobase/srv/srv0srv.c4
-rw-r--r--storage/innodb_plugin/srv/srv0srv.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
index e5619abbe45..f615384777c 100644
--- a/storage/innobase/srv/srv0srv.c
+++ b/storage/innobase/srv/srv0srv.c
@@ -2432,7 +2432,7 @@ loop:
by x100 (1purge/100msec), to speed up debug scripts
which should wait for purged. */
- if (!skip_sleep) {
+ if (!skip_sleep && !srv_shutdown_state) {
os_thread_sleep(100000);
}
@@ -2448,7 +2448,7 @@ loop:
} while (n_pages_purged);
} else
#endif /* UNIV_DEBUG */
- if (!skip_sleep) {
+ if (!skip_sleep && !srv_shutdown_state) {
os_thread_sleep(1000000);
}
diff --git a/storage/innodb_plugin/srv/srv0srv.c b/storage/innodb_plugin/srv/srv0srv.c
index f27f9e37c31..a54a8088a9b 100644
--- a/storage/innodb_plugin/srv/srv0srv.c
+++ b/storage/innodb_plugin/srv/srv0srv.c
@@ -2518,7 +2518,7 @@ loop:
by x100 (1purge/100msec), to speed up debug scripts
which should wait for purged. */
- if (!skip_sleep) {
+ if (!skip_sleep && !srv_shutdown_state) {
os_thread_sleep(100000);
srv_main_sleeps++;
}
@@ -2535,7 +2535,7 @@ loop:
} while (n_pages_purged);
} else
#endif /* UNIV_DEBUG */
- if (!skip_sleep) {
+ if (!skip_sleep && !srv_shutdown_state) {
os_thread_sleep(1000000);
srv_main_sleeps++;