summaryrefslogtreecommitdiff
path: root/storage/spider
diff options
context:
space:
mode:
authorKentoku SHIBA <kentokushiba@gmail.com>2014-03-25 04:29:52 +0900
committerKentoku SHIBA <kentokushiba@gmail.com>2014-03-25 04:29:52 +0900
commitb7bb65d5490b569e0e601a92548e80801a1cbb81 (patch)
treec55d8ae271f22cc1031474815debf974ac4ba9d8 /storage/spider
parentad54787d55831bc4921526467e4f1e7d3a52ea19 (diff)
downloadmariadb-git-b7bb65d5490b569e0e601a92548e80801a1cbb81.tar.gz
fix for MariaDB 10.0.6 building error
Diffstat (limited to 'storage/spider')
-rw-r--r--storage/spider/ha_spider.cc8
-rw-r--r--storage/spider/ha_spider.h2
-rw-r--r--storage/spider/spd_db_conn.cc10
-rw-r--r--storage/spider/spd_db_mysql.cc6
-rw-r--r--storage/spider/spd_db_oracle.cc6
5 files changed, 27 insertions, 5 deletions
diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc
index db540572462..3c91d2f1094 100644
--- a/storage/spider/ha_spider.cc
+++ b/storage/spider/ha_spider.cc
@@ -813,10 +813,10 @@ int ha_spider::check_access_kind(
sql_command = thd_sql_command(thd);
#ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS
do_direct_update = FALSE;
- maybe_do_hs_direct_update = FALSE;
#endif
#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
#ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS
+ maybe_do_hs_direct_update = FALSE;
memset(do_hs_direct_update, 0, share->link_bitmap_size);
#endif
#endif
@@ -9347,11 +9347,13 @@ int ha_spider::direct_update_rows_init(
DBUG_PRINT("info",("spider offset_limit=%lld", offset_limit));
DBUG_PRINT("info",("spider mode=%u", mode));
+ DBUG_PRINT("info",("spider sql_command=%u", sql_command));
+#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
DBUG_PRINT("info",("spider maybe_do_hs_direct_update=%s",
maybe_do_hs_direct_update ? "TRUE" : "FALSE"));
- DBUG_PRINT("info",("spider sql_command=%u", sql_command));
DBUG_PRINT("info",("spider hs_pushed_ret_fields_num=%zu",
hs_pushed_ret_fields_num));
+#endif
DBUG_PRINT("info",("spider do_direct_update=%s",
do_direct_update ? "TRUE" : "FALSE"));
if (
@@ -12547,7 +12549,7 @@ int ha_spider::append_direct_update_set_hs_part()
#endif
#endif
-#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
+#ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS
int ha_spider::append_dup_update_pushdown_sql_part(
const char *alias,
uint alias_length
diff --git a/storage/spider/ha_spider.h b/storage/spider/ha_spider.h
index 60cab6d3ed0..0aa481af710 100644
--- a/storage/spider/ha_spider.h
+++ b/storage/spider/ha_spider.h
@@ -845,7 +845,7 @@ public:
int append_direct_update_set_hs_part();
#endif
#endif
-#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
+#ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS
int append_dup_update_pushdown_sql_part(
const char *alias,
uint alias_length
diff --git a/storage/spider/spd_db_conn.cc b/storage/spider/spd_db_conn.cc
index 48c4b6ce4c6..02108063ec1 100644
--- a/storage/spider/spd_db_conn.cc
+++ b/storage/spider/spd_db_conn.cc
@@ -6283,12 +6283,14 @@ int spider_db_direct_update(
) {
DBUG_RETURN(error_num);
}
+#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
if (
(spider->direct_update_kinds & SPIDER_SQL_KIND_HS) &&
(error_num = spider->append_direct_update_set_hs_part())
) {
DBUG_RETURN(error_num);
}
+#endif
}
#endif
#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
@@ -6323,6 +6325,7 @@ int spider_db_direct_update(
DBUG_RETURN(error_num);
}
}
+#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
if (spider->direct_update_kinds & SPIDER_SQL_KIND_HS)
{
if (
@@ -6337,6 +6340,7 @@ int spider_db_direct_update(
DBUG_RETURN(error_num);
}
}
+#endif
for (
roop_count = spider_conn_link_idx_next(share->link_statuses,
@@ -6455,9 +6459,9 @@ int spider_db_direct_update(
#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
if (!spider_bit_is_set(spider->do_hs_direct_update, roop_count))
{
+#endif
if (!counted)
{
-#endif
*update_rows = spider->conns[roop_count]->db_conn->affected_rows();
DBUG_PRINT("info", ("spider update_rows = %u", *update_rows));
counted = TRUE;
@@ -6747,6 +6751,7 @@ int spider_db_direct_delete(
DBUG_RETURN(error_num);
}
}
+#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
if (spider->direct_update_kinds & SPIDER_SQL_KIND_HS)
{
if (
@@ -6761,6 +6766,7 @@ int spider_db_direct_delete(
DBUG_RETURN(error_num);
}
}
+#endif
for (
roop_count = spider_conn_link_idx_next(share->link_statuses,
@@ -6926,6 +6932,7 @@ int spider_db_direct_delete(
if ((error_num = spider->reset_sql_sql(SPIDER_SQL_TYPE_DELETE_SQL)))
error_num2 = error_num;
}
+#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
if (spider->direct_update_kinds & SPIDER_SQL_KIND_HS)
{
if ((error_num = spider->reset_hs_sql(SPIDER_SQL_TYPE_DELETE_HS)))
@@ -6933,6 +6940,7 @@ int spider_db_direct_delete(
if ((error_num = spider->reset_hs_keys(SPIDER_SQL_TYPE_DELETE_HS)))
error_num2 = error_num;
}
+#endif
DBUG_RETURN(error_num2);
}
#endif
diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc
index 3cb744e6f85..0510e537210 100644
--- a/storage/spider/spd_db_mysql.cc
+++ b/storage/spider/spd_db_mysql.cc
@@ -5717,11 +5717,13 @@ int spider_mysql_handler::append_direct_update_set_part()
int spider_mysql_handler::append_direct_update_set(
spider_string *str
) {
+#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
uint field_name_length;
SPIDER_SHARE *share = spider->share;
#ifndef DBUG_OFF
TABLE *table = spider->get_table();
#endif
+#endif
DBUG_ENTER("spider_mysql_handler::append_direct_update_set");
if (
spider->direct_update_kinds == SPIDER_SQL_KIND_SQL &&
@@ -5737,6 +5739,7 @@ int spider_mysql_handler::append_direct_update_set(
if (
(spider->direct_update_kinds & SPIDER_SQL_KIND_SQL)
) {
+#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
size_t roop_count;
Field *field;
if (str->reserve(SPIDER_SQL_SET_LEN))
@@ -5788,6 +5791,9 @@ int spider_mysql_handler::append_direct_update_set(
str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
}
str->length(str->length() - SPIDER_SQL_COMMA_LEN);
+#else
+ DBUG_ASSERT(0);
+#endif
}
DBUG_RETURN(0);
}
diff --git a/storage/spider/spd_db_oracle.cc b/storage/spider/spd_db_oracle.cc
index 7a4ff1decaa..5c7e0e7ae64 100644
--- a/storage/spider/spd_db_oracle.cc
+++ b/storage/spider/spd_db_oracle.cc
@@ -5714,11 +5714,13 @@ int spider_oracle_handler::append_direct_update_set_part()
int spider_oracle_handler::append_direct_update_set(
spider_string *str
) {
+#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
uint field_name_length;
SPIDER_SHARE *share = spider->share;
#ifndef DBUG_OFF
TABLE *table = spider->get_table();
#endif
+#endif
DBUG_ENTER("spider_oracle_handler::append_direct_update_set");
if (
spider->direct_update_kinds == SPIDER_SQL_KIND_SQL &&
@@ -5733,6 +5735,7 @@ int spider_oracle_handler::append_direct_update_set(
if (
(spider->direct_update_kinds & SPIDER_SQL_KIND_SQL)
) {
+#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
size_t roop_count;
Field *field;
if (str->reserve(SPIDER_SQL_SET_LEN))
@@ -5784,6 +5787,9 @@ int spider_oracle_handler::append_direct_update_set(
str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
}
str->length(str->length() - SPIDER_SQL_COMMA_LEN);
+#else
+ DBUG_ASSERT(0);
+#endif
}
DBUG_RETURN(0);
}