Commit 0c7c4492 authored by Marko Mäkelä's avatar Marko Mäkelä

Remove unused DBUG_EXECUTE_IF "ignore_punch_hole"

Since commit ea21d630 we
conditionally define a variable that only plays a role on
systems that support hole-punching (explicit creation of sparse files).
However, that broke debug builds on such systems.

It turns out that the debug_dbug label "ignore_punch_hole" is
not at all used in MariaDB server. It would be covered by
the MySQL 5.7 test innodb.table_compress. (Note: MariaDB 10.1
implemented page_compressed tables before something comparable
appeared in MySQL 5.7.)
parent 5eb53955
...@@ -945,10 +945,6 @@ static bool buf_flush_page(buf_page_t *bpage, bool lru, fil_space_t *space) ...@@ -945,10 +945,6 @@ static bool buf_flush_page(buf_page_t *bpage, bool lru, fil_space_t *space)
#if defined HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE || defined _WIN32 #if defined HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE || defined _WIN32
if (size != orig_size && space->punch_hole) if (size != orig_size && space->punch_hole)
type= lru ? IORequest::PUNCH_LRU : IORequest::PUNCH; type= lru ? IORequest::PUNCH_LRU : IORequest::PUNCH;
#else
DBUG_EXECUTE_IF("ignore_punch_hole",
if (size != orig_size && space->punch_hole)
type= lru ? IORequest::PUNCH_LRU : IORequest::PUNCH;);
#endif #endif
frame=page; frame=page;
} }
......
...@@ -3538,13 +3538,6 @@ os_file_set_nocache( ...@@ -3538,13 +3538,6 @@ os_file_set_nocache(
@return true if the file system supports sparse files */ @return true if the file system supports sparse files */
IF_WIN(static,) bool os_is_sparse_file_supported(os_file_t fh) IF_WIN(static,) bool os_is_sparse_file_supported(os_file_t fh)
{ {
/* In this debugging mode, we act as if punch hole is supported,
then we skip any calls to actually punch a hole. In this way,
Transparent Page Compression is still being tested. */
DBUG_EXECUTE_IF("ignore_punch_hole",
return(true);
);
#ifdef _WIN32 #ifdef _WIN32
FILE_ATTRIBUTE_TAG_INFO info; FILE_ATTRIBUTE_TAG_INFO info;
if (GetFileInformationByHandleEx(fh, FileAttributeTagInfo, if (GetFileInformationByHandleEx(fh, FileAttributeTagInfo,
...@@ -3795,13 +3788,6 @@ os_file_punch_hole( ...@@ -3795,13 +3788,6 @@ os_file_punch_hole(
@return DB_SUCCESS or error code */ @return DB_SUCCESS or error code */
dberr_t IORequest::punch_hole(os_offset_t off, ulint len) const dberr_t IORequest::punch_hole(os_offset_t off, ulint len) const
{ {
/* In this debugging mode, we act as if punch hole is supported,
and then skip any calls to actually punch a hole here.
In this way, Transparent Page Compression is still being tested. */
DBUG_EXECUTE_IF("ignore_punch_hole",
return(DB_SUCCESS);
);
ulint trim_len = bpage ? bpage->physical_size() - len : 0; ulint trim_len = bpage ? bpage->physical_size() - len : 0;
if (trim_len == 0) { if (trim_len == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment