Skip to content

Commit e865ef6

Browse files
MDEV-33742 Remove macro PARTITION_HAS_GET_CHILD_HANDLERS
Similar to MDEV-27658. Also fixing the positioning of #ifdef WITH_PARTITION_STORAGE_ENGINE blocks and add missing ones.
1 parent 860c1ca commit e865ef6

File tree

2 files changed

+7
-24
lines changed

2 files changed

+7
-24
lines changed

storage/spider/spd_environ.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#define HANDLER_HAS_TOP_TABLE_FIELDS
2828
#define HANDLER_HAS_DIRECT_UPDATE_ROWS
2929
#define HANDLER_HAS_DIRECT_AGGREGATE
30-
#define PARTITION_HAS_GET_CHILD_HANDLERS
3130
#define PARTITION_HAS_GET_PART_SPEC
3231
#define HA_EXTRA_HAS_STARTING_ORDERED_INDEX_SCAN
3332
#define HANDLER_HAS_NEED_INFO_FOR_AUTO_INC

storage/spider/spd_group_by_handler.cc

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,38 +1433,32 @@ group_by_handler *spider_create_group_by_handler(
14331433
break;
14341434
}
14351435

1436-
#ifdef WITH_PARTITION_STORAGE_ENGINE
14371436
from = query->from;
14381437
do {
14391438
DBUG_PRINT("info",("spider from=%p", from));
14401439
++table_count;
1440+
#ifdef WITH_PARTITION_STORAGE_ENGINE
14411441
if (from->table->part_info)
14421442
{
14431443
DBUG_PRINT("info",("spider partition handler"));
1444-
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
14451444
partition_info *part_info = from->table->part_info;
14461445
uint bits = bitmap_bits_set(&part_info->read_partitions);
14471446
DBUG_PRINT("info",("spider bits=%u", bits));
14481447
if (bits != 1)
14491448
{
14501449
DBUG_PRINT("info",("spider using multiple partitions is not supported by this feature yet"));
1451-
#else
1452-
DBUG_PRINT("info",("spider partition is not supported by this feature yet"));
1453-
#endif
14541450
DBUG_RETURN(NULL);
1455-
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
14561451
}
1457-
#endif
14581452
}
1459-
} while ((from = from->next_local));
14601453
#endif
1454+
} while ((from = from->next_local));
14611455

14621456
if (!(table_holder= spider_create_table_holder(table_count)))
14631457
DBUG_RETURN(NULL);
14641458

14651459
table_idx = 0;
14661460
from = query->from;
1467-
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
1461+
#ifdef WITH_PARTITION_STORAGE_ENGINE
14681462
if (from->table->part_info)
14691463
{
14701464
partition_info *part_info = from->table->part_info;
@@ -1473,9 +1467,7 @@ group_by_handler *spider_create_group_by_handler(
14731467
handler **handlers = partition->get_child_handlers();
14741468
spider = (ha_spider *) handlers[part];
14751469
} else {
1476-
#endif
14771470
spider = (ha_spider *) from->table->file;
1478-
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
14791471
}
14801472
#endif
14811473
share = spider->share;
@@ -1499,7 +1491,7 @@ group_by_handler *spider_create_group_by_handler(
14991491
}
15001492
while ((from = from->next_local))
15011493
{
1502-
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
1494+
#ifdef WITH_PARTITION_STORAGE_ENGINE
15031495
if (from->table->part_info)
15041496
{
15051497
partition_info *part_info = from->table->part_info;
@@ -1508,9 +1500,7 @@ group_by_handler *spider_create_group_by_handler(
15081500
handler **handlers = partition->get_child_handlers();
15091501
spider = (ha_spider *) handlers[part];
15101502
} else {
1511-
#endif
15121503
spider = (ha_spider *) from->table->file;
1513-
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
15141504
}
15151505
#endif
15161506
share = spider->share;
@@ -1541,7 +1531,7 @@ group_by_handler *spider_create_group_by_handler(
15411531

15421532
from = query->from;
15431533
do {
1544-
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
1534+
#ifdef WITH_PARTITION_STORAGE_ENGINE
15451535
if (from->table->part_info)
15461536
{
15471537
partition_info *part_info = from->table->part_info;
@@ -1550,9 +1540,7 @@ group_by_handler *spider_create_group_by_handler(
15501540
handler **handlers = partition->get_child_handlers();
15511541
spider = (ha_spider *) handlers[part];
15521542
} else {
1553-
#endif
15541543
spider = (ha_spider *) from->table->file;
1555-
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
15561544
}
15571545
#endif
15581546
share = spider->share;
@@ -1684,7 +1672,7 @@ group_by_handler *spider_create_group_by_handler(
16841672
goto skip_free_table_holder;
16851673

16861674
from = query->from;
1687-
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
1675+
#ifdef WITH_PARTITION_STORAGE_ENGINE
16881676
if (from->table->part_info)
16891677
{
16901678
partition_info *part_info = from->table->part_info;
@@ -1693,9 +1681,7 @@ group_by_handler *spider_create_group_by_handler(
16931681
handler **handlers = partition->get_child_handlers();
16941682
spider = (ha_spider *) handlers[part];
16951683
} else {
1696-
#endif
16971684
spider = (ha_spider *) from->table->file;
1698-
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
16991685
}
17001686
#endif
17011687
share = spider->share;
@@ -1758,7 +1744,7 @@ group_by_handler *spider_create_group_by_handler(
17581744
{
17591745
fields->clear_conn_holder_from_conn();
17601746

1761-
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
1747+
#ifdef WITH_PARTITION_STORAGE_ENGINE
17621748
if (from->table->part_info)
17631749
{
17641750
partition_info *part_info = from->table->part_info;
@@ -1767,9 +1753,7 @@ group_by_handler *spider_create_group_by_handler(
17671753
handler **handlers = partition->get_child_handlers();
17681754
spider = (ha_spider *) handlers[part];
17691755
} else {
1770-
#endif
17711756
spider = (ha_spider *) from->table->file;
1772-
#if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
17731757
}
17741758
#endif
17751759
share = spider->share;

0 commit comments

Comments
 (0)