diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc index ac383bbc4f2..60371836683 100644 --- a/storage/spider/ha_spider.cc +++ b/storage/spider/ha_spider.cc @@ -8658,7 +8658,6 @@ ha_rows ha_spider::records() DBUG_RETURN(table_rows); } -#ifdef HA_HAS_CHECKSUM_EXTENDED int ha_spider::pre_calculate_checksum() { int error_num; @@ -8736,7 +8735,6 @@ int ha_spider::calculate_checksum() } DBUG_RETURN(0); } -#endif const char *ha_spider::table_type() const { diff --git a/storage/spider/ha_spider.h b/storage/spider/ha_spider.h index 995a5f0281c..9ebf460623e 100644 --- a/storage/spider/ha_spider.h +++ b/storage/spider/ha_spider.h @@ -179,11 +179,9 @@ public: SPIDER_ITEM_HLD *direct_aggregate_item_current; #endif 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; @@ -430,10 +428,8 @@ public: int check_crd(); int pre_records() override; ha_rows records() override; -#ifdef HA_HAS_CHECKSUM_EXTENDED int pre_calculate_checksum() override; int calculate_checksum() override; -#endif const char *table_type() const; ulonglong table_flags() const override; ulong table_flags_for_partition(); diff --git a/storage/spider/spd_conn.h b/storage/spider/spd_conn.h index ef0c304c89f..405832a1e7b 100644 --- a/storage/spider/spd_conn.h +++ b/storage/spider/spd_conn.h @@ -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 /* The SPIDER_CONN_LOOP_CHECK has been added to the loop_check queue to diff --git a/storage/spider/spd_db_conn.cc b/storage/spider/spd_db_conn.cc index 48ac9264af8..f98d1d0283f 100644 --- a/storage/spider/spd_db_conn.cc +++ b/storage/spider/spd_db_conn.cc @@ -5933,14 +5933,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; diff --git a/storage/spider/spd_db_include.cc b/storage/spider/spd_db_include.cc index 16a449e94cc..d5344066017 100644 --- a/storage/spider/spd_db_include.cc +++ b/storage/spider/spd_db_include.cc @@ -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() { @@ -137,7 +135,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"); @@ -152,7 +149,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, diff --git a/storage/spider/spd_db_include.h b/storage/spider/spd_db_include.h index 0d080249d62..d6d1d514ac6 100644 --- a/storage/spider/spd_db_include.h +++ b/storage/spider/spd_db_include.h @@ -874,11 +874,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, @@ -1119,9 +1117,7 @@ public: spider_string *str ) = 0; #endif -#ifdef HA_HAS_CHECKSUM_EXTENDED virtual bool checksum_support(); -#endif }; class spider_db_handler @@ -1463,11 +1459,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 diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc index 4d57a8d41de..a676955d1fd 100644 --- a/storage/spider/spd_db_mysql.cc +++ b/storage/spider/spd_db_mysql.cc @@ -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_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) @@ -1119,7 +1117,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; @@ -1136,7 +1133,6 @@ int spider_db_mbase_result::fetch_simple_action( } break; } -#endif default: DBUG_ASSERT(0); 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( ha_spider *spider ) { @@ -1169,7 +1164,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, @@ -8191,14 +8185,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, @@ -14239,7 +14231,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]; @@ -14269,7 +14260,6 @@ int spider_mbase_handler::simple_action( SPIDER_SQL_SQL_EXTENDED_LEN); } break; -#endif default: DBUG_ASSERT(0); DBUG_RETURN(0); @@ -14393,12 +14383,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; @@ -14427,7 +14415,6 @@ int spider_mbase_handler::show_records( DBUG_RETURN(0); } -#ifdef HA_HAS_CHECKSUM_EXTENDED int spider_mbase_handler::checksum_table( 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(0); } -#endif int spider_mbase_handler::show_last_insert_id( int link_idx, diff --git a/storage/spider/spd_db_mysql.h b/storage/spider/spd_db_mysql.h index dcc35290103..5124dc61180 100644 --- a/storage/spider/spd_db_mysql.h +++ b/storage/spider/spd_db_mysql.h @@ -318,11 +318,9 @@ public: int mode, ha_rows &records ) override; -#ifdef HA_HAS_CHECKSUM_EXTENDED int fetch_table_checksum( ha_spider *spider ) override; -#endif int fetch_table_cardinality( int mode, TABLE *table, @@ -669,9 +667,7 @@ public: spider_string *str ) override; #endif -#ifdef HA_HAS_CHECKSUM_EXTENDED bool checksum_support() override; -#endif protected: int create_table_names_str(); void free_table_names_str(); @@ -1402,11 +1398,9 @@ public: int show_records( int link_idx ) override; -#ifdef HA_HAS_CHECKSUM_EXTENDED int checksum_table( int link_idx ) override; -#endif int show_last_insert_id( int link_idx, ulonglong &last_insert_id diff --git a/storage/spider/spd_environ.h b/storage/spider/spd_environ.h index faf32019824..3f50cfa0cc8 100644 --- a/storage/spider/spd_environ.h +++ b/storage/spider/spd_environ.h @@ -24,7 +24,5 @@ #define HANDLER_HAS_DIRECT_AGGREGATE -#define HA_HAS_CHECKSUM_EXTENDED - #define SPIDER_I_S_USE_SHOW_FOR_COLUMN #endif /* SPD_ENVIRON_INCLUDED */ diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc index e6947fe3d6f..41f0668bb24 100644 --- a/storage/spider/spd_table.cc +++ b/storage/spider/spd_table.cc @@ -4036,9 +4036,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); @@ -4175,24 +4173,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); /*