mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-27650 Spider: remove #ifdef SPIDER_HAS_GROUP_BY_HANDLER
This commit is contained in:
@@ -87,9 +87,7 @@ ha_spider::ha_spider(
|
|||||||
sql_kinds = 0;
|
sql_kinds = 0;
|
||||||
error_mode = 0;
|
error_mode = 0;
|
||||||
use_spatial_index = FALSE;
|
use_spatial_index = FALSE;
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
use_fields = FALSE;
|
use_fields = FALSE;
|
||||||
#endif
|
|
||||||
dml_inited = FALSE;
|
dml_inited = FALSE;
|
||||||
use_pre_call = FALSE;
|
use_pre_call = FALSE;
|
||||||
use_pre_action = FALSE;
|
use_pre_action = FALSE;
|
||||||
@@ -155,9 +153,7 @@ ha_spider::ha_spider(
|
|||||||
sql_kinds = 0;
|
sql_kinds = 0;
|
||||||
error_mode = 0;
|
error_mode = 0;
|
||||||
use_spatial_index = FALSE;
|
use_spatial_index = FALSE;
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
use_fields = FALSE;
|
use_fields = FALSE;
|
||||||
#endif
|
|
||||||
dml_inited = FALSE;
|
dml_inited = FALSE;
|
||||||
use_pre_call = FALSE;
|
use_pre_call = FALSE;
|
||||||
use_pre_action = FALSE;
|
use_pre_action = FALSE;
|
||||||
@@ -1213,9 +1209,7 @@ int ha_spider::reset()
|
|||||||
result_list.set_split_read = FALSE;
|
result_list.set_split_read = FALSE;
|
||||||
result_list.insert_dup_update_pushdown = FALSE;
|
result_list.insert_dup_update_pushdown = FALSE;
|
||||||
use_spatial_index = FALSE;
|
use_spatial_index = FALSE;
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
use_fields = FALSE;
|
use_fields = FALSE;
|
||||||
#endif
|
|
||||||
error_mode = 0;
|
error_mode = 0;
|
||||||
DBUG_RETURN(error_num);
|
DBUG_RETURN(error_num);
|
||||||
}
|
}
|
||||||
|
@@ -99,13 +99,11 @@ public:
|
|||||||
bool da_status;
|
bool da_status;
|
||||||
bool use_spatial_index;
|
bool use_spatial_index;
|
||||||
|
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
uint idx_for_direct_join;
|
uint idx_for_direct_join;
|
||||||
bool use_fields;
|
bool use_fields;
|
||||||
spider_fields *fields;
|
spider_fields *fields;
|
||||||
SPIDER_LINK_IDX_CHAIN *link_idx_chain;
|
SPIDER_LINK_IDX_CHAIN *link_idx_chain;
|
||||||
SPIDER_LINK_IDX_CHAIN *result_link_idx_chain;
|
SPIDER_LINK_IDX_CHAIN *result_link_idx_chain;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* for mrr */
|
/* for mrr */
|
||||||
bool mrr_with_cnt;
|
bool mrr_with_cnt;
|
||||||
|
@@ -1749,7 +1749,6 @@ int spider_set_conn_bg_param(
|
|||||||
|
|
||||||
if (result_list->bgs_phase > 0)
|
if (result_list->bgs_phase > 0)
|
||||||
{
|
{
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
if (spider->use_fields)
|
if (spider->use_fields)
|
||||||
{
|
{
|
||||||
SPIDER_LINK_IDX_CHAIN *link_idx_chain;
|
SPIDER_LINK_IDX_CHAIN *link_idx_chain;
|
||||||
@@ -1761,7 +1760,6 @@ int spider_set_conn_bg_param(
|
|||||||
DBUG_RETURN(error_num);
|
DBUG_RETURN(error_num);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#endif
|
|
||||||
for (
|
for (
|
||||||
roop_count = spider_conn_link_idx_next(share->link_statuses,
|
roop_count = spider_conn_link_idx_next(share->link_statuses,
|
||||||
spider->conn_link_idx, -1, share->link_count,
|
spider->conn_link_idx, -1, share->link_count,
|
||||||
@@ -1776,9 +1774,7 @@ int spider_set_conn_bg_param(
|
|||||||
if ((error_num = spider_create_conn_thread(spider->conns[roop_count])))
|
if ((error_num = spider_create_conn_thread(spider->conns[roop_count])))
|
||||||
DBUG_RETURN(error_num);
|
DBUG_RETURN(error_num);
|
||||||
}
|
}
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
@@ -2234,9 +2230,7 @@ int spider_bg_conn_search(
|
|||||||
conn->bg_target = spider;
|
conn->bg_target = spider;
|
||||||
conn->link_idx = link_idx;
|
conn->link_idx = link_idx;
|
||||||
conn->bg_discard_result = discard_result;
|
conn->bg_discard_result = discard_result;
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
conn->link_idx_chain = spider->link_idx_chain;
|
conn->link_idx_chain = spider->link_idx_chain;
|
||||||
#endif
|
|
||||||
pthread_mutex_lock(&conn->bg_conn_sync_mutex);
|
pthread_mutex_lock(&conn->bg_conn_sync_mutex);
|
||||||
pthread_cond_signal(&conn->bg_conn_cond);
|
pthread_cond_signal(&conn->bg_conn_cond);
|
||||||
pthread_mutex_unlock(&conn->bg_conn_mutex);
|
pthread_mutex_unlock(&conn->bg_conn_mutex);
|
||||||
@@ -2378,9 +2372,7 @@ int spider_bg_conn_search(
|
|||||||
conn->bg_target = spider;
|
conn->bg_target = spider;
|
||||||
conn->link_idx = link_idx;
|
conn->link_idx = link_idx;
|
||||||
conn->bg_discard_result = discard_result;
|
conn->bg_discard_result = discard_result;
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
conn->link_idx_chain = spider->link_idx_chain;
|
conn->link_idx_chain = spider->link_idx_chain;
|
||||||
#endif
|
|
||||||
result_list->bgs_working = TRUE;
|
result_list->bgs_working = TRUE;
|
||||||
conn->bg_search = TRUE;
|
conn->bg_search = TRUE;
|
||||||
if (with_lock)
|
if (with_lock)
|
||||||
|
@@ -2928,16 +2928,12 @@ int spider_db_fetch_table(
|
|||||||
DBUG_RETURN(error_num);
|
DBUG_RETURN(error_num);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
if (!spider->use_fields)
|
if (!spider->use_fields)
|
||||||
{
|
{
|
||||||
#endif
|
|
||||||
if ((error_num = spider_db_append_match_fetch(spider,
|
if ((error_num = spider_db_append_match_fetch(spider,
|
||||||
spider->ft_first, spider->ft_current, row)))
|
spider->ft_first, spider->ft_current, row)))
|
||||||
DBUG_RETURN(error_num);
|
DBUG_RETURN(error_num);
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
for (
|
for (
|
||||||
field = table->field;
|
field = table->field;
|
||||||
@@ -4521,10 +4517,8 @@ int spider_db_seek_next(
|
|||||||
(SPIDER_RESULT*) result_list->current);
|
(SPIDER_RESULT*) result_list->current);
|
||||||
|
|
||||||
int roop_start = 0, roop_end = 1, roop_count, lock_mode, link_ok = 0;
|
int roop_start = 0, roop_end = 1, roop_count, lock_mode, link_ok = 0;
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
if (!spider->use_fields)
|
if (!spider->use_fields)
|
||||||
{
|
{
|
||||||
#endif
|
|
||||||
lock_mode = spider_conn_lock_mode(spider);
|
lock_mode = spider_conn_lock_mode(spider);
|
||||||
if (lock_mode)
|
if (lock_mode)
|
||||||
{
|
{
|
||||||
@@ -4541,14 +4535,11 @@ int spider_db_seek_next(
|
|||||||
roop_start = link_idx;
|
roop_start = link_idx;
|
||||||
roop_end = link_idx + 1;
|
roop_end = link_idx + 1;
|
||||||
}
|
}
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WITHOUT_SPIDER_BG_SEARCH
|
#ifndef WITHOUT_SPIDER_BG_SEARCH
|
||||||
if (result_list->bgs_phase > 0)
|
if (result_list->bgs_phase > 0)
|
||||||
{
|
{
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
if (spider->use_fields)
|
if (spider->use_fields)
|
||||||
{
|
{
|
||||||
SPIDER_LINK_IDX_CHAIN *link_idx_chain;
|
SPIDER_LINK_IDX_CHAIN *link_idx_chain;
|
||||||
@@ -4572,7 +4563,6 @@ int spider_db_seek_next(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#endif
|
|
||||||
for (roop_count = roop_start; roop_count < roop_end;
|
for (roop_count = roop_start; roop_count < roop_end;
|
||||||
roop_count = spider_conn_link_idx_next(share->link_statuses,
|
roop_count = spider_conn_link_idx_next(share->link_statuses,
|
||||||
spider->conn_link_idx, roop_count, share->link_count,
|
spider->conn_link_idx, roop_count, share->link_count,
|
||||||
@@ -4585,9 +4575,7 @@ int spider_db_seek_next(
|
|||||||
DBUG_RETURN(error_num);
|
DBUG_RETURN(error_num);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
#endif
|
#endif
|
||||||
if (result_list->current == result_list->bgs_current)
|
if (result_list->current == result_list->bgs_current)
|
||||||
@@ -4639,7 +4627,6 @@ int spider_db_seek_next(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
if (spider->use_fields)
|
if (spider->use_fields)
|
||||||
{
|
{
|
||||||
SPIDER_LINK_IDX_CHAIN *link_idx_chain;
|
SPIDER_LINK_IDX_CHAIN *link_idx_chain;
|
||||||
@@ -4729,7 +4716,6 @@ int spider_db_seek_next(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#endif
|
|
||||||
for (roop_count = roop_start; roop_count < roop_end;
|
for (roop_count = roop_start; roop_count < roop_end;
|
||||||
roop_count = spider_conn_link_idx_next(share->link_statuses,
|
roop_count = spider_conn_link_idx_next(share->link_statuses,
|
||||||
spider->conn_link_idx, roop_count, share->link_count,
|
spider->conn_link_idx, roop_count, share->link_count,
|
||||||
@@ -4865,9 +4851,7 @@ int spider_db_seek_next(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
spider->connection_ids[link_idx] = conn->connection_id;
|
spider->connection_ids[link_idx] = conn->connection_id;
|
||||||
pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
|
pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);
|
||||||
|
@@ -44,8 +44,6 @@
|
|||||||
#define SPIDER_ITEM_STRING_WITHOUT_SET_STR_WITH_COPY
|
#define SPIDER_ITEM_STRING_WITHOUT_SET_STR_WITH_COPY
|
||||||
#define SPIDER_ITEM_STRING_WITHOUT_SET_STR_WITH_COPY_AND_THDPTR
|
#define SPIDER_ITEM_STRING_WITHOUT_SET_STR_WITH_COPY_AND_THDPTR
|
||||||
|
|
||||||
#define SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
|
|
||||||
#define SPIDER_ORDER_HAS_ENUM_ORDER
|
#define SPIDER_ORDER_HAS_ENUM_ORDER
|
||||||
|
|
||||||
#define SPIDER_ITEM_GEOFUNC_NAME_HAS_MBR
|
#define SPIDER_ITEM_GEOFUNC_NAME_HAS_MBR
|
||||||
@@ -776,7 +774,6 @@ public:
|
|||||||
spider_string *to,
|
spider_string *to,
|
||||||
String *from
|
String *from
|
||||||
) = 0;
|
) = 0;
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
virtual int append_from_and_tables(
|
virtual int append_from_and_tables(
|
||||||
ha_spider *spider,
|
ha_spider *spider,
|
||||||
spider_fields *fields,
|
spider_fields *fields,
|
||||||
@@ -790,7 +787,6 @@ public:
|
|||||||
virtual int append_having(
|
virtual int append_having(
|
||||||
spider_string *str
|
spider_string *str
|
||||||
) = 0;
|
) = 0;
|
||||||
#endif
|
|
||||||
virtual bool tables_on_different_db_are_joinable();
|
virtual bool tables_on_different_db_are_joinable();
|
||||||
virtual bool socket_has_default_value();
|
virtual bool socket_has_default_value();
|
||||||
virtual bool database_has_default_value();
|
virtual bool database_has_default_value();
|
||||||
@@ -1411,13 +1407,11 @@ public:
|
|||||||
virtual int reset_sql(
|
virtual int reset_sql(
|
||||||
ulong sql_type
|
ulong sql_type
|
||||||
) = 0;
|
) = 0;
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
virtual int set_sql_for_exec(
|
virtual int set_sql_for_exec(
|
||||||
ulong sql_type,
|
ulong sql_type,
|
||||||
int link_idx,
|
int link_idx,
|
||||||
SPIDER_LINK_IDX_CHAIN *link_idx_chain
|
SPIDER_LINK_IDX_CHAIN *link_idx_chain
|
||||||
) = 0;
|
) = 0;
|
||||||
#endif
|
|
||||||
virtual int set_sql_for_exec(
|
virtual int set_sql_for_exec(
|
||||||
ulong sql_type,
|
ulong sql_type,
|
||||||
int link_idx
|
int link_idx
|
||||||
@@ -1531,7 +1525,6 @@ public:
|
|||||||
int link_idx,
|
int link_idx,
|
||||||
ulong sql_type
|
ulong sql_type
|
||||||
) = 0;
|
) = 0;
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
virtual int append_from_and_tables_part(
|
virtual int append_from_and_tables_part(
|
||||||
spider_fields *fields,
|
spider_fields *fields,
|
||||||
ulong sql_type
|
ulong sql_type
|
||||||
@@ -1574,7 +1567,6 @@ public:
|
|||||||
spider_fields *fields,
|
spider_fields *fields,
|
||||||
ulong sql_type
|
ulong sql_type
|
||||||
) = 0;
|
) = 0;
|
||||||
#endif
|
|
||||||
virtual bool check_direct_update(
|
virtual bool check_direct_update(
|
||||||
st_select_lex *select_lex,
|
st_select_lex *select_lex,
|
||||||
longlong select_limit,
|
longlong select_limit,
|
||||||
|
@@ -6216,7 +6216,6 @@ int spider_db_mbase_util::append_escaped_util(
|
|||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
/*
|
/*
|
||||||
Walk a TABLE_LIST, or format it to a string and append it.
|
Walk a TABLE_LIST, or format it to a string and append it.
|
||||||
|
|
||||||
@@ -6500,7 +6499,6 @@ int spider_db_mbase_util::append_having(
|
|||||||
str->q_append(SPIDER_SQL_HAVING_STR, SPIDER_SQL_HAVING_LEN);
|
str->q_append(SPIDER_SQL_HAVING_STR, SPIDER_SQL_HAVING_LEN);
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
bool spider_db_mbase_util::append_charset_name_before_string()
|
bool spider_db_mbase_util::append_charset_name_before_string()
|
||||||
{
|
{
|
||||||
@@ -12475,7 +12473,6 @@ int spider_mbase_handler::reset_sql(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
int spider_mbase_handler::set_sql_for_exec(
|
int spider_mbase_handler::set_sql_for_exec(
|
||||||
ulong sql_type,
|
ulong sql_type,
|
||||||
int link_idx,
|
int link_idx,
|
||||||
@@ -12489,7 +12486,6 @@ int spider_mbase_handler::set_sql_for_exec(
|
|||||||
}
|
}
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
int spider_mbase_handler::set_sql_for_exec(
|
int spider_mbase_handler::set_sql_for_exec(
|
||||||
ulong sql_type,
|
ulong sql_type,
|
||||||
@@ -13853,7 +13849,6 @@ int spider_mbase_handler::reset_union_table_name(
|
|||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
int spider_mbase_handler::append_from_and_tables_part(
|
int spider_mbase_handler::append_from_and_tables_part(
|
||||||
spider_fields *fields,
|
spider_fields *fields,
|
||||||
ulong sql_type
|
ulong sql_type
|
||||||
@@ -14154,7 +14149,6 @@ int spider_mbase_handler::append_order_by(
|
|||||||
}
|
}
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
bool spider_mbase_handler::check_direct_update(
|
bool spider_mbase_handler::check_direct_update(
|
||||||
st_select_lex *select_lex,
|
st_select_lex *select_lex,
|
||||||
|
@@ -158,7 +158,6 @@ public:
|
|||||||
spider_string *to,
|
spider_string *to,
|
||||||
String *from
|
String *from
|
||||||
) override;
|
) override;
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
int append_tables_top_down_check(
|
int append_tables_top_down_check(
|
||||||
TABLE_LIST *table_list,
|
TABLE_LIST *table_list,
|
||||||
TABLE_LIST **used_table_list,
|
TABLE_LIST **used_table_list,
|
||||||
@@ -188,7 +187,6 @@ public:
|
|||||||
int append_having(
|
int append_having(
|
||||||
spider_string *str
|
spider_string *str
|
||||||
) override;
|
) override;
|
||||||
#endif
|
|
||||||
bool append_charset_name_before_string() override;
|
bool append_charset_name_before_string() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1348,13 +1346,11 @@ public:
|
|||||||
int reset_sql(
|
int reset_sql(
|
||||||
ulong sql_type
|
ulong sql_type
|
||||||
) override;
|
) override;
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
int set_sql_for_exec(
|
int set_sql_for_exec(
|
||||||
ulong sql_type,
|
ulong sql_type,
|
||||||
int link_idx,
|
int link_idx,
|
||||||
SPIDER_LINK_IDX_CHAIN *link_idx_chain
|
SPIDER_LINK_IDX_CHAIN *link_idx_chain
|
||||||
) override;
|
) override;
|
||||||
#endif
|
|
||||||
int set_sql_for_exec(
|
int set_sql_for_exec(
|
||||||
ulong sql_type,
|
ulong sql_type,
|
||||||
int link_idx
|
int link_idx
|
||||||
@@ -1473,7 +1469,6 @@ public:
|
|||||||
int link_idx,
|
int link_idx,
|
||||||
ulong sql_type
|
ulong sql_type
|
||||||
) override;
|
) override;
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
int append_from_and_tables_part(
|
int append_from_and_tables_part(
|
||||||
spider_fields *fields,
|
spider_fields *fields,
|
||||||
ulong sql_type
|
ulong sql_type
|
||||||
@@ -1540,7 +1535,6 @@ public:
|
|||||||
bool use_fields,
|
bool use_fields,
|
||||||
spider_fields *fields
|
spider_fields *fields
|
||||||
);
|
);
|
||||||
#endif
|
|
||||||
bool check_direct_update(
|
bool check_direct_update(
|
||||||
st_select_lex *select_lex,
|
st_select_lex *select_lex,
|
||||||
longlong select_limit,
|
longlong select_limit,
|
||||||
|
@@ -4304,7 +4304,6 @@ int spider_db_oracle_util::append_escaped_util(
|
|||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
int spider_db_oracle_util::append_from_and_tables(
|
int spider_db_oracle_util::append_from_and_tables(
|
||||||
ha_spider *spider,
|
ha_spider *spider,
|
||||||
spider_fields *fields,
|
spider_fields *fields,
|
||||||
@@ -4422,7 +4421,6 @@ int spider_db_oracle_util::append_having(
|
|||||||
str->q_append(SPIDER_SQL_HAVING_STR, SPIDER_SQL_HAVING_LEN);
|
str->q_append(SPIDER_SQL_HAVING_STR, SPIDER_SQL_HAVING_LEN);
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
spider_oracle_share::spider_oracle_share(
|
spider_oracle_share::spider_oracle_share(
|
||||||
st_spider_share *share
|
st_spider_share *share
|
||||||
@@ -10426,7 +10424,6 @@ bool spider_oracle_handler::need_lock_before_set_sql_for_exec(
|
|||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
int spider_oracle_handler::set_sql_for_exec(
|
int spider_oracle_handler::set_sql_for_exec(
|
||||||
ulong sql_type,
|
ulong sql_type,
|
||||||
int link_idx,
|
int link_idx,
|
||||||
@@ -10471,7 +10468,6 @@ int spider_oracle_handler::set_sql_for_exec(
|
|||||||
}
|
}
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
int spider_oracle_handler::set_sql_for_exec(
|
int spider_oracle_handler::set_sql_for_exec(
|
||||||
ulong sql_type,
|
ulong sql_type,
|
||||||
@@ -12304,7 +12300,6 @@ int spider_oracle_handler::reset_union_table_name(
|
|||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
int spider_oracle_handler::append_from_and_tables_part(
|
int spider_oracle_handler::append_from_and_tables_part(
|
||||||
spider_fields *fields,
|
spider_fields *fields,
|
||||||
ulong sql_type
|
ulong sql_type
|
||||||
@@ -12633,7 +12628,6 @@ int spider_oracle_handler::append_order_by(
|
|||||||
}
|
}
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
spider_oracle_copy_table::spider_oracle_copy_table(
|
spider_oracle_copy_table::spider_oracle_copy_table(
|
||||||
spider_oracle_share *db_share
|
spider_oracle_share *db_share
|
||||||
|
@@ -144,7 +144,6 @@ public:
|
|||||||
spider_string *to,
|
spider_string *to,
|
||||||
String *from
|
String *from
|
||||||
);
|
);
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
int append_from_and_tables(
|
int append_from_and_tables(
|
||||||
ha_spider *spider,
|
ha_spider *spider,
|
||||||
spider_fields *fields,
|
spider_fields *fields,
|
||||||
@@ -163,7 +162,6 @@ public:
|
|||||||
int append_having(
|
int append_having(
|
||||||
spider_string *str
|
spider_string *str
|
||||||
);
|
);
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class spider_db_oracle_row: public spider_db_row
|
class spider_db_oracle_row: public spider_db_row
|
||||||
@@ -1264,13 +1262,11 @@ public:
|
|||||||
bool need_lock_before_set_sql_for_exec(
|
bool need_lock_before_set_sql_for_exec(
|
||||||
ulong sql_type
|
ulong sql_type
|
||||||
);
|
);
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
int set_sql_for_exec(
|
int set_sql_for_exec(
|
||||||
ulong sql_type,
|
ulong sql_type,
|
||||||
int link_idx,
|
int link_idx,
|
||||||
SPIDER_LINK_IDX_CHAIN *link_idx_chain
|
SPIDER_LINK_IDX_CHAIN *link_idx_chain
|
||||||
);
|
);
|
||||||
#endif
|
|
||||||
int set_sql_for_exec(
|
int set_sql_for_exec(
|
||||||
ulong sql_type,
|
ulong sql_type,
|
||||||
int link_idx
|
int link_idx
|
||||||
@@ -1385,7 +1381,6 @@ public:
|
|||||||
int link_idx,
|
int link_idx,
|
||||||
ulong sql_type
|
ulong sql_type
|
||||||
);
|
);
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
int append_from_and_tables_part(
|
int append_from_and_tables_part(
|
||||||
spider_fields *fields,
|
spider_fields *fields,
|
||||||
ulong sql_type
|
ulong sql_type
|
||||||
@@ -1456,7 +1451,6 @@ public:
|
|||||||
bool use_fields,
|
bool use_fields,
|
||||||
spider_fields *fields
|
spider_fields *fields
|
||||||
);
|
);
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class spider_oracle_copy_table: public spider_db_copy_table
|
class spider_oracle_copy_table: public spider_db_copy_table
|
||||||
|
@@ -975,7 +975,6 @@ int spider_fields::ping_table_mon_from_table(
|
|||||||
DBUG_RETURN(error_num);
|
DBUG_RETURN(error_num);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
spider_group_by_handler::spider_group_by_handler(
|
spider_group_by_handler::spider_group_by_handler(
|
||||||
THD *thd_arg,
|
THD *thd_arg,
|
||||||
Query *query_arg,
|
Query *query_arg,
|
||||||
@@ -1842,4 +1841,3 @@ skip_free_table_holder:
|
|||||||
spider_free(spider_current_trx, table_holder, MYF(0));
|
spider_free(spider_current_trx, table_holder, MYF(0));
|
||||||
DBUG_RETURN(NULL);
|
DBUG_RETURN(NULL);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
@@ -13,7 +13,6 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
class spider_group_by_handler: public group_by_handler
|
class spider_group_by_handler: public group_by_handler
|
||||||
{
|
{
|
||||||
Query query;
|
Query query;
|
||||||
@@ -41,4 +40,3 @@ group_by_handler *spider_create_group_by_handler(
|
|||||||
THD *thd,
|
THD *thd,
|
||||||
Query *query
|
Query *query
|
||||||
);
|
);
|
||||||
#endif
|
|
||||||
|
@@ -755,10 +755,8 @@ typedef struct st_spider_conn
|
|||||||
query_id_t connect_error_query_id;
|
query_id_t connect_error_query_id;
|
||||||
time_t connect_error_time;
|
time_t connect_error_time;
|
||||||
|
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
SPIDER_CONN_HOLDER *conn_holder_for_direct_join;
|
SPIDER_CONN_HOLDER *conn_holder_for_direct_join;
|
||||||
SPIDER_LINK_IDX_CHAIN *link_idx_chain;
|
SPIDER_LINK_IDX_CHAIN *link_idx_chain;
|
||||||
#endif
|
|
||||||
SPIDER_IP_PORT_CONN *ip_port_conn;
|
SPIDER_IP_PORT_CONN *ip_port_conn;
|
||||||
|
|
||||||
pthread_mutex_t loop_check_mutex;
|
pthread_mutex_t loop_check_mutex;
|
||||||
|
@@ -6233,9 +6233,7 @@ int spider_db_init(
|
|||||||
spider_hton->create = spider_create_handler;
|
spider_hton->create = spider_create_handler;
|
||||||
spider_hton->drop_database = spider_drop_database;
|
spider_hton->drop_database = spider_drop_database;
|
||||||
spider_hton->show_status = spider_show_status;
|
spider_hton->show_status = spider_show_status;
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
spider_hton->create_group_by = spider_create_group_by_handler;
|
spider_hton->create_group_by = spider_create_group_by_handler;
|
||||||
#endif
|
|
||||||
|
|
||||||
if (my_gethwaddr((uchar *) addr))
|
if (my_gethwaddr((uchar *) addr))
|
||||||
{
|
{
|
||||||
@@ -7481,13 +7479,11 @@ longlong spider_split_read_param(
|
|||||||
DBUG_PRINT("info",("spider bulk_update_mode=%d", bulk_update_mode));
|
DBUG_PRINT("info",("spider bulk_update_mode=%d", bulk_update_mode));
|
||||||
DBUG_PRINT("info",("spider support_bulk_update_sql=%s",
|
DBUG_PRINT("info",("spider support_bulk_update_sql=%s",
|
||||||
spider->support_bulk_update_sql() ? "TRUE" : "FALSE"));
|
spider->support_bulk_update_sql() ? "TRUE" : "FALSE"));
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
bool inserting =
|
bool inserting =
|
||||||
(
|
(
|
||||||
spider->wide_handler->sql_command == SQLCOM_INSERT ||
|
spider->wide_handler->sql_command == SQLCOM_INSERT ||
|
||||||
spider->wide_handler->sql_command == SQLCOM_INSERT_SELECT
|
spider->wide_handler->sql_command == SQLCOM_INSERT_SELECT
|
||||||
);
|
);
|
||||||
#endif
|
|
||||||
bool updating =
|
bool updating =
|
||||||
(
|
(
|
||||||
spider->wide_handler->sql_command == SQLCOM_UPDATE ||
|
spider->wide_handler->sql_command == SQLCOM_UPDATE ||
|
||||||
@@ -7508,12 +7504,10 @@ longlong spider_split_read_param(
|
|||||||
DBUG_PRINT("info",("spider replacing=%s", replacing ? "TRUE" : "FALSE"));
|
DBUG_PRINT("info",("spider replacing=%s", replacing ? "TRUE" : "FALSE"));
|
||||||
TABLE *table = spider->get_table();
|
TABLE *table = spider->get_table();
|
||||||
if (
|
if (
|
||||||
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
|
|
||||||
(
|
(
|
||||||
inserting &&
|
inserting &&
|
||||||
spider->use_fields
|
spider->use_fields
|
||||||
) ||
|
) ||
|
||||||
#endif
|
|
||||||
replacing ||
|
replacing ||
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
|
Reference in New Issue
Block a user