Skip to content

Commit 7d4ef29

Browse files
MDEV-27650 Spider: remove #ifdef SPIDER_HAS_GROUP_BY_HANDLER
1 parent 4defdb0 commit 7d4ef29

13 files changed

+0
-76
lines changed

storage/spider/ha_spider.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@ ha_spider::ha_spider(
8686
sql_kinds = 0;
8787
error_mode = 0;
8888
use_spatial_index = FALSE;
89-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
9089
use_fields = FALSE;
91-
#endif
9290
dml_inited = FALSE;
9391
use_pre_call = FALSE;
9492
use_pre_action = FALSE;
@@ -152,9 +150,7 @@ ha_spider::ha_spider(
152150
sql_kinds = 0;
153151
error_mode = 0;
154152
use_spatial_index = FALSE;
155-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
156153
use_fields = FALSE;
157-
#endif
158154
dml_inited = FALSE;
159155
use_pre_call = FALSE;
160156
use_pre_action = FALSE;
@@ -1195,9 +1191,7 @@ int ha_spider::reset()
11951191
result_list.set_split_read = FALSE;
11961192
result_list.insert_dup_update_pushdown = FALSE;
11971193
use_spatial_index = FALSE;
1198-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
11991194
use_fields = FALSE;
1200-
#endif
12011195
error_mode = 0;
12021196
DBUG_RETURN(error_num);
12031197
}

storage/spider/ha_spider.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,11 @@ class ha_spider final : public handler
9696
bool da_status;
9797
bool use_spatial_index;
9898

99-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
10099
uint idx_for_direct_join;
101100
bool use_fields;
102101
spider_fields *fields;
103102
SPIDER_LINK_IDX_CHAIN *link_idx_chain;
104103
SPIDER_LINK_IDX_CHAIN *result_link_idx_chain;
105-
#endif
106104

107105
/* for mrr */
108106
bool mrr_with_cnt;

storage/spider/spd_conn.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1751,7 +1751,6 @@ int spider_set_conn_bg_param(
17511751

17521752
if (result_list->bgs_phase > 0)
17531753
{
1754-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
17551754
if (spider->use_fields)
17561755
{
17571756
SPIDER_LINK_IDX_CHAIN *link_idx_chain;
@@ -1763,7 +1762,6 @@ int spider_set_conn_bg_param(
17631762
DBUG_RETURN(error_num);
17641763
}
17651764
} else {
1766-
#endif
17671765
for (
17681766
roop_count = spider_conn_link_idx_next(share->link_statuses,
17691767
spider->conn_link_idx, -1, share->link_count,
@@ -1778,9 +1776,7 @@ int spider_set_conn_bg_param(
17781776
if ((error_num = spider_create_conn_thread(spider->conns[roop_count])))
17791777
DBUG_RETURN(error_num);
17801778
}
1781-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
17821779
}
1783-
#endif
17841780
}
17851781
DBUG_RETURN(0);
17861782
}
@@ -2222,9 +2218,7 @@ int spider_bg_conn_search(
22222218
conn->bg_target = spider;
22232219
conn->link_idx = link_idx;
22242220
conn->bg_discard_result = discard_result;
2225-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
22262221
conn->link_idx_chain = spider->link_idx_chain;
2227-
#endif
22282222
pthread_mutex_lock(&conn->bg_conn_sync_mutex);
22292223
pthread_cond_signal(&conn->bg_conn_cond);
22302224
pthread_mutex_unlock(&conn->bg_conn_mutex);
@@ -2366,9 +2360,7 @@ int spider_bg_conn_search(
23662360
conn->bg_target = spider;
23672361
conn->link_idx = link_idx;
23682362
conn->bg_discard_result = discard_result;
2369-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
23702363
conn->link_idx_chain = spider->link_idx_chain;
2371-
#endif
23722364
result_list->bgs_working = TRUE;
23732365
conn->bg_search = TRUE;
23742366
if (with_lock)

storage/spider/spd_db_conn.cc

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2992,16 +2992,12 @@ int spider_db_fetch_table(
29922992
DBUG_RETURN(error_num);
29932993
}
29942994

2995-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
29962995
if (!spider->use_fields)
29972996
{
2998-
#endif
29992997
if ((error_num = spider_db_append_match_fetch(spider,
30002998
spider->ft_first, spider->ft_current, row)))
30012999
DBUG_RETURN(error_num);
3002-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
30033000
}
3004-
#endif
30053001

30063002
for (
30073003
field = table->field;
@@ -4560,10 +4556,8 @@ int spider_db_seek_next(
45604556
(SPIDER_RESULT*) result_list->current);
45614557

45624558
int roop_start = 0, roop_end = 1, roop_count, lock_mode, link_ok = 0;
4563-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
45644559
if (!spider->use_fields)
45654560
{
4566-
#endif
45674561
lock_mode = spider_conn_lock_mode(spider);
45684562
if (lock_mode)
45694563
{
@@ -4580,13 +4574,10 @@ int spider_db_seek_next(
45804574
roop_start = link_idx;
45814575
roop_end = link_idx + 1;
45824576
}
4583-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
45844577
}
4585-
#endif
45864578

45874579
if (result_list->bgs_phase > 0)
45884580
{
4589-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
45904581
if (spider->use_fields)
45914582
{
45924583
SPIDER_LINK_IDX_CHAIN *link_idx_chain;
@@ -4610,7 +4601,6 @@ int spider_db_seek_next(
46104601
}
46114602
}
46124603
} else {
4613-
#endif
46144604
for (roop_count = roop_start; roop_count < roop_end;
46154605
roop_count = spider_conn_link_idx_next(share->link_statuses,
46164606
spider->conn_link_idx, roop_count, share->link_count,
@@ -4623,9 +4613,7 @@ int spider_db_seek_next(
46234613
DBUG_RETURN(error_num);
46244614
}
46254615
}
4626-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
46274616
}
4628-
#endif
46294617
} else {
46304618
if (result_list->current == result_list->bgs_current)
46314619
{
@@ -4676,7 +4664,6 @@ int spider_db_seek_next(
46764664
}
46774665
}
46784666

4679-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
46804667
if (spider->use_fields)
46814668
{
46824669
SPIDER_LINK_IDX_CHAIN *link_idx_chain;
@@ -4801,7 +4788,6 @@ int spider_db_seek_next(
48014788
}
48024789
}
48034790
} else {
4804-
#endif
48054791
for (roop_count = roop_start; roop_count < roop_end;
48064792
roop_count = spider_conn_link_idx_next(share->link_statuses,
48074793
spider->conn_link_idx, roop_count, share->link_count,
@@ -4972,9 +4958,7 @@ int spider_db_seek_next(
49724958
}
49734959
}
49744960
}
4975-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
49764961
}
4977-
#endif
49784962
} else {
49794963
spider->connection_ids[link_idx] = conn->connection_id;
49804964
pthread_mutex_assert_not_owner(&conn->mta_conn_mutex);

storage/spider/spd_db_include.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,6 @@ class spider_db_util
805805
spider_string *to,
806806
String *from
807807
) = 0;
808-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
809808
virtual int append_from_and_tables(
810809
ha_spider *spider,
811810
spider_fields *fields,
@@ -824,7 +823,6 @@ class spider_db_util
824823
virtual int append_having(
825824
spider_string *str
826825
) = 0;
827-
#endif
828826
virtual bool tables_on_different_db_are_joinable();
829827
virtual bool socket_has_default_value();
830828
virtual bool database_has_default_value();
@@ -1173,9 +1171,7 @@ class spider_db_handler
11731171
ha_spider *spider;
11741172
spider_db_share *db_share;
11751173
int first_link_idx;
1176-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
11771174
SPIDER_LINK_IDX_CHAIN *link_idx_chain;
1178-
#endif
11791175
bool strict_group_by;
11801176
bool no_where_cond;
11811177
spider_db_handler(ha_spider *spider, spider_db_share *db_share) :
@@ -1461,13 +1457,11 @@ class spider_db_handler
14611457
virtual bool need_lock_before_set_sql_for_exec(
14621458
ulong sql_type
14631459
) = 0;
1464-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
14651460
virtual int set_sql_for_exec(
14661461
ulong sql_type,
14671462
int link_idx,
14681463
SPIDER_LINK_IDX_CHAIN *link_idx_chain
14691464
) = 0;
1470-
#endif
14711465
virtual int set_sql_for_exec(
14721466
ulong sql_type,
14731467
int link_idx
@@ -1583,7 +1577,6 @@ class spider_db_handler
15831577
int link_idx,
15841578
ulong sql_type
15851579
) = 0;
1586-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
15871580
virtual int append_from_and_tables_part(
15881581
spider_fields *fields,
15891582
ulong sql_type
@@ -1630,7 +1623,6 @@ class spider_db_handler
16301623
spider_fields *fields,
16311624
ulong sql_type
16321625
) = 0;
1633-
#endif
16341626
virtual bool check_direct_update(
16351627
st_select_lex *select_lex,
16361628
longlong select_limit,

storage/spider/spd_db_mysql.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7018,7 +7018,6 @@ int spider_db_mbase_util::append_escaped_util(
70187018
DBUG_RETURN(0);
70197019
}
70207020

7021-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
70227021
int spider_db_mbase_util::append_table(
70237022
ha_spider *spider,
70247023
spider_fields *fields,
@@ -7604,7 +7603,6 @@ int spider_db_mbase_util::append_having(
76047603
str->q_append(SPIDER_SQL_HAVING_STR, SPIDER_SQL_HAVING_LEN);
76057604
DBUG_RETURN(0);
76067605
}
7607-
#endif
76087606

76097607
bool spider_db_mbase_util::tables_on_different_db_are_joinable()
76107608
{
@@ -13811,7 +13809,6 @@ bool spider_mbase_handler::need_lock_before_set_sql_for_exec(
1381113809
DBUG_RETURN(FALSE);
1381213810
}
1381313811

13814-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
1381513812
int spider_mbase_handler::set_sql_for_exec(
1381613813
ulong sql_type,
1381713814
int link_idx,
@@ -13829,7 +13826,6 @@ int spider_mbase_handler::set_sql_for_exec(
1382913826
}
1383013827
DBUG_RETURN(0);
1383113828
}
13832-
#endif
1383313829

1383413830
int spider_mbase_handler::set_sql_for_exec(
1383513831
ulong sql_type,
@@ -15959,7 +15955,6 @@ int spider_mbase_handler::reset_union_table_name(
1595915955
DBUG_RETURN(0);
1596015956
}
1596115957

15962-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
1596315958
int spider_mbase_handler::append_from_and_tables_part(
1596415959
spider_fields *fields,
1596515960
ulong sql_type
@@ -16282,7 +16277,6 @@ int spider_mbase_handler::append_order_by(
1628216277
}
1628316278
DBUG_RETURN(0);
1628416279
}
16285-
#endif
1628616280

1628716281
bool spider_mbase_handler::check_direct_update(
1628816282
st_select_lex *select_lex,

storage/spider/spd_db_mysql.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ class spider_db_mbase_util: public spider_db_util
143143
spider_string *to,
144144
String *from
145145
);
146-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
147146
int append_table(
148147
ha_spider *spider,
149148
spider_fields *fields,
@@ -196,7 +195,6 @@ class spider_db_mbase_util: public spider_db_util
196195
int append_having(
197196
spider_string *str
198197
);
199-
#endif
200198
bool tables_on_different_db_are_joinable();
201199
bool socket_has_default_value();
202200
bool database_has_default_value();
@@ -1395,13 +1393,11 @@ class spider_mbase_handler: public spider_db_handler
13951393
bool need_lock_before_set_sql_for_exec(
13961394
ulong sql_type
13971395
);
1398-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
13991396
int set_sql_for_exec(
14001397
ulong sql_type,
14011398
int link_idx,
14021399
SPIDER_LINK_IDX_CHAIN *link_idx_chain
14031400
);
1404-
#endif
14051401
int set_sql_for_exec(
14061402
ulong sql_type,
14071403
int link_idx
@@ -1522,7 +1518,6 @@ class spider_mbase_handler: public spider_db_handler
15221518
int link_idx,
15231519
ulong sql_type
15241520
);
1525-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
15261521
int append_from_and_tables_part(
15271522
spider_fields *fields,
15281523
ulong sql_type
@@ -1593,7 +1588,6 @@ class spider_mbase_handler: public spider_db_handler
15931588
bool use_fields,
15941589
spider_fields *fields
15951590
);
1596-
#endif
15971591
bool check_direct_update(
15981592
st_select_lex *select_lex,
15991593
longlong select_limit,

storage/spider/spd_db_oracle.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4378,7 +4378,6 @@ int spider_db_oracle_util::append_escaped_util(
43784378
DBUG_RETURN(0);
43794379
}
43804380

4381-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
43824381
int spider_db_oracle_util::append_from_and_tables(
43834382
ha_spider *spider,
43844383
spider_fields *fields,
@@ -4496,7 +4495,6 @@ int spider_db_oracle_util::append_having(
44964495
str->q_append(SPIDER_SQL_HAVING_STR, SPIDER_SQL_HAVING_LEN);
44974496
DBUG_RETURN(0);
44984497
}
4499-
#endif
45004498

45014499
spider_oracle_share::spider_oracle_share(
45024500
st_spider_share *share
@@ -10502,7 +10500,6 @@ bool spider_oracle_handler::need_lock_before_set_sql_for_exec(
1050210500
DBUG_RETURN(FALSE);
1050310501
}
1050410502

10505-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
1050610503
int spider_oracle_handler::set_sql_for_exec(
1050710504
ulong sql_type,
1050810505
int link_idx,
@@ -10547,7 +10544,6 @@ int spider_oracle_handler::set_sql_for_exec(
1054710544
}
1054810545
DBUG_RETURN(0);
1054910546
}
10550-
#endif
1055110547

1055210548
int spider_oracle_handler::set_sql_for_exec(
1055310549
ulong sql_type,
@@ -12436,7 +12432,6 @@ int spider_oracle_handler::reset_union_table_name(
1243612432
DBUG_RETURN(0);
1243712433
}
1243812434

12439-
#ifdef SPIDER_HAS_GROUP_BY_HANDLER
1244012435
int spider_oracle_handler::append_from_and_tables_part(
1244112436
spider_fields *fields,
1244212437
ulong sql_type
@@ -12765,7 +12760,6 @@ int spider_oracle_handler::append_order_by(
1276512760
}
1276612761
DBUG_RETURN(0);
1276712762
}
12768-
#endif
1276912763

1277012764
spider_oracle_copy_table::spider_oracle_copy_table(
1277112765
spider_oracle_share *db_share

0 commit comments

Comments
 (0)