Skip to content

Commit

Permalink
MDEV-27656 Spider: remove #ifdef SPIDER_HAS_DISCOVER_TABLE_STRUCTURE
Browse files Browse the repository at this point in the history
  • Loading branch information
nayuta-yanagisawa committed Feb 10, 2022
1 parent e22b3fe commit 284f922
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 28 deletions.
4 changes: 0 additions & 4 deletions storage/spider/spd_db_include.h
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,6 @@ class spider_db_result
longlong pos
) = 0;
virtual int get_errno() = 0;
#ifdef SPIDER_HAS_DISCOVER_TABLE_STRUCTURE
virtual int fetch_columns_for_discover_table_structure(
spider_string *str,
CHARSET_INFO *access_charset
Expand All @@ -938,7 +937,6 @@ class spider_db_result
SPIDER_SHARE *spider_share,
CHARSET_INFO *access_charset
) = 0;
#endif
virtual uint limit_mode();
};

Expand Down Expand Up @@ -1145,13 +1143,11 @@ class spider_db_share
uint alias_length
) = 0;
virtual bool need_change_db_table_name() = 0;
#ifdef SPIDER_HAS_DISCOVER_TABLE_STRUCTURE
virtual int discover_table_structure(
SPIDER_TRX *trx,
SPIDER_SHARE *spider_share,
spider_string *str
) = 0;
#endif
virtual bool checksum_support();
};

Expand Down
6 changes: 0 additions & 6 deletions storage/spider/spd_db_mysql.cc
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ static const char *name_quote_str = SPIDER_SQL_NAME_QUOTE_STR;
#define SPIDER_SQL_BINLOG_GTID_POS_STR "select binlog_gtid_pos"
#define SPIDER_SQL_BINLOG_GTID_POS_LEN sizeof(SPIDER_SQL_BINLOG_GTID_POS_STR) - 1

#ifdef SPIDER_HAS_DISCOVER_TABLE_STRUCTURE
#define SPIDER_SQL_SHOW_COLUMNS_STR "show columns from "
#define SPIDER_SQL_SHOW_COLUMNS_LEN sizeof(SPIDER_SQL_SHOW_COLUMNS_STR) - 1
#define SPIDER_SQL_SELECT_COLUMNS_STR "select `column_name`,`column_default`,`is_nullable`,`character_set_name`,`collation_name`,`column_type`,`extra` from `information_schema`.`columns` where `table_schema` = "
Expand All @@ -154,7 +153,6 @@ static const char *name_quote_str = SPIDER_SQL_NAME_QUOTE_STR;
#define SPIDER_SQL_SPATIAL_LEN sizeof(SPIDER_SQL_SPATIAL_STR) - 1
#define SPIDER_SQL_USING_HASH_STR " using hash"
#define SPIDER_SQL_USING_HASH_LEN sizeof(SPIDER_SQL_USING_HASH_STR) - 1
#endif

#define SPIDER_SQL_SHOW_RECORDS_RECORDS_POS 0
#define SPIDER_SQL_EXPLAIN_SELECT_RECORDS_POS 8
Expand Down Expand Up @@ -1383,7 +1381,6 @@ int spider_db_mbase_result::get_errno()
DBUG_RETURN(store_error_num);
}

#ifdef SPIDER_HAS_DISCOVER_TABLE_STRUCTURE
int spider_db_mbase_result::fetch_columns_for_discover_table_structure(
spider_string *str,
CHARSET_INFO *access_charset
Expand Down Expand Up @@ -1756,7 +1753,6 @@ int spider_db_mbase_result::fetch_table_for_discover_table_structure(
}
DBUG_RETURN(0);
}
#endif

spider_db_mbase::spider_db_mbase(
SPIDER_CONN *conn,
Expand Down Expand Up @@ -8374,7 +8370,6 @@ bool spider_mbase_share::need_change_db_table_name()
DBUG_RETURN(!same_db_table_name);
}

#ifdef SPIDER_HAS_DISCOVER_TABLE_STRUCTURE
int spider_mbase_share::discover_table_structure(
SPIDER_TRX *trx,
SPIDER_SHARE *spider_share,
Expand Down Expand Up @@ -8678,7 +8673,6 @@ int spider_mbase_share::discover_table_structure(
}
DBUG_RETURN(error_num);
}
#endif

bool spider_mbase_share::checksum_support()
{
Expand Down
4 changes: 0 additions & 4 deletions storage/spider/spd_db_mysql.h
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@ class spider_db_mbase_result: public spider_db_result
longlong pos
);
int get_errno();
#ifdef SPIDER_HAS_DISCOVER_TABLE_STRUCTURE
int fetch_columns_for_discover_table_structure(
spider_string *str,
CHARSET_INFO *access_charset
Expand All @@ -366,7 +365,6 @@ class spider_db_mbase_result: public spider_db_result
SPIDER_SHARE *spider_share,
CHARSET_INFO *access_charset
);
#endif
};

