Commit f7da495a authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-18115: Remove some redundant comparisons

Now that FIL_TYPE_LOG no longer exists, let us remove some redundant
comparisons of fil_space_t::purpose.

fil_flush_low(): Do not distinguish FIL_TYPE_TEMPORARY.

fil_space_get_space(): Assume that space->purpose is valid.
parent 314a14f2
......@@ -711,15 +711,8 @@ static void fil_flush_low(fil_space_t* space, bool metadata = false)
ut_a(node->is_open());
switch (space->purpose) {
case FIL_TYPE_TEMPORARY:
ut_ad(0); // we already checked for this
/* fall through */
case FIL_TYPE_TABLESPACE:
case FIL_TYPE_IMPORT:
fil_n_pending_tablespace_flushes++;
break;
}
fil_n_pending_tablespace_flushes++;
#ifdef _WIN32
if (node->is_raw_disk) {
......@@ -749,16 +742,7 @@ static void fil_flush_low(fil_space_t* space, bool metadata = false)
}
}
switch (space->purpose) {
case FIL_TYPE_TEMPORARY:
break;
case FIL_TYPE_TABLESPACE:
case FIL_TYPE_IMPORT:
fil_n_pending_tablespace_flushes--;
continue;
}
ut_ad(0);
fil_n_pending_tablespace_flushes--;
}
space->n_pending_flushes--;
......@@ -1387,13 +1371,7 @@ fil_space_get_space(
return(space);
}
switch (space->purpose) {
case FIL_TYPE_TEMPORARY:
case FIL_TYPE_TABLESPACE:
case FIL_TYPE_IMPORT:
space = fil_system.read_page0(id);
}
space = fil_system.read_page0(id);
return(space);
}
......
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