diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2016-12-30 15:04:10 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2016-12-30 16:05:42 +0200 |
commit | 63574f1275eda0f0ed439f4896b6e7daf6832a8f (patch) | |
tree | aead50be1af894234be2be8d06c341e328bf8636 /storage/innobase/buf | |
parent | 9ebd76733198578e0ac8ca854d667ab114b3d581 (diff) | |
download | mariadb-git-63574f1275eda0f0ed439f4896b6e7daf6832a8f.tar.gz |
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.
Diffstat (limited to 'storage/innobase/buf')
-rw-r--r-- | storage/innobase/buf/buf0buf.cc | 71 | ||||
-rw-r--r-- | storage/innobase/buf/buf0dblwr.cc | 4 | ||||
-rw-r--r-- | storage/innobase/buf/buf0flu.cc | 7 | ||||
-rw-r--r-- | storage/innobase/buf/buf0lru.cc | 2 |
4 files changed, 4 insertions, 80 deletions
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index ffd739bc686..935b7fadafa 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -49,7 +49,6 @@ Created 11/5/1995 Heikki Tuuri #include "fil0fil.h" #include "fil0crypt.h" #include "fsp0sysspace.h" -#ifndef UNIV_HOTBACKUP #include "buf0buddy.h" #include "lock0lock.h" #include "sync0rw.h" @@ -59,7 +58,6 @@ Created 11/5/1995 Heikki Tuuri #include "trx0purge.h" #include "log0log.h" #include "dict0stats_bg.h" -#endif /* !UNIV_HOTBACKUP */ #include "srv0srv.h" #include "srv0start.h" #include "dict0dict.h" @@ -323,7 +321,7 @@ that the whole area may be needed in the near future, and issue the read requests for the whole area. */ -#if (!(defined(UNIV_HOTBACKUP) || defined(UNIV_INNOCHECKSUM))) +#ifndef UNIV_INNOCHECKSUM /** Value in microseconds */ static const int WAIT_FOR_READ = 100; static const int WAIT_FOR_WRITE = 100; @@ -591,7 +589,7 @@ buf_block_alloc( return(block); } -#endif /* !UNIV_HOTBACKUP && !UNIV_INNOCHECKSUM */ +#endif /* !UNIV_INNOCHECKSUM */ /** Checks if a page contains only zeroes. @param[in] read_buf database page @@ -883,7 +881,7 @@ buf_page_is_corrupted( return(TRUE); } -#if !defined(UNIV_HOTBACKUP) && !defined(UNIV_INNOCHECKSUM) +#ifndef UNIV_INNOCHECKSUM if (check_lsn && recv_lsn_checks_on) { lsn_t current_lsn; const lsn_t page_lsn @@ -913,7 +911,7 @@ buf_page_is_corrupted( } } -#endif /* !UNIV_HOTBACKUP && !UNIV_INNOCHECKSUM */ +#endif /* !UNIV_INNOCHECKSUM */ /* Check whether the checksum fields have correct values */ @@ -1264,9 +1262,7 @@ buf_page_print( const page_size_t& page_size, ulint flags) { -#ifndef UNIV_HOTBACKUP dict_index_t* index; -#endif /* !UNIV_HOTBACKUP */ if (!(flags & BUF_PAGE_PRINT_NO_FULL)) { @@ -1372,7 +1368,6 @@ buf_page_print( read_buf + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID); } -#ifndef UNIV_HOTBACKUP if (mach_read_from_2(read_buf + TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_TYPE) == TRX_UNDO_INSERT) { fprintf(stderr, @@ -1383,7 +1378,6 @@ buf_page_print( fprintf(stderr, "InnoDB: Page may be an update undo log page\n"); } -#endif /* !UNIV_HOTBACKUP */ switch (fil_page_get_type(read_buf)) { index_id_t index_id; @@ -1394,7 +1388,6 @@ buf_page_print( "InnoDB: Page may be an index page where" " index id is " << index_id; -#ifndef UNIV_HOTBACKUP index = dict_index_find_on_id_low(index_id); if (index) { ib::info() @@ -1402,7 +1395,6 @@ buf_page_print( << " is " << index->name << " in table " << index->table->name; } -#endif /* !UNIV_HOTBACKUP */ break; case FIL_PAGE_INODE: fputs("InnoDB: Page may be an 'inode' page\n", stderr); @@ -1449,8 +1441,6 @@ buf_page_print( ut_ad(flags & BUF_PAGE_PRINT_NO_CRASH); } -#ifndef UNIV_HOTBACKUP - # ifdef PFS_GROUP_BUFFER_SYNC extern mysql_pfs_key_t buffer_block_mutex_key; @@ -3936,7 +3926,6 @@ buf_block_init_low( block->n_bytes = 0; block->left_side = TRUE; } -#endif /* !UNIV_HOTBACKUP */ /********************************************************************//** Decompress a block. @@ -4007,7 +3996,6 @@ buf_zip_decompress( return(FALSE); } -#ifndef UNIV_HOTBACKUP /** Get a buffer block from an adaptive hash index pointer. This function does not return if the block is not identified. @param[in] ptr pointer to within a page frame @@ -7339,57 +7327,6 @@ buf_pool_check_no_pending_io(void) return(pending_io); } -#if 0 -Code currently not used -/*********************************************************************//** -Gets the current length of the free list of buffer blocks. -@return length of the free list */ -ulint -buf_get_free_list_len(void) -/*=======================*/ -{ - ulint len; - - buf_pool_mutex_enter(buf_pool); - - len = UT_LIST_GET_LEN(buf_pool->free); - - buf_pool_mutex_exit(buf_pool); - - return(len); -} -#endif - -#else /* !UNIV_HOTBACKUP */ - -/** Inits a page to the buffer buf_pool, for use in mysqlbackup --restore. -@param[in] page_id page id -@param[in] page_size page size -@param[in,out] block block to init */ -void -buf_page_init_for_backup_restore( - const page_id_t& page_id, - const page_size_t& page_size, - buf_block_t* block) -{ - block->page.state = BUF_BLOCK_FILE_PAGE; - block->page.id = page_id; - block->page.size.copy_from(page_size); - - page_zip_des_init(&block->page.zip); - - /* We assume that block->page.data has been allocated - with page_size == univ_page_size. */ - if (page_size.is_compressed()) { - page_zip_set_size(&block->page.zip, page_size.physical()); - block->page.zip.data = block->frame + page_size.logical(); - } else { - page_zip_set_size(&block->page.zip, 0); - } -} - -#endif /* !UNIV_HOTBACKUP */ - /** Print the given page_id_t object. @param[in,out] out the output stream @param[in] page_id the page_id_t object to be printed diff --git a/storage/innobase/buf/buf0dblwr.cc b/storage/innobase/buf/buf0dblwr.cc index ff1d2057e6a..5f46576ad7e 100644 --- a/storage/innobase/buf/buf0dblwr.cc +++ b/storage/innobase/buf/buf0dblwr.cc @@ -40,8 +40,6 @@ Created 2011/12/19 #include "fil0crypt.h" #include "fil0pagecompress.h" -#ifndef UNIV_HOTBACKUP - /** The doublewrite buffer */ buf_dblwr_t* buf_dblwr = NULL; @@ -1195,7 +1193,6 @@ try_again: } else { ut_a(buf_page_get_state(bpage) == BUF_BLOCK_FILE_PAGE); - UNIV_MEM_ASSERT_RW(frame, bpage->size.logical()); @@ -1360,4 +1357,3 @@ retry: blocks. Next do the write to the intended position. */ buf_dblwr_write_block_to_datafile(bpage, sync); } -#endif /* !UNIV_HOTBACKUP */ diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc index 179430a0d27..b82c4db18ad 100644 --- a/storage/innobase/buf/buf0flu.cc +++ b/storage/innobase/buf/buf0flu.cc @@ -41,7 +41,6 @@ Created 11/11/1995 Heikki Tuuri #include "srv0start.h" #include "srv0srv.h" #include "page0zip.h" -#ifndef UNIV_HOTBACKUP #include "ut0byte.h" #include "page0page.h" #include "fil0fil.h" @@ -806,7 +805,6 @@ buf_flush_write_complete( buf_dblwr_update(bpage, flush_type); } -#endif /* !UNIV_HOTBACKUP */ /** Calculate the checksum of a page from compressed table and update the page. @@ -995,7 +993,6 @@ buf_flush_init_for_writing( checksum); } -#ifndef UNIV_HOTBACKUP /********************************************************************//** Does an asynchronous write of a buffer page. NOTE: in simulated aio and also when the doublewrite buffer is used, we must call @@ -2264,8 +2261,6 @@ buf_flush_single_page_from_LRU( scanned); } - - ut_ad(!buf_pool_mutex_own(buf_pool)); return(freed); } @@ -2521,7 +2516,6 @@ page_cleaner_flush_pages_recommendation( lsn_avg_rate = (lsn_avg_rate + lsn_rate) / 2; - /* aggregate stats of all slots */ mutex_enter(&page_cleaner->mutex); @@ -3679,7 +3673,6 @@ buf_flush_validate( } #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ -#endif /* !UNIV_HOTBACKUP */ /******************************************************************//** Check if there are any dirty pages that belong to a space id in the flush diff --git a/storage/innobase/buf/buf0lru.cc b/storage/innobase/buf/buf0lru.cc index 5d2077763a6..6a57e6746ff 100644 --- a/storage/innobase/buf/buf0lru.cc +++ b/storage/innobase/buf/buf0lru.cc @@ -28,7 +28,6 @@ Created 11/5/1995 Heikki Tuuri #include "buf0lru.ic" #endif /* UNIV_NOINL */ -#ifndef UNIV_HOTBACKUP #include "ut0byte.h" #include "ut0rnd.h" #include "sync0rw.h" @@ -2791,4 +2790,3 @@ buf_LRU_print(void) } } #endif /* UNIV_DEBUG_PRINT || UNIV_DEBUG || UNIV_BUF_DEBUG */ -#endif /* !UNIV_HOTBACKUP */ |