@@ -1433,38 +1433,32 @@ group_by_handler *spider_create_group_by_handler(
1433
1433
break ;
1434
1434
}
1435
1435
1436
- #ifdef WITH_PARTITION_STORAGE_ENGINE
1437
1436
from = query->from ;
1438
1437
do {
1439
1438
DBUG_PRINT (" info" ,(" spider from=%p" , from));
1440
1439
++table_count;
1440
+ #ifdef WITH_PARTITION_STORAGE_ENGINE
1441
1441
if (from->table ->part_info )
1442
1442
{
1443
1443
DBUG_PRINT (" info" ,(" spider partition handler" ));
1444
- #if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
1445
1444
partition_info *part_info = from->table ->part_info ;
1446
1445
uint bits = bitmap_bits_set (&part_info->read_partitions );
1447
1446
DBUG_PRINT (" info" ,(" spider bits=%u" , bits));
1448
1447
if (bits != 1 )
1449
1448
{
1450
1449
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
1454
1450
DBUG_RETURN (NULL );
1455
- #if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
1456
1451
}
1457
- #endif
1458
1452
}
1459
- } while ((from = from->next_local ));
1460
1453
#endif
1454
+ } while ((from = from->next_local ));
1461
1455
1462
1456
if (!(table_holder= spider_create_table_holder (table_count)))
1463
1457
DBUG_RETURN (NULL );
1464
1458
1465
1459
table_idx = 0 ;
1466
1460
from = query->from ;
1467
- #if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
1461
+ #ifdef WITH_PARTITION_STORAGE_ENGINE
1468
1462
if (from->table ->part_info )
1469
1463
{
1470
1464
partition_info *part_info = from->table ->part_info ;
@@ -1473,9 +1467,7 @@ group_by_handler *spider_create_group_by_handler(
1473
1467
handler **handlers = partition->get_child_handlers ();
1474
1468
spider = (ha_spider *) handlers[part];
1475
1469
} else {
1476
- #endif
1477
1470
spider = (ha_spider *) from->table ->file ;
1478
- #if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
1479
1471
}
1480
1472
#endif
1481
1473
share = spider->share ;
@@ -1499,7 +1491,7 @@ group_by_handler *spider_create_group_by_handler(
1499
1491
}
1500
1492
while ((from = from->next_local ))
1501
1493
{
1502
- #if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
1494
+ #ifdef WITH_PARTITION_STORAGE_ENGINE
1503
1495
if (from->table ->part_info )
1504
1496
{
1505
1497
partition_info *part_info = from->table ->part_info ;
@@ -1508,9 +1500,7 @@ group_by_handler *spider_create_group_by_handler(
1508
1500
handler **handlers = partition->get_child_handlers ();
1509
1501
spider = (ha_spider *) handlers[part];
1510
1502
} else {
1511
- #endif
1512
1503
spider = (ha_spider *) from->table ->file ;
1513
- #if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
1514
1504
}
1515
1505
#endif
1516
1506
share = spider->share ;
@@ -1541,7 +1531,7 @@ group_by_handler *spider_create_group_by_handler(
1541
1531
1542
1532
from = query->from ;
1543
1533
do {
1544
- #if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
1534
+ #ifdef WITH_PARTITION_STORAGE_ENGINE
1545
1535
if (from->table ->part_info )
1546
1536
{
1547
1537
partition_info *part_info = from->table ->part_info ;
@@ -1550,9 +1540,7 @@ group_by_handler *spider_create_group_by_handler(
1550
1540
handler **handlers = partition->get_child_handlers ();
1551
1541
spider = (ha_spider *) handlers[part];
1552
1542
} else {
1553
- #endif
1554
1543
spider = (ha_spider *) from->table ->file ;
1555
- #if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
1556
1544
}
1557
1545
#endif
1558
1546
share = spider->share ;
@@ -1684,7 +1672,7 @@ group_by_handler *spider_create_group_by_handler(
1684
1672
goto skip_free_table_holder;
1685
1673
1686
1674
from = query->from ;
1687
- #if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
1675
+ #ifdef WITH_PARTITION_STORAGE_ENGINE
1688
1676
if (from->table ->part_info )
1689
1677
{
1690
1678
partition_info *part_info = from->table ->part_info ;
@@ -1693,9 +1681,7 @@ group_by_handler *spider_create_group_by_handler(
1693
1681
handler **handlers = partition->get_child_handlers ();
1694
1682
spider = (ha_spider *) handlers[part];
1695
1683
} else {
1696
- #endif
1697
1684
spider = (ha_spider *) from->table ->file ;
1698
- #if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
1699
1685
}
1700
1686
#endif
1701
1687
share = spider->share ;
@@ -1758,7 +1744,7 @@ group_by_handler *spider_create_group_by_handler(
1758
1744
{
1759
1745
fields->clear_conn_holder_from_conn ();
1760
1746
1761
- #if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
1747
+ #ifdef WITH_PARTITION_STORAGE_ENGINE
1762
1748
if (from->table ->part_info )
1763
1749
{
1764
1750
partition_info *part_info = from->table ->part_info ;
@@ -1767,9 +1753,7 @@ group_by_handler *spider_create_group_by_handler(
1767
1753
handler **handlers = partition->get_child_handlers ();
1768
1754
spider = (ha_spider *) handlers[part];
1769
1755
} else {
1770
- #endif
1771
1756
spider = (ha_spider *) from->table ->file ;
1772
- #if defined(PARTITION_HAS_GET_CHILD_HANDLERS)
1773
1757
}
1774
1758
#endif
1775
1759
share = spider->share ;
0 commit comments