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.
This commit is contained in:
Jan Lindström 2017-08-31 08:27:59 +03:00
parent 1831042279
commit b29f26d774
8 changed files with 30 additions and 20 deletions

View File

@ -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 "mysql/service_wsrep.h" /* wsrep_recovery */
enum status_severity {
STATUS_INFO,
@ -695,12 +693,13 @@ DECLARE_THREAD(buf_dump_thread)(void*)
buf_load_status(STATUS_INFO, "Loading buffer pool(s) not yet 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 */
}
@ -728,6 +727,7 @@ DECLARE_THREAD(buf_dump_thread)(void*)
#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

View File

@ -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 */

View File

@ -70,8 +70,7 @@ Created 2/16/1996 Heikki Tuuri
#include "srv0start.h"
#include "srv0srv.h"
#include "btr0defragment.h"
#include <mysql/service_wsrep.h>
#include "mysql/service_wsrep.h" /* wsrep_recovery */
#ifndef UNIV_HOTBACKUP
# include "trx0rseg.h"
@ -3014,6 +3013,7 @@ files_checked:
*/
if (!wsrep_recovery) {
#endif /* WITH_WSREP */
/* Create the buffer pool dump/load thread */
srv_buf_dump_thread_active = true;
buf_dump_thread_handle=
@ -3027,6 +3027,7 @@ files_checked:
"wsrep recovery.");
}
#endif /* WITH_WSREP */
/* Create thread(s) that handles key rotation */
fil_system_enter();
fil_crypt_threads_init();

View File

@ -344,6 +344,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,
@ -402,8 +403,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;
@ -423,8 +426,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
@ -440,6 +443,7 @@ trx_sys_read_wsrep_checkpoint(XID* xid)
XIDDATASIZE);
mtr_commit(&mtr);
return true;
}
#endif /* WITH_WSREP */

View File

@ -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 "mysql/service_wsrep.h" /* wsrep_recovery */
enum status_severity {
STATUS_INFO,

View File

@ -336,14 +336,17 @@ 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 checkpoint XID from sys header.
/** 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); /*!< out: WSREP XID */

View File

@ -73,8 +73,7 @@ Created 2/16/1996 Heikki Tuuri
#include "btr0defragment.h"
#include "ut0timer.h"
#include "btr0scrub.h"
#include <mysql/service_wsrep.h>
#include "mysql/service_wsrep.h" /* wsrep_recovery */
#ifndef UNIV_HOTBACKUP
# include "trx0rseg.h"

View File

@ -348,6 +348,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,
@ -406,8 +407,9 @@ trx_sys_update_wsrep_checkpoint(
}
/** Read WSREP XID from sys_header of TRX_SYS_PAGE_NO = 5.
@param[out] xid Transaction XID
@param[out] xid Transaction XID
@retval true if found, false if not */
UNIV_INTERN
bool
trx_sys_read_wsrep_checkpoint(XID* xid)
{