summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2017-08-31 08:27:59 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2017-08-31 14:04:02 +0300
commiteba0120d8f01399007441f839032f36ed178084f (patch)
treeee2b45672233b1d20bcbc2f4ec32421915d92ac6
parentf1af2114993f884b1a6dc34fb1d972ead08f1966 (diff)
downloadmariadb-git-eba0120d8f01399007441f839032f36ed178084f.tar.gz
Fix test failures on embedded server.
Problem was incorrect definition of wsrep_recovery, trx_sys_update_wsrep_checkpoint and trx_sys_read_wsrep_checkpoint functions causing innodb_plugin not to load as there was undefined symbols.
-rw-r--r--sql/wsrep_sst.cc3
-rw-r--r--storage/innobase/buf/buf0dump.cc10
-rw-r--r--storage/innobase/include/trx0sys.h7
-rw-r--r--storage/innobase/srv/srv0start.cc8
-rw-r--r--storage/innobase/trx/trx0sys.cc12
-rw-r--r--storage/xtradb/buf/buf0dump.cc4
-rw-r--r--storage/xtradb/include/trx0sys.h10
-rw-r--r--storage/xtradb/srv/srv0start.cc6
-rw-r--r--storage/xtradb/trx/trx0sys.cc12
9 files changed, 41 insertions, 31 deletions
diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc
index 818cb3f28fd..e4ec1adb35f 100644
--- a/sql/wsrep_sst.cc
+++ b/sql/wsrep_sst.cc
@@ -364,7 +364,8 @@ static int generate_binlog_opt_val(char** ret)
if (opt_bin_log)
{
assert(opt_bin_logname);
- *ret= my_strdup(opt_bin_logname, MYF(0));
+ *ret= strcmp(opt_bin_logname, "0") ?
+ my_strdup(opt_bin_logname, MYF(0)) : my_strdup("", MYF(0));
}
else
{
diff --git a/storage/innobase/buf/buf0dump.cc b/storage/innobase/buf/buf0dump.cc
index 0682b8ef46e..bc7f550c090 100644
--- a/storage/innobase/buf/buf0dump.cc
+++ b/storage/innobase/buf/buf0dump.cc
@@ -41,9 +41,7 @@ Created April 08, 2011 Vasil Dimov
#include "sync0rw.h" /* rw_lock_s_lock() */
#include "ut0byte.h" /* ut_ull_create() */
#include "ut0sort.h" /* UT_SORT_FUNCTION_BODY */
-#ifdef WITH_WSREP
-extern my_bool wsrep_recovery;
-#endif /* WITH_WSREP */
+#include "wsrep_mysqld.h" /* wsrep_recovery */
enum status_severity {
STATUS_INFO,
@@ -692,12 +690,13 @@ DECLARE_THREAD(buf_dump_thread)(
buf_load_status(STATUS_INFO, "not started");
if (srv_buffer_pool_load_at_startup) {
+
#ifdef WITH_WSREP
if (!wsrep_recovery) {
#endif /* WITH_WSREP */
- buf_load();
+ buf_load();
#ifdef WITH_WSREP
- }
+ }
#endif /* WITH_WSREP */
}
@@ -725,6 +724,7 @@ DECLARE_THREAD(buf_dump_thread)(
#ifdef WITH_WSREP
if (!wsrep_recovery) {
#endif /* WITH_WSREP */
+
buf_dump(FALSE /* ignore shutdown down flag,
keep going even if we are in a shutdown state */);
#ifdef WITH_WSREP
diff --git a/storage/innobase/include/trx0sys.h b/storage/innobase/include/trx0sys.h
index 83814d088f3..f70c53b57e6 100644
--- a/storage/innobase/include/trx0sys.h
+++ b/storage/innobase/include/trx0sys.h
@@ -315,6 +315,7 @@ trx_sys_print_mysql_binlog_offset(void);
@param[in] xid Transaction XID
@param[in,out] sys_header sys_header
@param[in] mtr minitransaction */
+UNIV_INTERN
void
trx_sys_update_wsrep_checkpoint(
const XID* xid,
@@ -322,8 +323,10 @@ trx_sys_update_wsrep_checkpoint(
mtr_t* mtr);
/** Read WSREP XID from sys_header of TRX_SYS_PAGE_NO = 5.
-@param[out] xid Transaction XID */
-void
+@param[out] xid Transaction XID
+@return true on success, false on error. */
+UNIV_INTERN
+bool
trx_sys_read_wsrep_checkpoint(XID* xid);
#endif /* WITH_WSREP */
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc
index 62605262de5..c62c848c705 100644
--- a/storage/innobase/srv/srv0start.cc
+++ b/storage/innobase/srv/srv0start.cc
@@ -67,6 +67,8 @@ Created 2/16/1996 Heikki Tuuri
#include "ibuf0ibuf.h"
#include "srv0start.h"
#include "srv0srv.h"
+#include "wsrep_mysqld.h" /* wsrep_recovery */
+
#ifndef UNIV_HOTBACKUP
# include "trx0rseg.h"
# include "os0proc.h"
@@ -178,10 +180,6 @@ UNIV_INTERN mysql_pfs_key_t srv_master_thread_key;
UNIV_INTERN mysql_pfs_key_t srv_purge_thread_key;
#endif /* UNIV_PFS_THREAD */
-#ifdef WITH_WSREP
-extern my_bool wsrep_recovery;
-#endif /* WITH_WSREP */
-
/*********************************************************************//**
Convert a numeric string that optionally ends in G or M or K, to a number
containing megabytes.
@@ -2904,6 +2902,7 @@ files_checked:
--wsrep-recover */
if (!wsrep_recovery) {
#endif /* WITH_WSREP */
+
/* Create the buffer pool dump/load thread */
buf_dump_thread_handle = os_thread_create(buf_dump_thread, NULL, NULL);
buf_dump_thread_started = true;
@@ -2914,6 +2913,7 @@ files_checked:
"recovery.");
}
#endif /* WITH_WSREP */
+
}
srv_was_started = TRUE;
diff --git a/storage/innobase/trx/trx0sys.cc b/storage/innobase/trx/trx0sys.cc
index 152813d9f3b..68fc0e54351 100644
--- a/storage/innobase/trx/trx0sys.cc
+++ b/storage/innobase/trx/trx0sys.cc
@@ -346,6 +346,7 @@ static inline void read_wsrep_xid_uuid(const XID* xid, unsigned char* buf)
@param[in] xid Transaction XID
@param[in,out] sys_header sys_header
@param[in] mtr minitransaction */
+UNIV_INTERN
void
trx_sys_update_wsrep_checkpoint(
const XID* xid,
@@ -404,8 +405,10 @@ trx_sys_update_wsrep_checkpoint(
}
/** Read WSREP XID from sys_header of TRX_SYS_PAGE_NO = 5.
-@param[out] xid Transaction XID */
-void
+@param[out] xid Transaction XID
+@return true on success, false on error. */
+UNIV_INTERN
+bool
trx_sys_read_wsrep_checkpoint(XID* xid)
{
trx_sysf_t* sys_header;
@@ -425,8 +428,8 @@ trx_sys_read_wsrep_checkpoint(XID* xid)
xid->formatID = -1;
trx_sys_update_wsrep_checkpoint(xid, sys_header, &mtr);
mtr_commit(&mtr);
- return;
- }
+ return false;
+ }
xid->formatID = (int)mach_read_from_4(
sys_header
@@ -442,6 +445,7 @@ trx_sys_read_wsrep_checkpoint(XID* xid)
XIDDATASIZE);
mtr_commit(&mtr);
+ return true;
}
#endif /* WITH_WSREP */
diff --git a/storage/xtradb/buf/buf0dump.cc b/storage/xtradb/buf/buf0dump.cc
index d0892a4f6a5..09ac460f865 100644
--- a/storage/xtradb/buf/buf0dump.cc
+++ b/storage/xtradb/buf/buf0dump.cc
@@ -41,9 +41,7 @@ Created April 08, 2011 Vasil Dimov
#include "sync0rw.h" /* rw_lock_s_lock() */
#include "ut0byte.h" /* ut_ull_create() */
#include "ut0sort.h" /* UT_SORT_FUNCTION_BODY */
-#ifdef WITH_WSREP
-extern my_bool wsrep_recovery;
-#endif /* WITH_WSREP */
+#include "wsrep_mysqld.h" /* wsrep_recovery */
enum status_severity {
STATUS_INFO,
diff --git a/storage/xtradb/include/trx0sys.h b/storage/xtradb/include/trx0sys.h
index 7f06d3247a1..3d7cb983eeb 100644
--- a/storage/xtradb/include/trx0sys.h
+++ b/storage/xtradb/include/trx0sys.h
@@ -336,17 +336,19 @@ trx_sys_print_mysql_binlog_offset(void);
@param[in] xid Transaction XID
@param[in,out] sys_header sys_header
@param[in] mtr minitransaction */
+UNIV_INTERN
void
trx_sys_update_wsrep_checkpoint(
const XID* xid,
trx_sysf_t* sys_header,
mtr_t* mtr);
-/** Read WSREP XID from sys_header of TRX_SYS_PAGE_NO = 5.
-@param[out] xid Transaction XID */
-void
+/** Read WSREP checkpoint XID from sys header.
+@param[out] xid Transaction XID
+@return true on success, false on error. */
+UNIV_INTERN
+bool
trx_sys_read_wsrep_checkpoint(XID* xid);
-
#endif /* WITH_WSREP */
/*****************************************************************//**
diff --git a/storage/xtradb/srv/srv0start.cc b/storage/xtradb/srv/srv0start.cc
index 63d92f37a52..b2b3a9299cc 100644
--- a/storage/xtradb/srv/srv0start.cc
+++ b/storage/xtradb/srv/srv0start.cc
@@ -68,6 +68,8 @@ Created 2/16/1996 Heikki Tuuri
#include "ibuf0ibuf.h"
#include "srv0start.h"
#include "srv0srv.h"
+#include "wsrep_mysqld.h" /* wsrep_recovery */
+
#ifndef UNIV_HOTBACKUP
# include "trx0rseg.h"
# include "os0proc.h"
@@ -196,10 +198,6 @@ UNIV_INTERN mysql_pfs_key_t srv_purge_thread_key;
UNIV_INTERN mysql_pfs_key_t srv_log_tracking_thread_key;
#endif /* UNIV_PFS_THREAD */
-#ifdef WITH_WSREP
-extern my_bool wsrep_recovery;
-#endif /* WITH_WSREP */
-
/*********************************************************************//**
Convert a numeric string that optionally ends in G or M or K, to a number
containing megabytes.
diff --git a/storage/xtradb/trx/trx0sys.cc b/storage/xtradb/trx/trx0sys.cc
index 8c11d22489a..eb429b749fa 100644
--- a/storage/xtradb/trx/trx0sys.cc
+++ b/storage/xtradb/trx/trx0sys.cc
@@ -346,6 +346,7 @@ static inline void read_wsrep_xid_uuid(const XID* xid, unsigned char* buf)
@param[in] xid Transaction XID
@param[in,out] sys_header sys_header
@param[in] mtr minitransaction */
+UNIV_INTERN
void
trx_sys_update_wsrep_checkpoint(
const XID* xid,
@@ -404,8 +405,10 @@ trx_sys_update_wsrep_checkpoint(
}
/** Read WSREP XID from sys_header of TRX_SYS_PAGE_NO = 5.
-@param[out] xid Transaction XID */
-void
+@param[out] xid Transaction XID
+@retval true if found, false if not */
+UNIV_INTERN
+bool
trx_sys_read_wsrep_checkpoint(XID* xid)
{
trx_sysf_t* sys_header;
@@ -425,8 +428,8 @@ trx_sys_read_wsrep_checkpoint(XID* xid)
xid->formatID = -1;
trx_sys_update_wsrep_checkpoint(xid, sys_header, &mtr);
mtr_commit(&mtr);
- return;
- }
+ return false;
+ }
xid->formatID = (int)mach_read_from_4(
sys_header
@@ -442,6 +445,7 @@ trx_sys_read_wsrep_checkpoint(XID* xid)
XIDDATASIZE);
mtr_commit(&mtr);
+ return true;
}
#endif /* WITH_WSREP */