Commit 443f5f25 authored by Yuchen Pei's avatar Yuchen Pei

MDEV-28895 Spider: remove #ifdef HANDLER_HAS_CAN_USE_FOR_AUTO_INC_INIT

handler has can_use_for_auto_inc_init() since at latest 2017:
dc17ac16
parent 771ae466
......@@ -6433,9 +6433,7 @@ int ha_spider::info(
DBUG_ENTER("ha_spider::info");
DBUG_PRINT("info",("spider this=%p", this));
DBUG_PRINT("info",("spider flag=%x", flag));
#ifdef HANDLER_HAS_CAN_USE_FOR_AUTO_INC_INIT
auto_inc_temporary = FALSE;
#endif
wide_handler->sql_command = thd_sql_command(thd);
/*
if (
......@@ -6451,9 +6449,7 @@ int ha_spider::info(
share->lgtm_tblhnd_share->auto_increment_value;
else {
stats.auto_increment_value = 1;
#ifdef HANDLER_HAS_CAN_USE_FOR_AUTO_INC_INIT
auto_inc_temporary = TRUE;
#endif
}
}
if (
......@@ -6712,9 +6708,7 @@ int ha_spider::info(
}
if (flag & HA_STATUS_AUTO)
{
#ifdef HANDLER_HAS_CAN_USE_FOR_AUTO_INC_INIT
auto_inc_temporary = FALSE;
#endif
if (share->wide_share && table->next_number_field)
{
ulonglong first_value, nb_reserved_values;
......@@ -7547,7 +7541,6 @@ bool ha_spider::need_info_for_auto_inc()
));
}
#ifdef HANDLER_HAS_CAN_USE_FOR_AUTO_INC_INIT
bool ha_spider::can_use_for_auto_inc_init()
{
DBUG_ENTER("ha_spider::can_use_for_auto_inc_init");
......@@ -7559,7 +7552,6 @@ bool ha_spider::can_use_for_auto_inc_init()
!auto_inc_temporary
));
}
#endif
int ha_spider::update_auto_increment()
{
......
......@@ -121,9 +121,7 @@ class ha_spider final : public handler
bool pre_bitmap_checked;
bool bulk_insert;
bool info_auto_called;
#ifdef HANDLER_HAS_CAN_USE_FOR_AUTO_INC_INIT
bool auto_inc_temporary;
#endif
int bulk_size;
int direct_dup_insert;
int store_error_num;
......@@ -365,9 +363,7 @@ class ha_spider final : public handler
uint max_supported_key_part_length() const;
uint8 table_cache_type();
bool need_info_for_auto_inc();
#ifdef HANDLER_HAS_CAN_USE_FOR_AUTO_INC_INIT
bool can_use_for_auto_inc_init();
#endif
int update_auto_increment();
void get_auto_increment(
ulonglong offset,
......
......@@ -22,6 +22,5 @@
#define HANDLER_HAS_TOP_TABLE_FIELDS
#define PARTITION_HAS_GET_PART_SPEC
#define HANDLER_HAS_CAN_USE_FOR_AUTO_INC_INIT
#define SPIDER_UPDATE_ROW_HAS_CONST_NEW_DATA
#endif /* SPD_ENVIRON_INCLUDED */
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