Commit a6246cab authored by Sergei Golubchik's avatar Sergei Golubchik

fix failures of innodb_plugin tests in --embedded

Post-fix for 7e8ed15b

Also, apply the same innodb fix to xtradb.
parent c2727547
...@@ -110,6 +110,7 @@ extern struct wsrep_service_st { ...@@ -110,6 +110,7 @@ extern struct wsrep_service_st {
int (*wsrep_trx_is_aborting_func)(MYSQL_THD thd); int (*wsrep_trx_is_aborting_func)(MYSQL_THD thd);
int (*wsrep_trx_order_before_func)(MYSQL_THD, MYSQL_THD); int (*wsrep_trx_order_before_func)(MYSQL_THD, MYSQL_THD);
void (*wsrep_unlock_rollback_func)(); void (*wsrep_unlock_rollback_func)();
void (*wsrep_set_data_home_dir_func)(const char *data_dir);
} *wsrep_service; } *wsrep_service;
#ifdef MYSQL_DYNAMIC_PLUGIN #ifdef MYSQL_DYNAMIC_PLUGIN
...@@ -151,6 +152,7 @@ extern struct wsrep_service_st { ...@@ -151,6 +152,7 @@ extern struct wsrep_service_st {
#define wsrep_trx_is_aborting(T) wsrep_service->wsrep_trx_is_aborting_func(T) #define wsrep_trx_is_aborting(T) wsrep_service->wsrep_trx_is_aborting_func(T)
#define wsrep_trx_order_before(T1,T2) wsrep_service->wsrep_trx_order_before_func(T1,T2) #define wsrep_trx_order_before(T1,T2) wsrep_service->wsrep_trx_order_before_func(T1,T2)
#define wsrep_unlock_rollback() wsrep_service->wsrep_unlock_rollback_func() #define wsrep_unlock_rollback() wsrep_service->wsrep_unlock_rollback_func()
#define wsrep_set_data_home_dir(A) wsrep_service->wsrep_set_data_home_dir_func(A)
#define wsrep_debug get_wsrep_debug() #define wsrep_debug get_wsrep_debug()
#define wsrep_log_conflicts get_wsrep_log_conflicts() #define wsrep_log_conflicts get_wsrep_log_conflicts()
...@@ -208,6 +210,7 @@ void wsrep_thd_awake(THD *thd, my_bool signal); ...@@ -208,6 +210,7 @@ void wsrep_thd_awake(THD *thd, my_bool signal);
void wsrep_thd_set_conflict_state(THD *thd, enum wsrep_conflict_state state); void wsrep_thd_set_conflict_state(THD *thd, enum wsrep_conflict_state state);
bool wsrep_thd_ignore_table(THD *thd); bool wsrep_thd_ignore_table(THD *thd);
void wsrep_unlock_rollback(); void wsrep_unlock_rollback();
void wsrep_set_data_home_dir(const char *data_dir);
#endif #endif
......
...@@ -41,4 +41,4 @@ ...@@ -41,4 +41,4 @@
#define VERSION_thd_specifics 0x0100 #define VERSION_thd_specifics 0x0100
#define VERSION_thd_timezone 0x0100 #define VERSION_thd_timezone 0x0100
#define VERSION_thd_wait 0x0100 #define VERSION_thd_wait 0x0100
#define VERSION_wsrep 0x0201 #define VERSION_wsrep 0x0202
...@@ -179,7 +179,8 @@ static struct wsrep_service_st wsrep_handler = { ...@@ -179,7 +179,8 @@ static struct wsrep_service_st wsrep_handler = {
wsrep_thd_ws_handle, wsrep_thd_ws_handle,
wsrep_trx_is_aborting, wsrep_trx_is_aborting,
wsrep_trx_order_before, wsrep_trx_order_before,
wsrep_unlock_rollback wsrep_unlock_rollback,
wsrep_set_data_home_dir
}; };
static struct thd_specifics_service_st thd_specifics_handler= static struct thd_specifics_service_st thd_specifics_handler=
......
...@@ -130,3 +130,6 @@ int wsrep_trx_is_aborting(THD *) ...@@ -130,3 +130,6 @@ int wsrep_trx_is_aborting(THD *)
void wsrep_unlock_rollback() void wsrep_unlock_rollback()
{ } { }
void wsrep_set_data_home_dir(const char *)
{ }
...@@ -160,7 +160,6 @@ extern "C" time_t wsrep_thd_query_start(THD *thd); ...@@ -160,7 +160,6 @@ extern "C" time_t wsrep_thd_query_start(THD *thd);
extern "C" query_id_t wsrep_thd_query_id(THD *thd); extern "C" query_id_t wsrep_thd_query_id(THD *thd);
extern "C" query_id_t wsrep_thd_wsrep_last_query_id(THD *thd); extern "C" query_id_t wsrep_thd_wsrep_last_query_id(THD *thd);
extern "C" void wsrep_thd_set_wsrep_last_query_id(THD *thd, query_id_t id); extern "C" void wsrep_thd_set_wsrep_last_query_id(THD *thd, query_id_t id);
extern "C" void wsrep_set_data_home_dir(const char *data_dir);
extern void wsrep_close_client_connections(my_bool wait_to_end); extern void wsrep_close_client_connections(my_bool wait_to_end);
extern int wsrep_wait_committing_connections_close(int wait_time); extern int wsrep_wait_committing_connections_close(int wait_time);
......
...@@ -70,7 +70,6 @@ bool wsrep_sst_method_update (sys_var *self, THD* thd, enum_var_type type) ...@@ -70,7 +70,6 @@ bool wsrep_sst_method_update (sys_var *self, THD* thd, enum_var_type type)
static const char* data_home_dir = NULL; static const char* data_home_dir = NULL;
extern "C"
void wsrep_set_data_home_dir(const char *data_dir) void wsrep_set_data_home_dir(const char *data_dir)
{ {
data_home_dir= (data_dir && *data_dir) ? data_dir : NULL; data_home_dir= (data_dir && *data_dir) ? data_dir : NULL;
......
...@@ -4072,6 +4072,11 @@ innobase_init( ...@@ -4072,6 +4072,11 @@ innobase_init(
srv_data_home = (innobase_data_home_dir ? innobase_data_home_dir : srv_data_home = (innobase_data_home_dir ? innobase_data_home_dir :
default_path); default_path);
#ifdef WITH_WSREP
/* If we use the wsrep API, then we need to tell the server
the path to the data files (for passing it to the SST scripts): */
wsrep_set_data_home_dir(innobase_data_home_dir);
#endif /* WITH_WSREP */
/* Set default InnoDB data file size to 12 MB and let it be /* Set default InnoDB data file size to 12 MB and let it be
auto-extending. Thus users can use InnoDB in >= 4.0 without having auto-extending. Thus users can use InnoDB in >= 4.0 without having
......
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