From 7d2a0e9da45fb66659493767fa3adda1e7ef499d Mon Sep 17 00:00:00 2001 From: Seppo Jaakola Date: Sat, 15 Jun 2013 16:15:17 +0300 Subject: [PATCH] References lp:1108035 - merged fix from http://bazaar.launchpad.net/~percona-core/percona-xtradb-cluster/release-5.5.31/revision/394 --- storage/xtradb/os/os0proc.c | 9 +++++++++ storage/xtradb/srv/srv0start.c | 12 +++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/storage/xtradb/os/os0proc.c b/storage/xtradb/os/os0proc.c index c9ee707e923..9ce04602082 100644 --- a/storage/xtradb/os/os0proc.c +++ b/storage/xtradb/os/os0proc.c @@ -57,6 +57,9 @@ UNIV_INTERN ibool os_use_large_pages; /* Large page size. This may be a boot-time option on some platforms */ UNIV_INTERN ulint os_large_page_size; +#ifdef WITH_WSREP +extern my_bool wsrep_recovery; +#endif /* WITH_WSREP */ /****************************************************************//** Converts the current process id to a number. It is not guaranteed that the number is unique. In Linux returns the 'process number' of the current @@ -183,6 +186,12 @@ skip: # else size = UNIV_PAGE_SIZE; # endif +#ifdef WITH_WSREP + /* Don't populate if wsrep_recovery is ON */ + if (wsrep_recovery) { + populate = FALSE; + } +#endif /* WITH_WSREP */ /* Align block size to system page size */ ut_ad(ut_is_2pow(size)); size = *n = ut_2pow_round(*n + (size - 1), size); diff --git a/storage/xtradb/srv/srv0start.c b/storage/xtradb/srv/srv0start.c index 9e0477253cd..3c930beb00e 100644 --- a/storage/xtradb/srv/srv0start.c +++ b/storage/xtradb/srv/srv0start.c @@ -90,7 +90,10 @@ Created 2/16/1996 Heikki Tuuri # include "zlib.h" /* for ZLIB_VERSION */ # include "buf0lru.h" /* for buf_LRU_file_restore() */ -/** Log sequence number immediately after startup */ +#ifdef WITH_WSREP +extern my_bool wsrep_recovery; +#endif /* WITH_WSREP */ + /** Log sequence number immediately after startup */ UNIV_INTERN ib_uint64_t srv_start_lsn; /** Log sequence number at shutdown */ UNIV_INTERN ib_uint64_t srv_shutdown_lsn; @@ -2058,6 +2061,10 @@ innobase_start_or_create_for_mysql(void) os_thread_create(&srv_monitor_thread, NULL, thread_ids + 4 + SRV_MAX_N_IO_THREADS); +#ifdef WITH_WSREP + /* Don't start the LRU thread when recovery is on */ + if (!wsrep_recovery) { +#endif /* WITH_WSREP */ /* Create the thread which automaticaly dumps/restore buffer pool */ os_thread_create(&srv_LRU_dump_restore_thread, NULL, thread_ids + 5 + SRV_MAX_N_IO_THREADS); @@ -2066,6 +2073,9 @@ innobase_start_or_create_for_mysql(void) synchronously */ if (srv_auto_lru_dump && srv_blocking_lru_restore) buf_LRU_file_restore(); +#ifdef WITH_WSREP + } +#endif /* WITH_WSREP */ srv_is_being_started = FALSE;