Skip to content

Commit 63574f1

Browse files
committed
MDEV-11690 Remove UNIV_HOTBACKUP
The InnoDB source code contains quite a few references to a closed-source hot backup tool which was originally called InnoDB Hot Backup (ibbackup) and later incorporated in MySQL Enterprise Backup. The open source backup tool XtraBackup uses the full database for recovery. So, the references to UNIV_HOTBACKUP are only cluttering the source code.
1 parent 9ebd767 commit 63574f1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+261
-2930
lines changed

storage/innobase/btr/btr0btr.cc

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ Created 6/2/1994 Heikki Tuuri
3737
#include "page0zip.h"
3838
#include "gis0rtree.h"
3939

40-
#ifndef UNIV_HOTBACKUP
4140
#include "btr0cur.h"
4241
#include "btr0sea.h"
4342
#include "btr0pcur.h"
@@ -64,8 +63,6 @@ btr_can_merge_with_page(
6463
buf_block_t** merge_block, /*!< out: the merge block */
6564
mtr_t* mtr); /*!< in: mini-transaction */
6665

67-
#endif /* UNIV_HOTBACKUP */
68-
6966
/**************************************************************//**
7067
Report that an index page is corrupted. */
7168
void
@@ -80,7 +77,6 @@ btr_corruption_report(
8077
<< " of table " << index->table->name;
8178
}
8279

83-
#ifndef UNIV_HOTBACKUP
8480
/*
8581
Latching strategy of the InnoDB B-tree
8682
--------------------------------------
@@ -174,7 +170,6 @@ btr_root_block_get(
174170
buf_block_t* block = btr_block_get(page_id, page_size, mode,
175171
index, mtr);
176172

177-
178173
if (!block) {
179174
if (index && index->table) {
180175
index->table->is_encrypted = TRUE;
@@ -1526,7 +1521,6 @@ btr_write_autoinc(dict_index_t* index, ib_uint64_t autoinc, bool reset)
15261521
fil_space_release(space);
15271522
}
15281523
}
1529-
#endif /* !UNIV_HOTBACKUP */
15301524

