MySQL 9.0.0
Source Code Documentation
dblwr::Mode Struct Reference

#include <buf0dblwr.h>

Public Types

enum  mode_t {
  OFF , ON , DETECT_ONLY , DETECT_AND_RECOVER ,
  FALSEE , TRUEE
}
 The operating mode of doublewrite. More...
 

Static Public Member Functions

static bool is_enabled_low (ulong mode)
 Check if doublewrite is enabled. More...
 
static bool is_disabled_low (ulong mode)
 Check if the doublewrite mode is disabled. More...
 
static bool is_reduced_low (ulong mode)
 Check if the doublewrite mode is detect-only (aka reduced). More...
 
static bool is_atomic (ulong mode)
 Check if the dblwr mode provides atomic writes. More...
 
static const char * to_string (ulong mode)
 Convert the dblwr mode into a string representation. More...
 
static bool is_enabled_to_disabled (ulong new_value)
 Check if the mode transition is from enabled to disabled. More...
 
static bool is_disabled_to_enabled (ulong new_value)
 Check if the mode transition is from disabled to enabled. More...
 
static bool is_same (ulong new_value)
 Check if the mode transition is equivalent. More...
 

Member Enumeration Documentation

◆ mode_t

The operating mode of doublewrite.

The modes ON, TRUEE and DETECT_AND_RECOVER are equal to one another. The modes OFF and FALSEE are equal to one another.

Note
If you change order or add new values, please update innodb_doublewrite_names enum in handler/ha_innodb.cc
Enumerator
OFF 

Equal to FALSEE.

In this mode, dblwr is disabled.

ON 

Equal to TRUEE and DETECT_AND_RECOVER modes.

DETECT_ONLY 

In this mode, dblwr is used only to detect torn writes.

At code level, this mode is also called as reduced mode. It is called reduced because the number of bytes written to the dblwr file is reduced in this mode.

DETECT_AND_RECOVER 

This mode is synonymous with ON, TRUEE.

FALSEE 

Equal to OFF mode.

Intentionally wrong spelling because of compilation issues on Windows.

TRUEE 

Equal to ON, DETECT_AND_RECOVER mode.

Intentionally wrong spelling because of compilation issues on Windows platform.

Member Function Documentation

◆ is_atomic()

bool dblwr::Mode::is_atomic ( ulong  mode)
inlinestatic

Check if the dblwr mode provides atomic writes.

Returns
true if mode is ON, TRUEE or DETECT_AND_RECOVER.
false if mode is OFF, FALSE or DETECT_ONLY.

◆ is_disabled_low()

bool dblwr::Mode::is_disabled_low ( ulong  mode)
inlinestatic

Check if the doublewrite mode is disabled.

Parameters
[in]modedblwr ENUM
Returns
true if dblwr mode is OFF.

◆ is_disabled_to_enabled()

bool dblwr::Mode::is_disabled_to_enabled ( ulong  new_value)
inlinestatic

Check if the mode transition is from disabled to enabled.

Parameters
[in]new_valuethe new value of dblwr mode.
Returns
true if mode transition is from disabled to enabled.

◆ is_enabled_low()

bool dblwr::Mode::is_enabled_low ( ulong  mode)
inlinestatic

Check if doublewrite is enabled.

Parameters
[in]modedblwr ENUM
Returns
true if dblwr is enabled.

◆ is_enabled_to_disabled()

bool dblwr::Mode::is_enabled_to_disabled ( ulong  new_value)
inlinestatic

Check if the mode transition is from enabled to disabled.

Parameters
[in]new_valuethe new value of dblwr mode.
Returns
true if mode transition is from enabled to disabled.

◆ is_reduced_low()

bool dblwr::Mode::is_reduced_low ( ulong  mode)
inlinestatic

Check if the doublewrite mode is detect-only (aka reduced).

Parameters
[in]modedblwr ENUM
Returns
true if dblwr mode is DETECT_ONLY.

◆ is_same()

bool dblwr::Mode::is_same ( ulong  new_value)
static

Check if the mode transition is equivalent.

Parameters
[in]new_valuethe new value of dblwr mode.
Returns
true if mode transition is equivalent.

◆ to_string()

const char * dblwr::Mode::to_string ( ulong  mode)
static

Convert the dblwr mode into a string representation.

Parameters
[in]modethe dblwr mode.
Returns
string representation of the dblwr mode.

The documentation for this struct was generated from the following files: