Commit 6d0c9872 authored by Nayuta Yanagisawa's avatar Nayuta Yanagisawa Committed by Yuchen Pei

MDEV-28522 Delete constant SPIDER_SQL_TYPE_*_HS

The HandlerSocket support of Spider has been deleted by MDEV-26858.
Thus, the constants, SPIDER_SQL_TYPE_*_HS, are no longer necessary.
parent 6c302207
...@@ -192,11 +192,6 @@ typedef st_spider_result SPIDER_RESULT; ...@@ -192,11 +192,6 @@ typedef st_spider_result SPIDER_RESULT;
#define SPIDER_SQL_TYPE_DROP_TMP_TABLE_SQL (1 << 6) #define SPIDER_SQL_TYPE_DROP_TMP_TABLE_SQL (1 << 6)
#define SPIDER_SQL_TYPE_OTHER_SQL (1 << 7) #define SPIDER_SQL_TYPE_OTHER_SQL (1 << 7)
#define SPIDER_SQL_TYPE_HANDLER (1 << 8) #define SPIDER_SQL_TYPE_HANDLER (1 << 8)
#define SPIDER_SQL_TYPE_SELECT_HS (1 << 9)
#define SPIDER_SQL_TYPE_INSERT_HS (1 << 10)
#define SPIDER_SQL_TYPE_UPDATE_HS (1 << 11)
#define SPIDER_SQL_TYPE_DELETE_HS (1 << 12)
#define SPIDER_SQL_TYPE_OTHER_HS (1 << 13)
enum spider_bulk_upd_start { enum spider_bulk_upd_start {
SPD_BU_NOT_START, SPD_BU_NOT_START,
......
...@@ -12407,23 +12407,14 @@ int spider_mbase_handler::append_from( ...@@ -12407,23 +12407,14 @@ int spider_mbase_handler::append_from(
DBUG_RETURN(0); DBUG_RETURN(0);
} }
int spider_mbase_handler::append_flush_tables_part( int spider_mbase_handler::append_flush_tables_part(int link_idx, bool lock)
ulong sql_type, {
int link_idx,
bool lock
) {
int error_num; int error_num;
spider_string *str; spider_string *str;
DBUG_ENTER("spider_mbase_handler::append_flush_tables_part"); DBUG_ENTER("spider_mbase_handler::append_flush_tables_part");
DBUG_PRINT("info",("spider this=%p", this)); DBUG_PRINT("info",("spider this=%p", this));
switch (sql_type)
{ str= &spider->result_list.sqls[link_idx];
case SPIDER_SQL_TYPE_OTHER_SQL:
str = &spider->result_list.sqls[link_idx];
break;
default:
DBUG_RETURN(0);
}
error_num = append_flush_tables(str, link_idx, lock); error_num = append_flush_tables(str, link_idx, lock);
DBUG_RETURN(error_num); DBUG_RETURN(error_num);
} }
...@@ -12451,22 +12442,14 @@ int spider_mbase_handler::append_flush_tables( ...@@ -12451,22 +12442,14 @@ int spider_mbase_handler::append_flush_tables(
DBUG_RETURN(0); DBUG_RETURN(0);
} }
int spider_mbase_handler::append_optimize_table_part( int spider_mbase_handler::append_optimize_table_part(int link_idx)
ulong sql_type, {
int link_idx
) {
int error_num; int error_num;
spider_string *str; spider_string *str;
DBUG_ENTER("spider_mbase_handler::append_optimize_table_part"); DBUG_ENTER("spider_mbase_handler::append_optimize_table_part");
DBUG_PRINT("info",("spider this=%p", this)); DBUG_PRINT("info",("spider this=%p", this));
switch (sql_type)
{ str= &spider->result_list.sqls[link_idx];
case SPIDER_SQL_TYPE_OTHER_SQL:
str = &spider->result_list.sqls[link_idx];
break;
default:
DBUG_RETURN(0);
}
error_num = append_optimize_table(str, link_idx); error_num = append_optimize_table(str, link_idx);
DBUG_RETURN(error_num); DBUG_RETURN(error_num);
} }
...@@ -12497,22 +12480,14 @@ int spider_mbase_handler::append_optimize_table( ...@@ -12497,22 +12480,14 @@ int spider_mbase_handler::append_optimize_table(
DBUG_RETURN(0); DBUG_RETURN(0);
} }
int spider_mbase_handler::append_analyze_table_part( int spider_mbase_handler::append_analyze_table_part(int link_idx)
ulong sql_type, {
int link_idx
) {
int error_num; int error_num;
spider_string *str; spider_string *str;
DBUG_ENTER("spider_mbase_handler::append_analyze_table_part"); DBUG_ENTER("spider_mbase_handler::append_analyze_table_part");
DBUG_PRINT("info",("spider this=%p", this)); DBUG_PRINT("info",("spider this=%p", this));
switch (sql_type)
{ str= &spider->result_list.sqls[link_idx];
case SPIDER_SQL_TYPE_OTHER_SQL:
str = &spider->result_list.sqls[link_idx];
break;
default:
DBUG_RETURN(0);
}
error_num = append_analyze_table(str, link_idx); error_num = append_analyze_table(str, link_idx);
DBUG_RETURN(error_num); DBUG_RETURN(error_num);
} }
...@@ -12543,23 +12518,15 @@ int spider_mbase_handler::append_analyze_table( ...@@ -12543,23 +12518,15 @@ int spider_mbase_handler::append_analyze_table(
DBUG_RETURN(0); DBUG_RETURN(0);
} }
int spider_mbase_handler::append_repair_table_part( int spider_mbase_handler::append_repair_table_part(int link_idx,
ulong sql_type, HA_CHECK_OPT *check_opt)
int link_idx, {
HA_CHECK_OPT* check_opt
) {
int error_num; int error_num;
spider_string *str; spider_string *str;
DBUG_ENTER("spider_mbase_handler::append_repair_table_part"); DBUG_ENTER("spider_mbase_handler::append_repair_table_part");
DBUG_PRINT("info",("spider this=%p", this)); DBUG_PRINT("info",("spider this=%p", this));
switch (sql_type)
{ str= &spider->result_list.sqls[link_idx];
case SPIDER_SQL_TYPE_OTHER_SQL:
str = &spider->result_list.sqls[link_idx];
break;
default:
DBUG_RETURN(0);
}
error_num = append_repair_table(str, link_idx, check_opt); error_num = append_repair_table(str, link_idx, check_opt);
DBUG_RETURN(error_num); DBUG_RETURN(error_num);
} }
...@@ -12609,23 +12576,15 @@ int spider_mbase_handler::append_repair_table( ...@@ -12609,23 +12576,15 @@ int spider_mbase_handler::append_repair_table(
DBUG_RETURN(0); DBUG_RETURN(0);
} }
int spider_mbase_handler::append_check_table_part( int spider_mbase_handler::append_check_table_part(int link_idx,
ulong sql_type, HA_CHECK_OPT *check_opt)
int link_idx, {
HA_CHECK_OPT* check_opt
) {
int error_num; int error_num;
spider_string *str; spider_string *str;
DBUG_ENTER("spider_mbase_handler::append_check_table_part"); DBUG_ENTER("spider_mbase_handler::append_check_table_part");
DBUG_PRINT("info",("spider this=%p", this)); DBUG_PRINT("info",("spider this=%p", this));
switch (sql_type)
{ str= &spider->result_list.sqls[link_idx];
case SPIDER_SQL_TYPE_OTHER_SQL:
str = &spider->result_list.sqls[link_idx];
break;
default:
DBUG_RETURN(0);
}
error_num = append_check_table(str, link_idx, check_opt); error_num = append_check_table(str, link_idx, check_opt);
DBUG_RETURN(error_num); DBUG_RETURN(error_num);
} }
...@@ -12674,22 +12633,14 @@ int spider_mbase_handler::append_check_table( ...@@ -12674,22 +12633,14 @@ int spider_mbase_handler::append_check_table(
DBUG_RETURN(0); DBUG_RETURN(0);
} }
int spider_mbase_handler::append_enable_keys_part( int spider_mbase_handler::append_enable_keys_part(int link_idx)
ulong sql_type, {
int link_idx
) {
int error_num; int error_num;
spider_string *str; spider_string *str;
DBUG_ENTER("spider_mbase_handler::append_enable_keys_part"); DBUG_ENTER("spider_mbase_handler::append_enable_keys_part");
DBUG_PRINT("info",("spider this=%p", this)); DBUG_PRINT("info",("spider this=%p", this));
switch (sql_type)
{ str= &spider->result_list.sqls[link_idx];
case SPIDER_SQL_TYPE_OTHER_SQL:
str = &spider->result_list.sqls[link_idx];
break;
default:
DBUG_RETURN(0);
}
error_num = append_enable_keys(str, link_idx); error_num = append_enable_keys(str, link_idx);
DBUG_RETURN(error_num); DBUG_RETURN(error_num);
} }
...@@ -12715,22 +12666,14 @@ int spider_mbase_handler::append_enable_keys( ...@@ -12715,22 +12666,14 @@ int spider_mbase_handler::append_enable_keys(
DBUG_RETURN(0); DBUG_RETURN(0);
} }
int spider_mbase_handler::append_disable_keys_part( int spider_mbase_handler::append_disable_keys_part(int link_idx)
ulong sql_type, {
int link_idx
) {
int error_num; int error_num;
spider_string *str; spider_string *str;
DBUG_ENTER("spider_mbase_handler::append_disable_keys_part"); DBUG_ENTER("spider_mbase_handler::append_disable_keys_part");
DBUG_PRINT("info",("spider this=%p", this)); DBUG_PRINT("info",("spider this=%p", this));
switch (sql_type)
{ str= &spider->result_list.sqls[link_idx];
case SPIDER_SQL_TYPE_OTHER_SQL:
str = &spider->result_list.sqls[link_idx];
break;
default:
DBUG_RETURN(0);
}
error_num = append_disable_keys(str, link_idx); error_num = append_disable_keys(str, link_idx);
DBUG_RETURN(error_num); DBUG_RETURN(error_num);
} }
...@@ -14806,8 +14749,7 @@ int spider_mbase_handler::disable_keys( ...@@ -14806,8 +14749,7 @@ int spider_mbase_handler::disable_keys(
DBUG_ENTER("spider_mbase_handler::disable_keys"); DBUG_ENTER("spider_mbase_handler::disable_keys");
DBUG_PRINT("info",("spider this=%p", this)); DBUG_PRINT("info",("spider this=%p", this));
str->length(0); str->length(0);
if ((error_num = append_disable_keys_part(SPIDER_SQL_TYPE_OTHER_HS, if ((error_num= append_disable_keys_part(link_idx)))
link_idx)))
{ {
DBUG_RETURN(error_num); DBUG_RETURN(error_num);
} }
...@@ -14865,8 +14807,7 @@ int spider_mbase_handler::enable_keys( ...@@ -14865,8 +14807,7 @@ int spider_mbase_handler::enable_keys(
DBUG_ENTER("spider_mbase_handler::enable_keys"); DBUG_ENTER("spider_mbase_handler::enable_keys");
DBUG_PRINT("info",("spider this=%p", this)); DBUG_PRINT("info",("spider this=%p", this));
str->length(0); str->length(0);
if ((error_num = append_enable_keys_part(SPIDER_SQL_TYPE_OTHER_HS, if ((error_num= append_enable_keys_part(link_idx)))
link_idx)))
{ {
DBUG_RETURN(error_num); DBUG_RETURN(error_num);
} }
...@@ -14925,8 +14866,7 @@ int spider_mbase_handler::check_table( ...@@ -14925,8 +14866,7 @@ int spider_mbase_handler::check_table(
DBUG_ENTER("spider_mbase_handler::check_table"); DBUG_ENTER("spider_mbase_handler::check_table");
DBUG_PRINT("info",("spider this=%p", this)); DBUG_PRINT("info",("spider this=%p", this));
str->length(0); str->length(0);
if ((error_num = append_check_table_part(SPIDER_SQL_TYPE_OTHER_HS, if ((error_num= append_check_table_part(link_idx, check_opt)))
link_idx, check_opt)))
{ {
DBUG_RETURN(error_num); DBUG_RETURN(error_num);
} }
...@@ -14985,8 +14925,7 @@ int spider_mbase_handler::repair_table( ...@@ -14985,8 +14925,7 @@ int spider_mbase_handler::repair_table(
DBUG_ENTER("spider_mbase_handler::repair_table"); DBUG_ENTER("spider_mbase_handler::repair_table");
DBUG_PRINT("info",("spider this=%p", this)); DBUG_PRINT("info",("spider this=%p", this));
str->length(0); str->length(0);
if ((error_num = append_repair_table_part(SPIDER_SQL_TYPE_OTHER_HS, if ((error_num= append_repair_table_part(link_idx, check_opt)))
link_idx, check_opt)))
{ {
DBUG_RETURN(error_num); DBUG_RETURN(error_num);
} }
...@@ -15044,8 +14983,7 @@ int spider_mbase_handler::analyze_table( ...@@ -15044,8 +14983,7 @@ int spider_mbase_handler::analyze_table(
DBUG_ENTER("spider_mbase_handler::analyze_table"); DBUG_ENTER("spider_mbase_handler::analyze_table");
DBUG_PRINT("info",("spider this=%p", this)); DBUG_PRINT("info",("spider this=%p", this));
str->length(0); str->length(0);
if ((error_num = append_analyze_table_part(SPIDER_SQL_TYPE_OTHER_HS, if ((error_num= append_analyze_table_part(link_idx)))
link_idx)))
{ {
DBUG_RETURN(error_num); DBUG_RETURN(error_num);
} }
...@@ -15103,8 +15041,7 @@ int spider_mbase_handler::optimize_table( ...@@ -15103,8 +15041,7 @@ int spider_mbase_handler::optimize_table(
DBUG_ENTER("spider_mbase_handler::optimize_table"); DBUG_ENTER("spider_mbase_handler::optimize_table");
DBUG_PRINT("info",("spider this=%p", this)); DBUG_PRINT("info",("spider this=%p", this));
str->length(0); str->length(0);
if ((error_num = append_optimize_table_part(SPIDER_SQL_TYPE_OTHER_HS, if ((error_num= append_optimize_table_part(link_idx)))
link_idx)))
{ {
DBUG_RETURN(error_num); DBUG_RETURN(error_num);
} }
...@@ -15163,8 +15100,7 @@ int spider_mbase_handler::flush_tables( ...@@ -15163,8 +15100,7 @@ int spider_mbase_handler::flush_tables(
DBUG_ENTER("spider_mbase_handler::flush_tables"); DBUG_ENTER("spider_mbase_handler::flush_tables");
DBUG_PRINT("info",("spider this=%p", this)); DBUG_PRINT("info",("spider this=%p", this));
str->length(0); str->length(0);
if ((error_num = append_flush_tables_part(SPIDER_SQL_TYPE_OTHER_HS, if ((error_num= append_flush_tables_part(link_idx, lock)))
link_idx, lock)))
{ {
DBUG_RETURN(error_num); DBUG_RETURN(error_num);
} }
......
...@@ -1248,64 +1248,40 @@ class spider_mbase_handler: public spider_db_handler ...@@ -1248,64 +1248,40 @@ class spider_mbase_handler: public spider_db_handler
ulong sql_type, ulong sql_type,
int link_idx int link_idx
); );
int append_flush_tables_part( int append_flush_tables_part(int link_idx, bool lock);
ulong sql_type,
int link_idx,
bool lock
);
int append_flush_tables( int append_flush_tables(
spider_string *str, spider_string *str,
int link_idx, int link_idx,
bool lock bool lock
); );
int append_optimize_table_part( int append_optimize_table_part(int link_idx);
ulong sql_type,
int link_idx
);
int append_optimize_table( int append_optimize_table(
spider_string *str, spider_string *str,
int link_idx int link_idx
); );
int append_analyze_table_part( int append_analyze_table_part(int link_idx);
ulong sql_type,
int link_idx
);
int append_analyze_table( int append_analyze_table(
spider_string *str, spider_string *str,
int link_idx int link_idx
); );
int append_repair_table_part( int append_repair_table_part(int link_idx, HA_CHECK_OPT *check_opt);
ulong sql_type,
int link_idx,
HA_CHECK_OPT* check_opt
);
int append_repair_table( int append_repair_table(
spider_string *str, spider_string *str,
int link_idx, int link_idx,
HA_CHECK_OPT* check_opt HA_CHECK_OPT* check_opt
); );
int append_check_table_part( int append_check_table_part(int link_idx, HA_CHECK_OPT *check_opt);
ulong sql_type,
int link_idx,
HA_CHECK_OPT* check_opt
);
int append_check_table( int append_check_table(
spider_string *str, spider_string *str,
int link_idx, int link_idx,
HA_CHECK_OPT* check_opt HA_CHECK_OPT* check_opt
); );
int append_enable_keys_part( int append_enable_keys_part(int link_idx);
ulong sql_type,
int link_idx
);
int append_enable_keys( int append_enable_keys(
spider_string *str, spider_string *str,
int link_idx int link_idx
); );
int append_disable_keys_part( int append_disable_keys_part(int link_idx);
ulong sql_type,
int link_idx
);
int append_disable_keys( int append_disable_keys(
spider_string *str, spider_string *str,
int link_idx int link_idx
......
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