15311525
/*************************************************************//**
15321526
Reorganizes an index page.
@@ -1554,9 +1548,7 @@ btr_page_reorganize_low(
15541548
mtr_t* mtr) /*!< in/out: mini-transaction */
15551549
{
15561550
buf_block_t* block = page_cur_get_block(cursor);
1557-
#ifndef UNIV_HOTBACKUP
15581551
buf_pool_t* buf_pool = buf_pool_from_bpage(&block->page);
1559-
#endif /* !UNIV_HOTBACKUP */
15601552
page_t* page = buf_block_get_frame(block);
15611553
page_zip_des_t* page_zip = buf_block_get_page_zip(block);
15621554
buf_block_t* temp_block;
@@ -1581,12 +1573,7 @@ btr_page_reorganize_low(
15811573
/* Turn logging off */
15821574
mtr_log_t log_mode = mtr_set_log_mode(mtr, MTR_LOG_NONE);
15831575

1584-
#ifndef UNIV_HOTBACKUP
15851576
temp_block = buf_block_alloc(buf_pool);
1586-
#else /* !UNIV_HOTBACKUP */
1587-
ut_ad(block == back_block1);
1588-
temp_block = back_block2;
1589-
#endif /* !UNIV_HOTBACKUP */
15901577
temp_page = temp_block->frame;
15911578

15921579
MONITOR_INC(MONITOR_INDEX_REORG_ATTEMPTS);
@@ -1599,11 +1586,9 @@ btr_page_reorganize_low(
15991586
/* Copy the old page to temporary space */
16001587
buf_frame_copy(temp_page, page);
16011588

1602-
#ifndef UNIV_HOTBACKUP
16031589
if (!recovery) {
16041590
btr_search_drop_page_hash_index(block);
16051591
}
1606-
#endif /* !UNIV_HOTBACKUP */
16071592

16081593
/* Save the cursor position. */
16091594
pos = page_rec_get_n_recs_before(page_cur_get_rec(cursor));
@@ -1678,12 +1663,10 @@ btr_page_reorganize_low(
16781663
goto func_exit;
16791664
}
16801665

1681-
#ifndef UNIV_HOTBACKUP
16821666
if (!recovery && !dict_table_is_locking_disabled(index->table)) {
16831667
/* Update the record lock bitmaps */
16841668
lock_move_reorganize_page(block, temp_block);
16851669
}
1686-
#endif /* !UNIV_HOTBACKUP */
16871670

16881671
data_size2 = page_get_data_size(page);
16891672
max_ins_size2 = page_get_max_insert_size_after_reorganize(page, 1);
@@ -1712,14 +1695,11 @@ btr_page_reorganize_low(
17121695
#ifdef UNIV_ZIP_DEBUG
17131696
ut_a(!page_zip || page_zip_validate(page_zip, page, index));
17141697
#endif /* UNIV_ZIP_DEBUG */
1715-
#ifndef UNIV_HOTBACKUP
17161698
buf_block_free(temp_block);
1717-
#endif /* !UNIV_HOTBACKUP */
17181699

17191700
/* Restore logging mode */
17201701
mtr_set_log_mode(mtr, log_mode);
17211702

1722-
#ifndef UNIV_HOTBACKUP
17231703
if (success) {
17241704
mlog_id_t type;
17251705
byte* log_ptr;
@@ -1748,7 +1728,6 @@ btr_page_reorganize_low(
17481728

17491729
MONITOR_INC(MONITOR_INDEX_REORG_SUCCESSFUL);
17501730
}
1751-
#endif /* !UNIV_HOTBACKUP */
17521731

17531732
return(success);
17541733
}
@@ -1784,7 +1763,6 @@ btr_page_reorganize_block(
17841763
return(btr_page_reorganize_low(recovery, z_level, &cur, index, mtr));
17851764
}
17861765

1787-
#ifndef UNIV_HOTBACKUP
17881766
/*************************************************************//**
17891767
Reorganizes an index page.
17901768
@@ -1806,7 +1784,6 @@ btr_page_reorganize(
18061784
return(btr_page_reorganize_low(false, page_zip_level,
18071785
cursor, index, mtr));
18081786
}
1809-
#endif /* !UNIV_HOTBACKUP */
18101787

18111788
/***********************************************************//**
18121789
Parses a redo log record of reorganizing a page.
@@ -1850,7 +1827,6 @@ btr_parse_page_reorganize(
18501827
return(ptr);
18511828
}
18521829

1853-
#ifndef UNIV_HOTBACKUP
18541830
/*************************************************************//**
18551831
Empties an index page. @see btr_page_create(). */
18561832
static
@@ -3345,9 +3321,6 @@ btr_set_min_rec_mark_log(
33453321
/* Write rec offset as a 2-byte ulint */
33463322
mlog_catenate_ulint(mtr, page_offset(rec), MLOG_2BYTES);
33473323
}
3348-
#else /* !UNIV_HOTBACKUP */
3349-
# define btr_set_min_rec_mark_log(rec,comp,mtr) ((void) 0)
3350-
#endif /* !UNIV_HOTBACKUP */
33513324

33523325
/****************************************************************//**
33533326
Parses the redo log record for setting an index record as the predefined
@@ -3405,7 +3378,6 @@ btr_set_min_rec_mark(
34053378
}
34063379
}
34073380

3408-
#ifndef UNIV_HOTBACKUP
34093381
/*************************************************************//**
34103382
Deletes on the upper level the node pointer to a page. */
34113383
void
@@ -5497,7 +5469,6 @@ btr_can_merge_with_page(
54975469
goto error;
54985470
}
54995471

5500-
55015472
max_ins_size = page_get_max_insert_size(mpage, n_recs);
55025473

55035474
if (data_size > max_ins_size) {
@@ -5531,5 +5502,3 @@ btr_can_merge_with_page(
55315502
*merge_block = NULL;
55325503
DBUG_RETURN(false);
55335504
}
5534-
5535-
#endif /* !UNIV_HOTBACKUP */

storage/innobase/btr/btr0cur.cc

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ Created 10/16/1994 Heikki Tuuri
5050
#endif
5151

5252
#include "row0upd.h"
53-
#ifndef UNIV_HOTBACKUP
5453
#include "mtr0log.h"
5554
#include "page0page.h"
5655
#include "page0zip.h"
@@ -151,9 +150,7 @@ can be released by page reorganize, then it is reorganized */
151150
+ (sample) - 1 + (ext_size) + (not_empty)) / ((sample) + (ext_size)))
152151

153152
/* @} */
154-
#endif /* !UNIV_HOTBACKUP */
155153

156-
#ifndef UNIV_HOTBACKUP
157154
/*******************************************************************//**
158155
Marks all extern fields in a record as owned by the record. This function
159156
should be called if the delete mark of a record is removed: a not delete
@@ -212,9 +209,7 @@ btr_rec_free_externally_stored_fields(
212209
mtr_t* mtr); /*!< in: mini-transaction handle which contains
213210
an X-latch to record page and to the index
214211
tree */
215-
#endif /* !UNIV_HOTBACKUP */
216212

217-
#ifndef UNIV_HOTBACKUP
218213
/*==================== B-TREE SEARCH =========================*/
219214

220215
#if MTR_MEMO_PAGE_S_FIX != RW_S_LATCH
@@ -3257,7 +3252,6 @@ btr_cur_pessimistic_insert(
32573252
ut_ad(page_rec_get_next(btr_cur_get_rec(cursor)) == *rec
32583253
|| dict_index_is_spatial(index));
32593254

3260-
32613255
if (!(flags & BTR_NO_LOCKING_FLAG)) {
32623256
ut_ad(!dict_table_is_temporary(index->table));
32633257
if (dict_index_is_spatial(index)) {
@@ -3425,7 +3419,6 @@ btr_cur_update_in_place_log(
34253419

34263420
row_upd_index_write_log(update, log_ptr, mtr);
34273421
}
3428-
#endif /* UNIV_HOTBACKUP */
34293422

34303423
/***********************************************************//**
34313424
Parses a redo log record of updating a record in-place.
@@ -3504,7 +3497,6 @@ btr_cur_parse_update_in_place(
35043497
return(ptr);
35053498
}
35063499

3507-
#ifndef UNIV_HOTBACKUP
35083500
/*************************************************************//**
35093501
See if there is enough place in the page modification log to log
35103502
an update-in-place.
@@ -4525,7 +4517,6 @@ btr_cur_del_mark_set_clust_rec_log(
45254517

45264518
mlog_close(mtr, log_ptr);
45274519
}
4528-
#endif /* !UNIV_HOTBACKUP */
45294520

45304521
/****************************************************************//**
45314522
Parses the redo log record for delete marking or unmarking of a clustered
@@ -4607,7 +4598,6 @@ btr_cur_parse_del_mark_set_clust_rec(
46074598
return(ptr);
46084599
}
46094600

4610-
#ifndef UNIV_HOTBACKUP
46114601
/***********************************************************//**
46124602
Marks a clustered index record deleted. Writes an undo log record to
46134603
undo log on this delete marking. Writes in the trx id field the id
@@ -4729,7 +4719,6 @@ btr_cur_del_mark_set_sec_rec_log(
47294719

47304720
mlog_close(mtr, log_ptr);
47314721
}
4732-
#endif /* !UNIV_HOTBACKUP */
47334722

47344723
/****************************************************************//**
47354724
Parses the redo log record for delete marking or unmarking of a secondary
@@ -4774,7 +4763,6 @@ btr_cur_parse_del_mark_set_sec_rec(
47744763
return(ptr);
47754764
}
47764765

4777-
#ifndef UNIV_HOTBACKUP
47784766
/***********************************************************//**
47794767
Sets a secondary index record delete mark to TRUE or FALSE.
47804768
@return DB_SUCCESS, DB_LOCK_WAIT, or error number */
@@ -5367,7 +5355,6 @@ btr_estimate_n_rows_in_range_on_level(
53675355
goto inexact;
53685356
}
53695357

5370-
53715358
page = buf_block_get_frame(block);
53725359

53735360
/* It is possible that the tree has been reorganized in the
@@ -5603,7 +5590,6 @@ btr_estimate_n_rows_in_range_low(
56035590
<< " index: " << index->name;
56045591
}
56055592

5606-
56075593
ut_ad(page_rec_is_supremum(btr_cur_get_rec(&cursor)));
56085594

56095595
/* The range specified is wihout a right border, just
@@ -6090,7 +6076,6 @@ btr_estimate_number_of_different_key_vals(
60906076
}
60916077
}
60926078

6093-
60946079
if (n_cols == dict_index_get_n_unique_in_tree(index)) {
60956080

60966081
/* If there is more than one leaf page in the tree,
@@ -6606,7 +6591,6 @@ struct btr_blob_log_check_t {
66066591
}
66076592
};
66086593

6609-
66106594
/*******************************************************************//**
66116595
Stores the fields in big_rec_vec to the tablespace and puts pointers to
66126596
them in rec. The extern flags in rec will have to be set beforehand.
@@ -7790,4 +7774,3 @@ btr_rec_copy_externally_stored_field(
77907774
return(btr_copy_externally_stored_field(len, data,
77917775
page_size, local_len, heap));
77927776
}
7793-
#endif /* !UNIV_HOTBACKUP */

storage/innobase/btr/btr0defragment.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Modified 30/07/2014 Jan Lindström jan.lindstrom@mariadb.com
2626
*******************************************************/
2727

2828
#include "btr0defragment.h"
29-
#ifndef UNIV_HOTBACKUP
3029
#include "btr0btr.h"
3130
#include "btr0cur.h"
3231
#include "btr0sea.h"
@@ -847,5 +846,3 @@ DECLARE_THREAD(btr_defragment_thread)(
847846
os_thread_exit();
848847
OS_THREAD_DUMMY_RETURN;
849848
}
850-
851-
#endif /* !UNIV_HOTBACKUP */

0 commit comments

Comments
 (0)