mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 09:14:17 +01:00
MDEV-27652 remove #ifdef HA_HAS_CHECKSUM_EXTENDED
handler::pre_calculate_checksum was added in MDEV-16249
be5c432a42
This commit is contained in:
parent
e8a5553cef
commit
6287fb6e17
10 changed files with 0 additions and 48 deletions
|
@ -8658,7 +8658,6 @@ ha_rows ha_spider::records()
|
||||||
DBUG_RETURN(table_rows);
|
DBUG_RETURN(table_rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
int ha_spider::pre_calculate_checksum()
|
int ha_spider::pre_calculate_checksum()
|
||||||
{
|
{
|
||||||
int error_num;
|
int error_num;
|
||||||
|
@ -8736,7 +8735,6 @@ int ha_spider::calculate_checksum()
|
||||||
}
|
}
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *ha_spider::table_type() const
|
const char *ha_spider::table_type() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -179,11 +179,9 @@ public:
|
||||||
SPIDER_ITEM_HLD *direct_aggregate_item_current;
|
SPIDER_ITEM_HLD *direct_aggregate_item_current;
|
||||||
#endif
|
#endif
|
||||||
ha_rows table_rows;
|
ha_rows table_rows;
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
ha_checksum checksum_val;
|
ha_checksum checksum_val;
|
||||||
bool checksum_null;
|
bool checksum_null;
|
||||||
uint action_flags;
|
uint action_flags;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* for fulltext search */
|
/* for fulltext search */
|
||||||
bool ft_init_and_first;
|
bool ft_init_and_first;
|
||||||
|
@ -430,10 +428,8 @@ public:
|
||||||
int check_crd();
|
int check_crd();
|
||||||
int pre_records() override;
|
int pre_records() override;
|
||||||
ha_rows records() override;
|
ha_rows records() override;
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
int pre_calculate_checksum() override;
|
int pre_calculate_checksum() override;
|
||||||
int calculate_checksum() override;
|
int calculate_checksum() override;
|
||||||
#endif
|
|
||||||
const char *table_type() const;
|
const char *table_type() const;
|
||||||
ulonglong table_flags() const override;
|
ulonglong table_flags() const override;
|
||||||
ulong table_flags_for_partition();
|
ulong table_flags_for_partition();
|
||||||
|
|
|
@ -22,9 +22,7 @@
|
||||||
#define SPIDER_SIMPLE_CONNECT 1
|
#define SPIDER_SIMPLE_CONNECT 1
|
||||||
#define SPIDER_SIMPLE_DISCONNECT 2
|
#define SPIDER_SIMPLE_DISCONNECT 2
|
||||||
#define SPIDER_SIMPLE_RECORDS 3
|
#define SPIDER_SIMPLE_RECORDS 3
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
#define SPIDER_SIMPLE_CHECKSUM_TABLE 4
|
#define SPIDER_SIMPLE_CHECKSUM_TABLE 4
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The SPIDER_CONN_LOOP_CHECK has been added to the loop_check queue to
|
The SPIDER_CONN_LOOP_CHECK has been added to the loop_check queue to
|
||||||
|
|
|
@ -5933,14 +5933,12 @@ int spider_db_simple_action(
|
||||||
link_idx
|
link_idx
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
case SPIDER_SIMPLE_CHECKSUM_TABLE:
|
case SPIDER_SIMPLE_CHECKSUM_TABLE:
|
||||||
DBUG_PRINT("info",("spider simple checksum_table"));
|
DBUG_PRINT("info",("spider simple checksum_table"));
|
||||||
error_num = db_handler->checksum_table(
|
error_num = db_handler->checksum_table(
|
||||||
link_idx
|
link_idx
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
DBUG_ASSERT(0);
|
DBUG_ASSERT(0);
|
||||||
error_num = HA_ERR_CRASHED;
|
error_num = HA_ERR_CRASHED;
|
||||||
|
|
|
@ -40,7 +40,6 @@ spider_db_result::spider_db_result(
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
int spider_db_result::fetch_table_checksum(
|
int spider_db_result::fetch_table_checksum(
|
||||||
ha_spider *spider
|
ha_spider *spider
|
||||||
) {
|
) {
|
||||||
|
@ -48,7 +47,6 @@ int spider_db_result::fetch_table_checksum(
|
||||||
DBUG_PRINT("info",("spider this=%p", this));
|
DBUG_PRINT("info",("spider this=%p", this));
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
uint spider_db_result::limit_mode()
|
uint spider_db_result::limit_mode()
|
||||||
{
|
{
|
||||||
|
@ -137,7 +135,6 @@ uint spider_db_util::limit_mode()
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
bool spider_db_share::checksum_support()
|
bool spider_db_share::checksum_support()
|
||||||
{
|
{
|
||||||
DBUG_ENTER("spider_db_share::checksum_support");
|
DBUG_ENTER("spider_db_share::checksum_support");
|
||||||
|
@ -152,7 +149,6 @@ int spider_db_handler::checksum_table(
|
||||||
DBUG_PRINT("info",("spider this=%p", this));
|
DBUG_PRINT("info",("spider this=%p", this));
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
bool spider_db_handler::check_direct_update(
|
bool spider_db_handler::check_direct_update(
|
||||||
st_select_lex *select_lex,
|
st_select_lex *select_lex,
|
||||||
|
|
|
@ -874,11 +874,9 @@ public:
|
||||||
int mode,
|
int mode,
|
||||||
ha_rows &records
|
ha_rows &records
|
||||||
) = 0;
|
) = 0;
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
virtual int fetch_table_checksum(
|
virtual int fetch_table_checksum(
|
||||||
ha_spider *spider
|
ha_spider *spider
|
||||||
);
|
);
|
||||||
#endif
|
|
||||||
virtual int fetch_table_cardinality(
|
virtual int fetch_table_cardinality(
|
||||||
int mode,
|
int mode,
|
||||||
TABLE *table,
|
TABLE *table,
|
||||||
|
@ -1119,9 +1117,7 @@ public:
|
||||||
spider_string *str
|
spider_string *str
|
||||||
) = 0;
|
) = 0;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
virtual bool checksum_support();
|
virtual bool checksum_support();
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class spider_db_handler
|
class spider_db_handler
|
||||||
|
@ -1463,11 +1459,9 @@ public:
|
||||||
virtual int show_records(
|
virtual int show_records(
|
||||||
int link_idx
|
int link_idx
|
||||||
) = 0;
|
) = 0;
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
virtual int checksum_table(
|
virtual int checksum_table(
|
||||||
int link_idx
|
int link_idx
|
||||||
);
|
);
|
||||||
#endif
|
|
||||||
virtual int show_last_insert_id(
|
virtual int show_last_insert_id(
|
||||||
int link_idx,
|
int link_idx,
|
||||||
ulonglong &last_insert_id
|
ulonglong &last_insert_id
|
||||||
|
|
|
@ -161,11 +161,9 @@ static const char *name_quote_str = SPIDER_SQL_NAME_QUOTE_STR;
|
||||||
#define SPIDER_SQL_SHOW_RECORDS_RECORDS_POS 0
|
#define SPIDER_SQL_SHOW_RECORDS_RECORDS_POS 0
|
||||||
#define SPIDER_SQL_EXPLAIN_SELECT_RECORDS_POS 8
|
#define SPIDER_SQL_EXPLAIN_SELECT_RECORDS_POS 8
|
||||||
|
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
#define SPIDER_SQL_CHECKSUM_CHECKSUM_POS 1
|
#define SPIDER_SQL_CHECKSUM_CHECKSUM_POS 1
|
||||||
#define SPIDER_SQL_CHECKSUM_TABLE_STR "checksum table "
|
#define SPIDER_SQL_CHECKSUM_TABLE_STR "checksum table "
|
||||||
#define SPIDER_SQL_CHECKSUM_TABLE_LEN (sizeof(SPIDER_SQL_CHECKSUM_TABLE_STR) - 1)
|
#define SPIDER_SQL_CHECKSUM_TABLE_LEN (sizeof(SPIDER_SQL_CHECKSUM_TABLE_STR) - 1)
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SPIDER_SQL_LIKE_STR " like "
|
#define SPIDER_SQL_LIKE_STR " like "
|
||||||
#define SPIDER_SQL_LIKE_LEN (sizeof(SPIDER_SQL_LIKE_STR) - 1)
|
#define SPIDER_SQL_LIKE_LEN (sizeof(SPIDER_SQL_LIKE_STR) - 1)
|
||||||
|
@ -1119,7 +1117,6 @@ int spider_db_mbase_result::fetch_simple_action(
|
||||||
DBUG_PRINT("info", ("spider records=%lld", *records));
|
DBUG_PRINT("info", ("spider records=%lld", *records));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
case SPIDER_SIMPLE_CHECKSUM_TABLE:
|
case SPIDER_SIMPLE_CHECKSUM_TABLE:
|
||||||
{
|
{
|
||||||
ha_spider *spider = (ha_spider *) param;
|
ha_spider *spider = (ha_spider *) param;
|
||||||
|
@ -1136,7 +1133,6 @@ int spider_db_mbase_result::fetch_simple_action(
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
DBUG_ASSERT(0);
|
DBUG_ASSERT(0);
|
||||||
break;
|
break;
|
||||||
|
@ -1160,7 +1156,6 @@ int spider_db_mbase_result::fetch_table_records(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
int spider_db_mbase_result::fetch_table_checksum(
|
int spider_db_mbase_result::fetch_table_checksum(
|
||||||
ha_spider *spider
|
ha_spider *spider
|
||||||
) {
|
) {
|
||||||
|
@ -1169,7 +1164,6 @@ int spider_db_mbase_result::fetch_table_checksum(
|
||||||
DBUG_RETURN(fetch_simple_action(SPIDER_SIMPLE_CHECKSUM_TABLE,
|
DBUG_RETURN(fetch_simple_action(SPIDER_SIMPLE_CHECKSUM_TABLE,
|
||||||
SPIDER_SQL_CHECKSUM_CHECKSUM_POS, spider));
|
SPIDER_SQL_CHECKSUM_CHECKSUM_POS, spider));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
int spider_db_mbase_result::fetch_table_cardinality(
|
int spider_db_mbase_result::fetch_table_cardinality(
|
||||||
int mode,
|
int mode,
|
||||||
|
@ -8191,14 +8185,12 @@ int spider_mbase_share::discover_table_structure(
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
bool spider_mbase_share::checksum_support()
|
bool spider_mbase_share::checksum_support()
|
||||||
{
|
{
|
||||||
DBUG_ENTER("spider_mbase_share::checksum_support");
|
DBUG_ENTER("spider_mbase_share::checksum_support");
|
||||||
DBUG_PRINT("info",("spider this=%p", this));
|
DBUG_PRINT("info",("spider this=%p", this));
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
spider_mbase_handler::spider_mbase_handler(
|
spider_mbase_handler::spider_mbase_handler(
|
||||||
ha_spider *spider,
|
ha_spider *spider,
|
||||||
|
@ -14239,7 +14231,6 @@ int spider_mbase_handler::simple_action(
|
||||||
DBUG_PRINT("info",("spider simple records"));
|
DBUG_PRINT("info",("spider simple records"));
|
||||||
str = &mysql_share->show_records[pos];
|
str = &mysql_share->show_records[pos];
|
||||||
break;
|
break;
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
case SPIDER_SIMPLE_CHECKSUM_TABLE:
|
case SPIDER_SIMPLE_CHECKSUM_TABLE:
|
||||||
DBUG_PRINT("info",("spider simple checksum_table"));
|
DBUG_PRINT("info",("spider simple checksum_table"));
|
||||||
str = &spider->result_list.sqls[link_idx];
|
str = &spider->result_list.sqls[link_idx];
|
||||||
|
@ -14269,7 +14260,6 @@ int spider_mbase_handler::simple_action(
|
||||||
SPIDER_SQL_SQL_EXTENDED_LEN);
|
SPIDER_SQL_SQL_EXTENDED_LEN);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
DBUG_ASSERT(0);
|
DBUG_ASSERT(0);
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
|
@ -14393,12 +14383,10 @@ int spider_mbase_handler::simple_action(
|
||||||
DBUG_PRINT("info",("spider simple records"));
|
DBUG_PRINT("info",("spider simple records"));
|
||||||
error_num = res->fetch_table_records(1, spider->table_rows);
|
error_num = res->fetch_table_records(1, spider->table_rows);
|
||||||
break;
|
break;
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
case SPIDER_SIMPLE_CHECKSUM_TABLE:
|
case SPIDER_SIMPLE_CHECKSUM_TABLE:
|
||||||
DBUG_PRINT("info",("spider simple checksum_table"));
|
DBUG_PRINT("info",("spider simple checksum_table"));
|
||||||
error_num = res->fetch_table_checksum(spider);
|
error_num = res->fetch_table_checksum(spider);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
DBUG_ASSERT(0);
|
DBUG_ASSERT(0);
|
||||||
break;
|
break;
|
||||||
|
@ -14427,7 +14415,6 @@ int spider_mbase_handler::show_records(
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
int spider_mbase_handler::checksum_table(
|
int spider_mbase_handler::checksum_table(
|
||||||
int link_idx
|
int link_idx
|
||||||
) {
|
) {
|
||||||
|
@ -14435,7 +14422,6 @@ int spider_mbase_handler::checksum_table(
|
||||||
DBUG_RETURN(simple_action(SPIDER_SIMPLE_CHECKSUM_TABLE, link_idx));
|
DBUG_RETURN(simple_action(SPIDER_SIMPLE_CHECKSUM_TABLE, link_idx));
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
int spider_mbase_handler::show_last_insert_id(
|
int spider_mbase_handler::show_last_insert_id(
|
||||||
int link_idx,
|
int link_idx,
|
||||||
|
|
|
@ -318,11 +318,9 @@ public:
|
||||||
int mode,
|
int mode,
|
||||||
ha_rows &records
|
ha_rows &records
|
||||||
) override;
|
) override;
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
int fetch_table_checksum(
|
int fetch_table_checksum(
|
||||||
ha_spider *spider
|
ha_spider *spider
|
||||||
) override;
|
) override;
|
||||||
#endif
|
|
||||||
int fetch_table_cardinality(
|
int fetch_table_cardinality(
|
||||||
int mode,
|
int mode,
|
||||||
TABLE *table,
|
TABLE *table,
|
||||||
|
@ -669,9 +667,7 @@ public:
|
||||||
spider_string *str
|
spider_string *str
|
||||||
) override;
|
) override;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
bool checksum_support() override;
|
bool checksum_support() override;
|
||||||
#endif
|
|
||||||
protected:
|
protected:
|
||||||
int create_table_names_str();
|
int create_table_names_str();
|
||||||
void free_table_names_str();
|
void free_table_names_str();
|
||||||
|
@ -1402,11 +1398,9 @@ public:
|
||||||
int show_records(
|
int show_records(
|
||||||
int link_idx
|
int link_idx
|
||||||
) override;
|
) override;
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
int checksum_table(
|
int checksum_table(
|
||||||
int link_idx
|
int link_idx
|
||||||
) override;
|
) override;
|
||||||
#endif
|
|
||||||
int show_last_insert_id(
|
int show_last_insert_id(
|
||||||
int link_idx,
|
int link_idx,
|
||||||
ulonglong &last_insert_id
|
ulonglong &last_insert_id
|
||||||
|
|
|
@ -24,7 +24,5 @@
|
||||||
|
|
||||||
#define HANDLER_HAS_DIRECT_AGGREGATE
|
#define HANDLER_HAS_DIRECT_AGGREGATE
|
||||||
|
|
||||||
#define HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
|
|
||||||
#define SPIDER_I_S_USE_SHOW_FOR_COLUMN
|
#define SPIDER_I_S_USE_SHOW_FOR_COLUMN
|
||||||
#endif /* SPD_ENVIRON_INCLUDED */
|
#endif /* SPD_ENVIRON_INCLUDED */
|
||||||
|
|
|
@ -4036,9 +4036,7 @@ SPIDER_SHARE *spider_create_share(
|
||||||
uchar *tmp_cardinality_upd, *tmp_table_mon_mutex_bitmap;
|
uchar *tmp_cardinality_upd, *tmp_table_mon_mutex_bitmap;
|
||||||
char buf[MAX_FIELD_WIDTH], *buf_pos;
|
char buf[MAX_FIELD_WIDTH], *buf_pos;
|
||||||
char link_idx_str[SPIDER_SQL_INT_LEN];
|
char link_idx_str[SPIDER_SQL_INT_LEN];
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
bool checksum_support = TRUE;
|
bool checksum_support = TRUE;
|
||||||
#endif
|
|
||||||
DBUG_ENTER("spider_create_share");
|
DBUG_ENTER("spider_create_share");
|
||||||
length = (uint) strlen(table_name);
|
length = (uint) strlen(table_name);
|
||||||
bitmap_size = spider_bitmap_size(table_share->fields);
|
bitmap_size = spider_bitmap_size(table_share->fields);
|
||||||
|
@ -4175,24 +4173,20 @@ SPIDER_SHARE *spider_create_share(
|
||||||
{
|
{
|
||||||
goto error_init_dbton;
|
goto error_init_dbton;
|
||||||
}
|
}
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
if (
|
if (
|
||||||
spider_dbton[roop_count].db_access_type == SPIDER_DB_ACCESS_TYPE_SQL &&
|
spider_dbton[roop_count].db_access_type == SPIDER_DB_ACCESS_TYPE_SQL &&
|
||||||
!share->dbton_share[roop_count]->checksum_support()
|
!share->dbton_share[roop_count]->checksum_support()
|
||||||
) {
|
) {
|
||||||
checksum_support = FALSE;
|
checksum_support = FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef HA_HAS_CHECKSUM_EXTENDED
|
|
||||||
if (checksum_support)
|
if (checksum_support)
|
||||||
{
|
{
|
||||||
share->additional_table_flags |=
|
share->additional_table_flags |=
|
||||||
HA_HAS_OLD_CHECKSUM |
|
HA_HAS_OLD_CHECKSUM |
|
||||||
HA_HAS_NEW_CHECKSUM;
|
HA_HAS_NEW_CHECKSUM;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
DBUG_RETURN(share);
|
DBUG_RETURN(share);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue