Fix embedded innodb_plugin after 560799ebd8efe11f4c4ae1bb9ed4d39185e03800
wsrep_certification_rules: Define as a weak global symbol. While there are separate _embedded.a for statically linked storage engine plugins, there is only one ha_innodb.so which is supposed to work with both values of WITH_WSREP. The merge from 10.0-galera introduced a reference to a global variable that is only defined when the server is built WITH_WSREP. We must define that symbol as weak global, so that when a dynamically linked InnoDB or XtraDB is used with the embedded server (which never includes write-set replication patches), the variable will be read as 0, instead of causing a failure to load the InnoDB or XtraDB plugin.
This commit is contained in:
parent
a193c5720e
commit
c1e1764fc4
@ -21,6 +21,10 @@ enum enum_wsrep_certification_rules {
|
||||
WSREP_CERTIFICATION_RULES_OPTIMIZED
|
||||
};
|
||||
|
||||
extern ulong wsrep_certification_rules;
|
||||
/* This is intentionally declared as a weak global symbol, so that
|
||||
the same ha_innodb.so can be used with the embedded server
|
||||
(which does not link to the definition of this variable)
|
||||
and with the regular server built WITH_WSREP. */
|
||||
extern ulong wsrep_certification_rules __attribute__((weak));
|
||||
|
||||
#endif /* WSREP_MYSQLD_C_H */
|
||||
|
@ -56,6 +56,7 @@ Created 4/20/1996 Heikki Tuuri
|
||||
#include "m_string.h"
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
#include <mysql/service_wsrep.h>
|
||||
#include "../../../wsrep/wsrep_api.h"
|
||||
#include "wsrep_mysqld_c.h"
|
||||
#endif /* WITH_WSREP */
|
||||
@ -1645,6 +1646,9 @@ run_again:
|
||||
if (check_ref) {
|
||||
err = DB_SUCCESS;
|
||||
#ifdef WITH_WSREP
|
||||
if (!wsrep_on(trx->mysql_thd)) {
|
||||
goto end_scan;
|
||||
}
|
||||
enum wsrep_key_type key_type;
|
||||
if (upd_node != NULL) {
|
||||
key_type = WSREP_KEY_SHARED;
|
||||
@ -1661,7 +1665,7 @@ run_again:
|
||||
}
|
||||
|
||||
err = wsrep_append_foreign_key(
|
||||
thr_get_trx(thr),
|
||||
trx,
|
||||
foreign,
|
||||
rec,
|
||||
check_index,
|
||||
|
@ -56,6 +56,7 @@ Created 4/20/1996 Heikki Tuuri
|
||||
#include "m_string.h"
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
#include <mysql/service_wsrep.h>
|
||||
#include "../../../wsrep/wsrep_api.h"
|
||||
#include "wsrep_mysqld_c.h"
|
||||
#endif /* WITH_WSREP */
|
||||
@ -1657,6 +1658,9 @@ run_again:
|
||||
if (check_ref) {
|
||||
err = DB_SUCCESS;
|
||||
#ifdef WITH_WSREP
|
||||
if (!wsrep_on(trx->mysql_thd)) {
|
||||
goto end_scan;
|
||||
}
|
||||
enum wsrep_key_type key_type;
|
||||
if (upd_node != NULL) {
|
||||
key_type = WSREP_KEY_SHARED;
|
||||
@ -1673,7 +1677,7 @@ run_again:
|
||||
}
|
||||
|
||||
err = wsrep_append_foreign_key(
|
||||
thr_get_trx(thr),
|
||||
trx,
|
||||
foreign,
|
||||
rec,
|
||||
check_index,
|
||||
|
Loading…
x
Reference in New Issue
Block a user