Commit 27772bd7 authored by Kentoku SHIBA's avatar Kentoku SHIBA

partition auto increment init

parent 004ea517
......@@ -8002,6 +8002,9 @@ 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
sql_command = thd_sql_command(thd);
if (
sql_command == SQLCOM_DROP_TABLE ||
......@@ -8012,8 +8015,12 @@ int ha_spider::info(
{
if (share->auto_increment_value)
stats.auto_increment_value = share->auto_increment_value;
else
else {
stats.auto_increment_value = 1;
#ifdef HANDLER_HAS_CAN_USE_FOR_AUTO_INC_INIT
auto_inc_temporary = TRUE;
#endif
}
}
DBUG_RETURN(0);
}
......@@ -8796,6 +8803,19 @@ 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");
DBUG_PRINT("info",("spider this=%p", this));
DBUG_PRINT("info",("spider return=%s", (
!auto_inc_temporary
) ? "TRUE" : "FALSE"));
DBUG_RETURN((
!auto_inc_temporary
));
}
#endif
int ha_spider::update_auto_increment()
{
......
......@@ -172,6 +172,9 @@ class ha_spider: public handler
bool bulk_insert;
#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;
int direct_dup_insert;
......@@ -510,6 +513,9 @@ class ha_spider: public handler
uint8 table_cache_type();
#ifdef HANDLER_HAS_NEED_INFO_FOR_AUTO_INC
bool need_info_for_auto_inc();
#endif
#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(
......
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