Commit f16c0377 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 0650c87d
......@@ -7764,9 +7764,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 (
......@@ -7782,9 +7780,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 (
......@@ -8059,9 +8055,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;
......@@ -8928,7 +8922,6 @@ bool ha_spider::need_info_for_auto_inc()
}
#endif
#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");
......@@ -8940,7 +8933,6 @@ bool ha_spider::can_use_for_auto_inc_init()
!auto_inc_temporary
));
}
#endif
int ha_spider::update_auto_increment()
{
......
......@@ -150,9 +150,7 @@ class ha_spider final : public handler
#ifdef HANDLER_HAS_NEED_INFO_FOR_AUTO_INC
bool info_auto_called;
#endif
#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;
......@@ -458,9 +456,7 @@ class ha_spider final : public handler
#ifdef HANDLER_HAS_NEED_INFO_FOR_AUTO_INC
bool need_info_for_auto_inc() override;
#endif
#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,
......
......@@ -28,7 +28,6 @@
#define HANDLER_HAS_DIRECT_AGGREGATE
#define PARTITION_HAS_GET_PART_SPEC
#define HANDLER_HAS_NEED_INFO_FOR_AUTO_INC
#define HANDLER_HAS_CAN_USE_FOR_AUTO_INC_INIT
#define SPIDER_UPDATE_ROW_HAS_CONST_NEW_DATA
......
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