1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-27652 Spider: remove dead code in #ifdef HA_HAS_CHECKSUM_EXTENDED

This commit is contained in:
Nayuta Yanagisawa
2022-01-28 16:09:48 +09:00
parent 7d4ef290f8
commit cf577bab6f
9 changed files with 0 additions and 46 deletions

View File

@@ -7833,7 +7833,6 @@ ha_rows ha_spider::records()
DBUG_RETURN(table_rows);
}
#ifdef HA_HAS_CHECKSUM_EXTENDED
int ha_spider::pre_calculate_checksum()
{
int error_num;
@@ -7911,7 +7910,6 @@ int ha_spider::calculate_checksum()
}
DBUG_RETURN(0);
}
#endif
const char *ha_spider::table_type() const
{

View File

@@ -151,11 +151,9 @@ public:
SPIDER_ITEM_HLD *direct_aggregate_item_first;
SPIDER_ITEM_HLD *direct_aggregate_item_current;
ha_rows table_rows;
#ifdef HA_HAS_CHECKSUM_EXTENDED
ha_checksum checksum_val;
bool checksum_null;
uint action_flags;
#endif
/* for fulltext search */
bool ft_init_and_first;
@@ -355,10 +353,8 @@ public:
int check_crd();
int pre_records();
ha_rows records();
#ifdef HA_HAS_CHECKSUM_EXTENDED
int pre_calculate_checksum();
int calculate_checksum();
#endif
const char *table_type() const;
ulonglong table_flags() const;
ulong table_flags_for_partition();

View File

@@ -22,9 +22,7 @@
#define SPIDER_SIMPLE_CONNECT 1
#define SPIDER_SIMPLE_DISCONNECT 2
#define SPIDER_SIMPLE_RECORDS 3
#ifdef HA_HAS_CHECKSUM_EXTENDED
#define SPIDER_SIMPLE_CHECKSUM_TABLE 4
#endif
#define SPIDER_LOP_CHK_QUEUED (1 << 0)
#define SPIDER_LOP_CHK_MERAGED (1 << 1)

View File

@@ -5864,14 +5864,12 @@ int spider_db_simple_action(
link_idx
);
break;
#ifdef HA_HAS_CHECKSUM_EXTENDED
case SPIDER_SIMPLE_CHECKSUM_TABLE:
DBUG_PRINT("info",("spider simple checksum_table"));
error_num = db_handler->checksum_table(
link_idx
);
break;
#endif
default:
DBUG_ASSERT(0);
error_num = HA_ERR_CRASHED;

View File

@@ -40,7 +40,6 @@ spider_db_result::spider_db_result(
DBUG_VOID_RETURN;
}
#ifdef HA_HAS_CHECKSUM_EXTENDED
int spider_db_result::fetch_table_checksum(
ha_spider *spider
) {
@@ -48,7 +47,6 @@ int spider_db_result::fetch_table_checksum(
DBUG_PRINT("info",("spider this=%p", this));
DBUG_RETURN(0);
}
#endif
uint spider_db_result::limit_mode()
{
@@ -188,7 +186,6 @@ uint spider_db_util::limit_mode()
DBUG_RETURN(0);
}
#ifdef HA_HAS_CHECKSUM_EXTENDED
bool spider_db_share::checksum_support()
{
DBUG_ENTER("spider_db_share::checksum_support");
@@ -203,7 +200,6 @@ int spider_db_handler::checksum_table(
DBUG_PRINT("info",("spider this=%p", this));
DBUG_RETURN(0);
}
#endif
bool spider_db_handler::check_direct_update(
st_select_lex *select_lex,

View File

@@ -905,11 +905,9 @@ public:
int mode,
ha_rows &records
) = 0;
#ifdef HA_HAS_CHECKSUM_EXTENDED
virtual int fetch_table_checksum(
ha_spider *spider
);
#endif
virtual int fetch_table_cardinality(
int mode,
TABLE *table,
@@ -1154,9 +1152,7 @@ public:
spider_string *str
) = 0;
#endif
#ifdef HA_HAS_CHECKSUM_EXTENDED
virtual bool checksum_support();
#endif
};
class spider_db_handler
@@ -1495,11 +1491,9 @@ public:
virtual int show_records(
int link_idx
) = 0;
#ifdef HA_HAS_CHECKSUM_EXTENDED
virtual int checksum_table(
int link_idx
);
#endif
virtual int show_last_insert_id(
int link_idx,
ulonglong &last_insert_id

View File

@@ -159,11 +159,9 @@ static const char *name_quote_str = SPIDER_SQL_NAME_QUOTE_STR;
#define SPIDER_SQL_SHOW_RECORDS_RECORDS_POS 0
#define SPIDER_SQL_EXPLAIN_SELECT_RECORDS_POS 8
#ifdef HA_HAS_CHECKSUM_EXTENDED
#define SPIDER_SQL_CHECKSUM_CHECKSUM_POS 1
#define SPIDER_SQL_CHECKSUM_TABLE_STR "checksum table "
#define SPIDER_SQL_CHECKSUM_TABLE_LEN (sizeof(SPIDER_SQL_CHECKSUM_TABLE_STR) - 1)
#endif
#define SPIDER_SQL_LIKE_STR " like "
#define SPIDER_SQL_LIKE_LEN (sizeof(SPIDER_SQL_LIKE_STR) - 1)
@@ -1148,7 +1146,6 @@ int spider_db_mbase_result::fetch_simple_action(
DBUG_PRINT("info", ("spider records=%lld", *records));
break;
}
#ifdef HA_HAS_CHECKSUM_EXTENDED
case SPIDER_SIMPLE_CHECKSUM_TABLE:
{
ha_spider *spider = (ha_spider *) param;
@@ -1165,7 +1162,6 @@ int spider_db_mbase_result::fetch_simple_action(
}
break;
}
#endif
default:
DBUG_ASSERT(0);
break;
@@ -1189,7 +1185,6 @@ int spider_db_mbase_result::fetch_table_records(
}
}
#ifdef HA_HAS_CHECKSUM_EXTENDED
int spider_db_mbase_result::fetch_table_checksum(
ha_spider *spider
) {
@@ -1198,7 +1193,6 @@ int spider_db_mbase_result::fetch_table_checksum(
DBUG_RETURN(fetch_simple_action(SPIDER_SIMPLE_CHECKSUM_TABLE,
SPIDER_SQL_CHECKSUM_CHECKSUM_POS, spider));
}
#endif
int spider_db_mbase_result::fetch_table_cardinality(
int mode,
@@ -8724,14 +8718,12 @@ int spider_mbase_share::discover_table_structure(
}
#endif
#ifdef HA_HAS_CHECKSUM_EXTENDED
bool spider_mbase_share::checksum_support()
{
DBUG_ENTER("spider_mbase_share::checksum_support");
DBUG_PRINT("info",("spider this=%p", this));
DBUG_RETURN(TRUE);
}
#endif
spider_mbase_handler::spider_mbase_handler(
ha_spider *spider,
@@ -14791,7 +14783,6 @@ int spider_mbase_handler::simple_action(
DBUG_PRINT("info",("spider simple records"));
str = &mysql_share->show_records[pos];
break;
#ifdef HA_HAS_CHECKSUM_EXTENDED
case SPIDER_SIMPLE_CHECKSUM_TABLE:
DBUG_PRINT("info",("spider simple checksum_table"));
str = &spider->result_list.sqls[link_idx];
@@ -14821,7 +14812,6 @@ int spider_mbase_handler::simple_action(
SPIDER_SQL_SQL_EXTENDED_LEN);
}
break;
#endif
default:
DBUG_ASSERT(0);
DBUG_RETURN(0);
@@ -14945,12 +14935,10 @@ int spider_mbase_handler::simple_action(
DBUG_PRINT("info",("spider simple records"));
error_num = res->fetch_table_records(1, spider->table_rows);
break;
#ifdef HA_HAS_CHECKSUM_EXTENDED
case SPIDER_SIMPLE_CHECKSUM_TABLE:
DBUG_PRINT("info",("spider simple checksum_table"));
error_num = res->fetch_table_checksum(spider);
break;
#endif
default:
DBUG_ASSERT(0);
break;
@@ -14980,7 +14968,6 @@ int spider_mbase_handler::show_records(
DBUG_RETURN(0);
}
#ifdef HA_HAS_CHECKSUM_EXTENDED
int spider_mbase_handler::checksum_table(
int link_idx
) {
@@ -14988,7 +14975,6 @@ int spider_mbase_handler::checksum_table(
DBUG_RETURN(simple_action(SPIDER_SIMPLE_CHECKSUM_TABLE, link_idx));
DBUG_RETURN(0);
}
#endif
int spider_mbase_handler::show_last_insert_id(
int link_idx,

View File

@@ -326,11 +326,9 @@ public:
int mode,
ha_rows &records
);
#ifdef HA_HAS_CHECKSUM_EXTENDED
int fetch_table_checksum(
ha_spider *spider
);
#endif
int fetch_table_cardinality(
int mode,
TABLE *table,
@@ -681,9 +679,7 @@ public:
spider_string *str
);
#endif
#ifdef HA_HAS_CHECKSUM_EXTENDED
bool checksum_support();
#endif
protected:
int create_table_names_str();
void free_table_names_str();
@@ -1435,11 +1431,9 @@ public:
int show_records(
int link_idx
);
#ifdef HA_HAS_CHECKSUM_EXTENDED
int checksum_table(
int link_idx
);
#endif
int show_last_insert_id(
int link_idx,
ulonglong &last_insert_id

View File

@@ -4395,9 +4395,7 @@ SPIDER_SHARE *spider_create_share(
uchar *tmp_cardinality_upd, *tmp_table_mon_mutex_bitmap;
char buf[MAX_FIELD_WIDTH], *buf_pos;
char link_idx_str[SPIDER_SQL_INT_LEN];
#ifdef HA_HAS_CHECKSUM_EXTENDED
bool checksum_support = TRUE;
#endif
DBUG_ENTER("spider_create_share");
length = (uint) strlen(table_name);
bitmap_size = spider_bitmap_size(table_share->fields);
@@ -4532,24 +4530,20 @@ SPIDER_SHARE *spider_create_share(
{
goto error_init_dbton;
}
#ifdef HA_HAS_CHECKSUM_EXTENDED
if (
spider_dbton[roop_count].db_access_type == SPIDER_DB_ACCESS_TYPE_SQL &&
!share->dbton_share[roop_count]->checksum_support()
) {
checksum_support = FALSE;
}
#endif
}
}
#ifdef HA_HAS_CHECKSUM_EXTENDED
if (checksum_support)
{
share->additional_table_flags |=
HA_HAS_OLD_CHECKSUM |
HA_HAS_NEW_CHECKSUM;
}
#endif
DBUG_RETURN(share);
/*