@@ -147,12 +147,8 @@ class ha_spider final : public handler
147
147
bool use_pre_action;
148
148
bool pre_bitmap_checked;
149
149
bool bulk_insert;
150
- #ifdef HANDLER_HAS_NEED_INFO_FOR_AUTO_INC
151
150
bool info_auto_called;
152
- #endif
153
- #ifdef HANDLER_HAS_CAN_USE_FOR_AUTO_INC_INIT
154
151
bool auto_inc_temporary;
155
- #endif
156
152
int bulk_size= 0 ;
157
153
int direct_dup_insert;
158
154
int store_error_num;
@@ -175,21 +171,15 @@ class ha_spider final : public handler
175
171
corresponding m_handler_cid is t00003
176
172
*/
177
173
char **m_handler_cid;
178
- #ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS
179
174
bool do_direct_update;
180
175
uint direct_update_kinds;
181
- #endif
182
176
spider_index_rnd_init prev_index_rnd_init;
183
- #ifdef HANDLER_HAS_DIRECT_AGGREGATE
184
177
SPIDER_ITEM_HLD *direct_aggregate_item_first;
185
178
SPIDER_ITEM_HLD *direct_aggregate_item_current;
186
- #endif
187
179
ha_rows table_rows;
188
- #ifdef HA_HAS_CHECKSUM_EXTENDED
189
180
ha_checksum checksum_val;
190
181
bool checksum_null;
191
182
uint action_flags;
192
- #endif
193
183
194
184
/* for fulltext search */
195
185
bool ft_init_and_first;
@@ -436,10 +426,8 @@ class ha_spider final : public handler
436
426
int check_crd ();
437
427
int pre_records () override ;
438
428
ha_rows records () override ;
439
- #ifdef HA_HAS_CHECKSUM_EXTENDED
440
429
int pre_calculate_checksum () override ;
441
430
int calculate_checksum () override ;
442
- #endif
443
431
const char *table_type () const override ;
444
432
ulonglong table_flags () const override ;
445
433
ulong table_flags_for_partition ();
@@ -457,12 +445,8 @@ class ha_spider final : public handler
457
445
uint max_supported_key_length () const override ;
458
446
uint max_supported_key_part_length () const override ;
459
447
uint8 table_cache_type () override ;
460
- #ifdef HANDLER_HAS_NEED_INFO_FOR_AUTO_INC
461
448
bool need_info_for_auto_inc () override ;
462
- #endif
463
- #ifdef HANDLER_HAS_CAN_USE_FOR_AUTO_INC_INIT
464
449
bool can_use_for_auto_inc_init () override ;
465
- #endif
466
450
int update_auto_increment ();
467
451
void get_auto_increment (
468
452
ulonglong offset,
@@ -475,16 +459,10 @@ class ha_spider final : public handler
475
459
ulonglong value
476
460
) override ;
477
461
void release_auto_increment () override ;
478
- #ifdef SPIDER_HANDLER_START_BULK_INSERT_HAS_FLAGS
479
462
void start_bulk_insert (
480
463
ha_rows rows,
481
464
uint flags
482
465
) override ;
483
- #else
484
- void start_bulk_insert (
485
- ha_rows rows
486
- );
487
- #endif
488
466
int end_bulk_insert () override ;
489
467
int write_row (
490
468
const uchar *buf
@@ -494,18 +472,15 @@ class ha_spider final : public handler
494
472
uchar *buf
495
473
);
496
474
#endif
497
- #ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS
498
475
void direct_update_init (
499
476
THD *thd,
500
477
bool hs_request
501
478
);
502
- #endif
503
479
bool start_bulk_update () override ;
504
480
int exec_bulk_update (
505
481
ha_rows *dup_key_found
506
482
) override ;
507
483
int end_bulk_update () override ;
508
- #ifdef SPIDER_UPDATE_ROW_HAS_CONST_NEW_DATA
509
484
int bulk_update_row (
510
485
const uchar *old_data,
511
486
const uchar *new_data,
@@ -515,25 +490,12 @@ class ha_spider final : public handler
515
490
const uchar *old_data,
516
491
const uchar *new_data
517
492
) override ;
518
- #else
519
- int bulk_update_row (
520
- const uchar *old_data,
521
- uchar *new_data,
522
- ha_rows *dup_key_found
523
- );
524
- int update_row (
525
- const uchar *old_data,
526
- uchar *new_data
527
- );
528
- #endif
529
- #ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS
530
493
bool check_direct_update_sql_part (
531
494
st_select_lex *select_lex,
532
495
longlong select_limit,
533
496
longlong offset_limit
534
497
);
535
498
#ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS_WITH_HS
536
- #ifdef SPIDER_MDEV_16246
537
499
inline int direct_update_rows_init (
538
500
List<Item> *update_fields
539
501
) {
@@ -548,30 +510,12 @@ class ha_spider final : public handler
548
510
uchar *new_data
549
511
);
550
512
#else
551
- inline int direct_update_rows_init ()
552
- {
553
- return direct_update_rows_init (2 , NULL , 0 , FALSE , NULL );
554
- }
555
- int direct_update_rows_init (
556
- uint mode,
557
- KEY_MULTI_RANGE *ranges,
558
- uint range_count,
559
- bool sorted,
560
- uchar *new_data
561
- );
562
- #endif
563
- #else
564
- #ifdef SPIDER_MDEV_16246
565
513
int direct_update_rows_init (
566
514
List<Item> *update_fields
567
515
) override ;
568
- #else
569
- int direct_update_rows_init ();
570
- #endif
571
516
#endif
572
517
#ifdef HA_CAN_BULK_ACCESS
573
518
#ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS_WITH_HS
574
- #ifdef SPIDER_MDEV_16246
575
519
inline int pre_direct_update_rows_init (
576
520
List<Item> *update_fields
577
521
) {
@@ -586,26 +530,9 @@ class ha_spider final : public handler
586
530
uchar *new_data
587
531
);
588
532
#else
589
- inline int pre_direct_update_rows_init ()
590
- {
591
- return pre_direct_update_rows_init (2 , NULL , 0 , FALSE , NULL );
592
- }
593
- int pre_direct_update_rows_init (
594
- uint mode,
595
- KEY_MULTI_RANGE *ranges,
596
- uint range_count,
597
- bool sorted,
598
- uchar *new_data
599
- );
600
- #endif
601
- #else
602
- #ifdef SPIDER_MDEV_16246
603
533
int pre_direct_update_rows_init (
604
534
List<Item> *update_fields
605
535
);
606
- #else
607
- int pre_direct_update_rows_init ();
608
- #endif
609
536
#endif
610
537
#endif
611
538
#ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS_WITH_HS
@@ -648,14 +575,12 @@ class ha_spider final : public handler
648
575
#else
649
576
int pre_direct_update_rows ();
650
577
#endif
651
- #endif
652
578
#endif
653
579
bool start_bulk_delete () override ;
654
580
int end_bulk_delete () override ;
655
581
int delete_row (
656
582
const uchar *buf
657
583
) override ;
658
- #ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS
659
584
bool check_direct_delete_sql_part (
660
585
st_select_lex *select_lex,
661
586
longlong select_limit,
@@ -724,7 +649,6 @@ class ha_spider final : public handler
724
649
#else
725
650
int pre_direct_delete_rows ();
726
651
#endif
727
- #endif
728
652
#endif
729
653
int delete_all_rows () override ;
730
654
int truncate () override ;
@@ -808,9 +732,7 @@ class ha_spider final : public handler
808
732
uint info_type,
809
733
void *info
810
734
) override ;
811
- #ifdef HANDLER_HAS_DIRECT_AGGREGATE
812
735
void return_record_by_parent () override ;
813
- #endif
814
736
TABLE *get_table ();
815
737
void set_ft_discard_bitmap ();
816
738
void set_searched_bitmap ();
@@ -895,9 +817,7 @@ class ha_spider final : public handler
895
817
void check_pre_call (
896
818
bool use_parallel
897
819
);
898
- #ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS
899
820
void check_insert_dup_update_pushdown ();
900
- #endif
901
821
#ifdef HA_CAN_BULK_ACCESS
902
822
SPIDER_BULK_ACCESS_LINK *create_bulk_access_link ();
903
823
void delete_bulk_access_link (
@@ -926,10 +846,7 @@ class ha_spider final : public handler
926
846
int append_insert_sql_part ();
927
847
int append_update_sql_part ();
928
848
int append_update_set_sql_part ();
929
- #ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS
930
849
int append_direct_update_set_sql_part ();
931
- #endif
932
- #ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS
933
850
int append_dup_update_pushdown_sql_part (
934
851
const char *alias,
935
852
uint alias_length
@@ -939,7 +856,6 @@ class ha_spider final : public handler
939
856
uint alias_length
940
857
);
941
858
int check_update_columns_sql_part ();
942
- #endif
943
859
int append_delete_sql_part ();
944
860
int append_select_sql_part (
945
861
ulong sql_type
@@ -1003,13 +919,11 @@ class ha_spider final : public handler
1003
919
ulong sql_type,
1004
920
bool test_flg
1005
921
);
1006
- #ifdef HANDLER_HAS_DIRECT_AGGREGATE
1007
922
int append_sum_select_sql_part (
1008
923
ulong sql_type,
1009
924
const char *alias,
1010
925
uint alias_length
1011
926
);
1012
- #endif
1013
927
int append_match_select_sql_part (
1014
928
ulong sql_type,
1015
929
const char *alias,
@@ -1021,13 +935,11 @@ class ha_spider final : public handler
1021
935
void set_order_to_pos_sql (
1022
936
ulong sql_type
1023
937
);
1024
- #ifdef HANDLER_HAS_DIRECT_AGGREGATE
1025
938
int append_group_by_sql_part (
1026
939
const char *alias,
1027
940
uint alias_length,
1028
941
ulong sql_type
1029
942
);
1030
- #endif
1031
943
int append_key_order_for_merge_with_alias_sql_part (
1032
944
const char *alias,
1033
945
uint alias_length,
0 commit comments