Commit eba0120d authored by Jan Lindström's avatar Jan Lindström

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.
parent f1af2114
......@@ -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
{
......
......@@ -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
......
......@@ -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 */
......
......@@ -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 @@ innobase_start_or_create_for_mysql()
--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 @@ innobase_start_or_create_for_mysql()
"recovery.");
}
#endif /* WITH_WSREP */
}
srv_was_started = TRUE;
......
......@@ -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 */
......
......@@ -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,
......
......@@ -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 */
/*****************************************************************//**
......
......@@ -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.
......
......@@ -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 */
......
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