class spider_db_mysql_result: public spider_db_mbase_result
Expand Down Expand Up @@ -672,13 +670,11 @@ class spider_mbase_share: public spider_db_share
int *table_name_pos
);
bool need_change_db_table_name();
#ifdef SPIDER_HAS_DISCOVER_TABLE_STRUCTURE
int discover_table_structure(
SPIDER_TRX *trx,
SPIDER_SHARE *spider_share,
spider_string *str
);
#endif
bool checksum_support();
protected:
int create_table_names_str();
Expand Down
4 changes: 0 additions & 4 deletions storage/spider/spd_db_oracle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,6 @@ int spider_db_oracle_result::get_errno()
DBUG_RETURN(store_error_num);
}

#ifdef SPIDER_HAS_DISCOVER_TABLE_STRUCTURE
int spider_db_oracle_result::fetch_columns_for_discover_table_structure(
spider_string *str,
CHARSET_INFO *access_charset
Expand Down Expand Up @@ -1107,7 +1106,6 @@ int spider_db_oracle_result::fetch_table_for_discover_table_structure(
DBUG_PRINT("info",("spider this=%p", this));
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
}
#endif

spider_db_oracle::spider_db_oracle(
SPIDER_CONN *conn
Expand Down Expand Up @@ -5404,7 +5402,6 @@ bool spider_oracle_share::need_change_db_table_name()
DBUG_RETURN(!same_db_table_name);
}

#ifdef SPIDER_HAS_DISCOVER_TABLE_STRUCTURE
int spider_oracle_share::discover_table_structure(
SPIDER_TRX *trx,
SPIDER_SHARE *spider_share,
Expand All @@ -5414,7 +5411,6 @@ int spider_oracle_share::discover_table_structure(
DBUG_PRINT("info",("spider this=%p", this));
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
}
#endif

spider_oracle_handler::spider_oracle_handler(
ha_spider *spider,
Expand Down
4 changes: 0 additions & 4 deletions storage/spider/spd_db_oracle.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ class spider_db_oracle_result: public spider_db_result
longlong pos
);
int get_errno();
#ifdef SPIDER_HAS_DISCOVER_TABLE_STRUCTURE
int fetch_columns_for_discover_table_structure(
spider_string *str,
CHARSET_INFO *access_charset
Expand All @@ -286,7 +285,6 @@ class spider_db_oracle_result: public spider_db_result
SPIDER_SHARE *spider_share,
CHARSET_INFO *access_charset
);
#endif
/* for oracle */
int set_column_info();
};
Expand Down Expand Up @@ -558,13 +556,11 @@ class spider_oracle_share: public spider_db_share
int *table_name_pos
);
bool need_change_db_table_name();
#ifdef SPIDER_HAS_DISCOVER_TABLE_STRUCTURE
int discover_table_structure(
SPIDER_TRX *trx,
SPIDER_SHARE *spider_share,
spider_string *str
);
#endif
private:
int create_table_names_str();
void free_table_names_str();
Expand Down
4 changes: 0 additions & 4 deletions storage/spider/spd_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6633,9 +6633,7 @@ int spider_db_init(
spider_hton->flush_logs = spider_flush_logs;
spider_hton->commit = spider_commit;
spider_hton->rollback = spider_rollback;
#ifdef SPIDER_HAS_DISCOVER_TABLE_STRUCTURE
spider_hton->discover_table_structure = spider_discover_table_structure;
#endif
if (spider_param_support_xa())
{
spider_hton->prepare = spider_xa_prepare;
Expand Down Expand Up @@ -8582,7 +8580,6 @@ double spider_rand(
DBUG_RETURN(my_rnd(&rand));
}

#ifdef SPIDER_HAS_DISCOVER_TABLE_STRUCTURE
int spider_discover_table_structure_internal(
SPIDER_TRX *trx,
SPIDER_SHARE *spider_share,
Expand Down Expand Up @@ -8948,7 +8945,6 @@ int spider_discover_table_structure(
str.length());
DBUG_RETURN(error_num);
}
#endif

int spider_create_spider_object_for_share(
SPIDER_TRX *trx,
Expand Down
2 changes: 0 additions & 2 deletions storage/spider/spd_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,6 @@ double spider_rand(
uint32 rand_source
);

#ifdef SPIDER_HAS_DISCOVER_TABLE_STRUCTURE
int spider_discover_table_structure_internal(
SPIDER_TRX *trx,
SPIDER_SHARE *spider_share,
Expand All @@ -743,7 +742,6 @@ int spider_discover_table_structure(
TABLE_SHARE *share,
HA_CREATE_INFO *info
);
#endif

int spider_create_spider_object_for_share(
SPIDER_TRX *trx,
Expand Down

0 comments on commit 284f922

Please sign in to comment.