Skip to content

Commit 8c1dcb2

Browse files
MDEV-26247 Remove some unused spider methods
Two methods from spider_fields. There are probably more of these conn_holder related methods that can be removed reappend_tables_part() reappend_tables()
1 parent a7d186a commit 8c1dcb2

File tree

4 files changed

+0
-102
lines changed

4 files changed

+0
-102
lines changed

storage/spider/spd_db_include.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -689,8 +689,6 @@ class spider_fields
689689
long access_balance
690690
);
691691
SPIDER_CONN_HOLDER *create_conn_holder();
692-
void set_pos_to_first_conn_holder();
693-
SPIDER_CONN_HOLDER *get_next_conn_holder();
694692
bool has_conn_holder();
695693
void clear_conn_holder_from_conn();
696694
bool check_conn_same_conn(
@@ -923,11 +921,6 @@ class spider_db_util
923921
TABLE_LIST *table_list,
924922
uint table_count
925923
) = 0;
926-
virtual int reappend_tables(
927-
spider_fields *fields,
928-
SPIDER_LINK_IDX_CHAIN *link_idx_chain,
929-
spider_string *str
930-
) = 0;
931924
virtual int append_where(
932925
spider_string *str
933926
) = 0;
@@ -1754,10 +1747,6 @@ class spider_db_handler
17541747
spider_fields *fields,
17551748
ulong sql_type
17561749
) = 0;
1757-
virtual int reappend_tables_part(
1758-
spider_fields *fields,
1759-
ulong sql_type
1760-
) = 0;
17611750
virtual int append_where_part(
17621751
ulong sql_type
17631752
) = 0;

storage/spider/spd_db_mysql.cc

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -7320,45 +7320,6 @@ int spider_db_mbase_util::append_from_and_tables(
73207320
DBUG_RETURN(0);
73217321
}
73227322

7323-
int spider_db_mbase_util::reappend_tables(
7324-
spider_fields *fields,
7325-
SPIDER_LINK_IDX_CHAIN *link_idx_chain,
7326-
spider_string *str
7327-
) {
7328-
int error_num;
7329-
uint32 length;
7330-
ha_spider *spider;
7331-
spider_mbase_share *db_share;
7332-
spider_mbase_handler *dbton_hdl;
7333-
SPIDER_TABLE_HOLDER *table_holder;
7334-
SPIDER_LINK_IDX_HOLDER *link_idx_holder;
7335-
DBUG_ENTER("spider_db_mbase_util::reappend_tables");
7336-
DBUG_PRINT("info",("spider this=%p", this));
7337-
length = str->length();
7338-
fields->set_pos_to_first_table_on_link_idx_chain(link_idx_chain);
7339-
fields->set_pos_to_first_table_holder();
7340-
while ((table_holder = fields->get_next_table_holder()))
7341-
{
7342-
link_idx_holder =
7343-
fields->get_next_table_on_link_idx_chain(link_idx_chain);
7344-
spider = table_holder->spider;
7345-
db_share = (spider_mbase_share *)
7346-
spider->share->dbton_share[dbton_id];
7347-
if (!db_share->same_db_table_name)
7348-
{
7349-
dbton_hdl = (spider_mbase_handler *) spider->dbton_handler[dbton_id];
7350-
str->length(dbton_hdl->table_name_pos);
7351-
if ((error_num = db_share->append_table_name_with_adjusting(str,
7352-
spider->conn_link_idx[link_idx_holder->link_idx])))
7353-
{
7354-
DBUG_RETURN(error_num);
7355-
}
7356-
}
7357-
}
7358-
str->length(length);
7359-
DBUG_RETURN(0);
7360-
}
7361-
73627323
int spider_db_mbase_util::append_where(
73637324
spider_string *str
73647325
) {
@@ -13544,14 +13505,10 @@ int spider_mbase_handler::set_sql_for_exec(
1354413505
int link_idx,
1354513506
SPIDER_LINK_IDX_CHAIN *link_idx_chain
1354613507
) {
13547-
int error_num;
1354813508
DBUG_ENTER("spider_mbase_handler::set_sql_for_exec");
1354913509
DBUG_PRINT("info",("spider this=%p", this));
1355013510
if (sql_type & SPIDER_SQL_TYPE_SELECT_SQL)
1355113511
{
13552-
if ((error_num = spider_db_mbase_utility->reappend_tables(
13553-
spider->fields, link_idx_chain, &sql)))
13554-
DBUG_RETURN(error_num);
1355513512
exec_sql = &sql;
1355613513
}
1355713514
DBUG_RETURN(0);
@@ -15691,27 +15648,6 @@ int spider_mbase_handler::append_from_and_tables_part(
1569115648
DBUG_RETURN(error_num);
1569215649
}
1569315650

15694-
int spider_mbase_handler::reappend_tables_part(
15695-
spider_fields *fields,
15696-
ulong sql_type
15697-
) {
15698-
int error_num;
15699-
spider_string *str;
15700-
DBUG_ENTER("spider_mbase_handler::reappend_tables_part");
15701-
DBUG_PRINT("info",("spider this=%p", this));
15702-
switch (sql_type)
15703-
{
15704-
case SPIDER_SQL_TYPE_SELECT_SQL:
15705-
str = &sql;
15706-
break;
15707-
default:
15708-
DBUG_RETURN(0);
15709-
}
15710-
error_num = spider_db_mbase_utility->reappend_tables(fields,
15711-
link_idx_chain, str);
15712-
DBUG_RETURN(error_num);
15713-
}
15714-
1571515651
int spider_mbase_handler::append_where_part(
1571615652
ulong sql_type
1571715653
) {

storage/spider/spd_db_mysql.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,6 @@ class spider_db_mbase_util: public spider_db_util
198198
TABLE_LIST *table_list,
199199
uint table_count
200200
) override;
201-
int reappend_tables(
202-
spider_fields *fields,
203-
SPIDER_LINK_IDX_CHAIN *link_idx_chain,
204-
spider_string *str
205-
) override;
206201
int append_where(
207202
spider_string *str
208203
) override;
@@ -1608,10 +1603,6 @@ class spider_mbase_handler: public spider_db_handler
16081603
spider_fields *fields,
16091604
ulong sql_type
16101605
);
1611-
int reappend_tables_part(
1612-
spider_fields *fields,
1613-
ulong sql_type
1614-
);
16151606
int append_where_part(
16161607
ulong sql_type
16171608
);

storage/spider/spd_group_by_handler.cc

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -650,24 +650,6 @@ SPIDER_CONN_HOLDER *spider_fields::create_conn_holder(
650650
DBUG_RETURN(return_conn_holder);
651651
}
652652

653-
void spider_fields::set_pos_to_first_conn_holder(
654-
) {
655-
DBUG_ENTER("spider_fields::set_pos_to_first_conn_holder");
656-
DBUG_PRINT("info",("spider this=%p", this));
657-
current_conn_holder = first_conn_holder;
658-
DBUG_VOID_RETURN;
659-
}
660-
661-
SPIDER_CONN_HOLDER *spider_fields::get_next_conn_holder(
662-
) {
663-
SPIDER_CONN_HOLDER *return_conn_holder = current_conn_holder;
664-
DBUG_ENTER("spider_fields::get_next_conn_holder");
665-
DBUG_PRINT("info",("spider this=%p", this));
666-
if (current_conn_holder)
667-
current_conn_holder = current_conn_holder->next;
668-
DBUG_RETURN(return_conn_holder);
669-
}
670-
671653
bool spider_fields::has_conn_holder(
672654
) {
673655
DBUG_ENTER("spider_fields::has_conn_holder");

0 commit comments

Comments
 (0)