MySQL 8.0.32
Source Code Documentation
undo::Inject_failure_once Class Reference

Inject a failure in the undo truncation debug compiled code at various places so that it fails the first time it hits and succeeds after that. More...

#include <trx0purge.h>

Public Member Functions

 Inject_failure_once (const char *inject_name)
 
bool should_fail ()
 If a certain SET GLOBAL DEBUG has been set and this is the first time this has been called for that injection point, write an entry to the error log and return true so that the caller can cause the failure. More...
 

Private Attributes

bool m_already_failed
 
const char * m_inject_name
 

Detailed Description

Inject a failure in the undo truncation debug compiled code at various places so that it fails the first time it hits and succeeds after that.

Constructor & Destructor Documentation

◆ Inject_failure_once()

undo::Inject_failure_once::Inject_failure_once ( const char *  inject_name)
inline

Member Function Documentation

◆ should_fail()

bool undo::Inject_failure_once::should_fail ( )

If a certain SET GLOBAL DEBUG has been set and this is the first time this has been called for that injection point, write an entry to the error log and return true so that the caller can cause the failure.

Returns
true iff compiled with debug and the debug point has been set and this it the first call for this debug point.

Member Data Documentation

◆ m_already_failed

bool undo::Inject_failure_once::m_already_failed
private

◆ m_inject_name

const char* undo::Inject_failure_once::m_inject_name
private

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