Commit 08622739 authored by Nayuta Yanagisawa's avatar Nayuta Yanagisawa

MDEV-27658 Spider: remove #if defined(PARTITION_HAS_GET_CHILD_HANDLERS)

parent 61df84de
......@@ -1637,20 +1637,14 @@ group_by_handler *spider_create_group_by_handler(
if (from->table->part_info)
{
DBUG_PRINT("info",("spider partition handler"));
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
partition_info *part_info = from->table->part_info;
uint bits = bitmap_bits_set(&part_info->read_partitions);
DBUG_PRINT("info",("spider bits=%u", bits));
if (bits != 1)
{
DBUG_PRINT("info",("spider using multiple partitions is not supported by this feature yet"));
#else
DBUG_PRINT("info",("spider partition is not supported by this feature yet"));
#endif
DBUG_RETURN(NULL);
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
}
#endif
}
} while ((from = from->next_local));
#endif
......@@ -1666,7 +1660,6 @@ group_by_handler *spider_create_group_by_handler(
/* all tables are const_table */
DBUG_RETURN(NULL);
}
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
if (from->table->part_info)
{
partition_info *part_info = from->table->part_info;
......@@ -1675,11 +1668,8 @@ group_by_handler *spider_create_group_by_handler(
handler **handlers = partition->get_child_handlers();
spider = (ha_spider *) handlers[part];
} else {
#endif
spider = (ha_spider *) from->table->file;
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
}
#endif
share = spider->share;
spider->idx_for_direct_join = table_idx;
++table_idx;
......@@ -1698,7 +1688,6 @@ group_by_handler *spider_create_group_by_handler(
{
if (from->table->const_table)
continue;
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
if (from->table->part_info)
{
partition_info *part_info = from->table->part_info;
......@@ -1707,11 +1696,8 @@ group_by_handler *spider_create_group_by_handler(
handler **handlers = partition->get_child_handlers();
spider = (ha_spider *) handlers[part];
} else {
#endif
spider = (ha_spider *) from->table->file;
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
}
#endif
share = spider->share;
spider->idx_for_direct_join = table_idx;
++table_idx;
......@@ -1737,7 +1723,6 @@ group_by_handler *spider_create_group_by_handler(
do {
if (from->table->const_table)
continue;
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
if (from->table->part_info)
{
partition_info *part_info = from->table->part_info;
......@@ -1746,11 +1731,8 @@ group_by_handler *spider_create_group_by_handler(
handler **handlers = partition->get_child_handlers();
spider = (ha_spider *) handlers[part];
} else {
#endif
spider = (ha_spider *) from->table->file;
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
}
#endif
share = spider->share;
if (spider_param_skip_default_condition(thd,
share->skip_default_condition))
......@@ -1891,7 +1873,6 @@ group_by_handler *spider_create_group_by_handler(
{
from = from->next_local;
}
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
if (from->table->part_info)
{
partition_info *part_info = from->table->part_info;
......@@ -1900,11 +1881,8 @@ group_by_handler *spider_create_group_by_handler(
handler **handlers = partition->get_child_handlers();
spider = (ha_spider *) handlers[part];
} else {
#endif
spider = (ha_spider *) from->table->file;
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
}
#endif
share = spider->share;
lock_mode = spider_conn_lock_mode(spider);
if (lock_mode)
......@@ -1986,7 +1964,6 @@ group_by_handler *spider_create_group_by_handler(
continue;
fields->clear_conn_holder_from_conn();
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
if (from->table->part_info)
{
partition_info *part_info = from->table->part_info;
......@@ -1995,11 +1972,8 @@ group_by_handler *spider_create_group_by_handler(
handler **handlers = partition->get_child_handlers();
spider = (ha_spider *) handlers[part];
} else {
#endif
spider = (ha_spider *) from->table->file;
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
}
#endif
share = spider->share;
if (!fields->add_table(spider))
{
......
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