Commit de444161 authored by Kentoku SHIBA's avatar Kentoku SHIBA

fix for Spider build error by abort_loop on windows

parent 29cf8fb3
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include "spd_table.h" #include "spd_table.h"
extern struct charset_info_st *spd_charset_utf8_bin; extern struct charset_info_st *spd_charset_utf8_bin;
extern bool volatile *spd_abort_loop;
extern handlerton *spider_hton_ptr; extern handlerton *spider_hton_ptr;
extern pthread_mutex_t spider_open_conn_mutex; extern pthread_mutex_t spider_open_conn_mutex;
...@@ -1504,10 +1505,10 @@ int spider_db_mysql::connect( ...@@ -1504,10 +1505,10 @@ int spider_db_mysql::connect(
DBUG_PRINT("info",("spider thd->killed=%s", DBUG_PRINT("info",("spider thd->killed=%s",
thd ? (thd->killed ? "TRUE" : "FALSE") : "NULL")); thd ? (thd->killed ? "TRUE" : "FALSE") : "NULL"));
DBUG_PRINT("info",("spider abort_loop=%s", DBUG_PRINT("info",("spider abort_loop=%s",
abort_loop ? "TRUE" : "FALSE")); *spd_abort_loop ? "TRUE" : "FALSE"));
if ( if (
(thd && thd->killed) || (thd && thd->killed) ||
abort_loop *spd_abort_loop
) { ) {
DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM); DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
} }
...@@ -1581,10 +1582,10 @@ int spider_db_mysql::connect( ...@@ -1581,10 +1582,10 @@ int spider_db_mysql::connect(
DBUG_PRINT("info",("spider thd->killed=%s", DBUG_PRINT("info",("spider thd->killed=%s",
thd ? (thd->killed ? "TRUE" : "FALSE") : "NULL")); thd ? (thd->killed ? "TRUE" : "FALSE") : "NULL"));
DBUG_PRINT("info",("spider abort_loop=%s", DBUG_PRINT("info",("spider abort_loop=%s",
abort_loop ? "TRUE" : "FALSE")); *spd_abort_loop ? "TRUE" : "FALSE"));
if ( if (
(thd && thd->killed) || (thd && thd->killed) ||
abort_loop *spd_abort_loop
) { ) {
DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM); DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
} }
......
...@@ -40,6 +40,8 @@ ...@@ -40,6 +40,8 @@
#include "spd_udf.h" #include "spd_udf.h"
#include "spd_malloc.h" #include "spd_malloc.h"
extern bool volatile *spd_abort_loop;
extern handlerton *spider_hton_ptr; extern handlerton *spider_hton_ptr;
#ifdef HAVE_PSI_INTERFACE #ifdef HAVE_PSI_INTERFACE
...@@ -1276,10 +1278,10 @@ int spider_ping_table_mon_from_table( ...@@ -1276,10 +1278,10 @@ int spider_ping_table_mon_from_table(
DBUG_PRINT("info",("spider thd->killed=%s", DBUG_PRINT("info",("spider thd->killed=%s",
thd ? (thd->killed ? "TRUE" : "FALSE") : "NULL")); thd ? (thd->killed ? "TRUE" : "FALSE") : "NULL"));
DBUG_PRINT("info",("spider abort_loop=%s", DBUG_PRINT("info",("spider abort_loop=%s",
abort_loop ? "TRUE" : "FALSE")); *spd_abort_loop ? "TRUE" : "FALSE"));
if ( if (
(thd && thd->killed) || (thd && thd->killed) ||
abort_loop *spd_abort_loop
) { ) {
DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM); DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
} }
...@@ -1338,10 +1340,10 @@ int spider_ping_table_mon_from_table( ...@@ -1338,10 +1340,10 @@ int spider_ping_table_mon_from_table(
DBUG_PRINT("info",("spider thd->killed=%s", DBUG_PRINT("info",("spider thd->killed=%s",
thd ? (thd->killed ? "TRUE" : "FALSE") : "NULL")); thd ? (thd->killed ? "TRUE" : "FALSE") : "NULL"));
DBUG_PRINT("info",("spider abort_loop=%s", DBUG_PRINT("info",("spider abort_loop=%s",
abort_loop ? "TRUE" : "FALSE")); *spd_abort_loop ? "TRUE" : "FALSE"));
if ( if (
(thd && thd->killed) || (thd && thd->killed) ||
abort_loop *spd_abort_loop
) { ) {
error_num = ER_SPIDER_COND_SKIP_NUM; error_num = ER_SPIDER_COND_SKIP_NUM;
break; break;
...@@ -1449,10 +1451,10 @@ int spider_ping_table_mon_from_table( ...@@ -1449,10 +1451,10 @@ int spider_ping_table_mon_from_table(
DBUG_PRINT("info",("spider thd->killed=%s", DBUG_PRINT("info",("spider thd->killed=%s",
thd ? (thd->killed ? "TRUE" : "FALSE") : "NULL")); thd ? (thd->killed ? "TRUE" : "FALSE") : "NULL"));
DBUG_PRINT("info",("spider abort_loop=%s", DBUG_PRINT("info",("spider abort_loop=%s",
abort_loop ? "TRUE" : "FALSE")); *spd_abort_loop ? "TRUE" : "FALSE"));
if ( if (
(thd && thd->killed) || (thd && thd->killed) ||
abort_loop *spd_abort_loop
) { ) {
error_num = ER_SPIDER_COND_SKIP_NUM; error_num = ER_SPIDER_COND_SKIP_NUM;
} else { } else {
......
...@@ -51,6 +51,7 @@ HASH *spd_db_att_xid_cache; ...@@ -51,6 +51,7 @@ HASH *spd_db_att_xid_cache;
struct charset_info_st *spd_charset_utf8_bin; struct charset_info_st *spd_charset_utf8_bin;
const char **spd_defaults_extra_file; const char **spd_defaults_extra_file;
const char **spd_defaults_file; const char **spd_defaults_file;
bool volatile *spd_abort_loop;
handlerton *spider_hton_ptr; handlerton *spider_hton_ptr;
SPIDER_DBTON spider_dbton[SPIDER_DBTON_SIZE]; SPIDER_DBTON spider_dbton[SPIDER_DBTON_SIZE];
...@@ -6215,6 +6216,8 @@ int spider_db_init( ...@@ -6215,6 +6216,8 @@ int spider_db_init(
GetProcAddress(current_module, "my_defaults_extra_file"); GetProcAddress(current_module, "my_defaults_extra_file");
spd_defaults_file = (const char **) spd_defaults_file = (const char **)
GetProcAddress(current_module, "my_defaults_file"); GetProcAddress(current_module, "my_defaults_file");
spd_abort_loop = (bool volatile *)
GetProcAddress(current_module, "?abort_loop@@3_NC");
#else #else
spd_db_att_thread_id = &thread_id; spd_db_att_thread_id = &thread_id;
#ifdef XID_CACHE_IS_SPLITTED #ifdef XID_CACHE_IS_SPLITTED
...@@ -6228,6 +6231,7 @@ int spider_db_init( ...@@ -6228,6 +6231,7 @@ int spider_db_init(
spd_charset_utf8_bin = &my_charset_utf8_bin; spd_charset_utf8_bin = &my_charset_utf8_bin;
spd_defaults_extra_file = &my_defaults_extra_file; spd_defaults_extra_file = &my_defaults_extra_file;
spd_defaults_file = &my_defaults_file; spd_defaults_file = &my_defaults_file;
spd_abort_loop = &abort_loop;
#endif #endif
#ifdef HAVE_PSI_INTERFACE #ifdef HAVE_PSI_INTERFACE
......
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