Commit df91b784 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 2c0b8225
......@@ -6440,9 +6440,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 (flag & HA_STATUS_AUTO)
{
......@@ -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 (
......@@ -6708,9 +6704,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;
......@@ -7543,7 +7537,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");
......@@ -7555,7 +7548,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= 0;
int direct_dup_insert;
int store_error_num;
......@@ -353,9 +351,7 @@ class ha_spider final : public handler
uint max_supported_key_part_length() const override;
uint8 table_cache_type() override;
bool need_info_for_auto_inc() override;
#ifdef HANDLER_HAS_CAN_USE_FOR_AUTO_INC_INIT
bool can_use_for_auto_inc_init() override;
#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