MySQL 9.1.0
Source Code Documentation
Warning Struct Reference

Class representing a warning. More...

#include <warning.h>

Public Member Functions

 Warning (std::uint32_t warning_code, const char *warning_name, bool once)
 
bool expired ()
 Check if a warning is disabled/enabled for next statement only. More...
 
bool ignore_warning ()
 Return ignore_warning flag value. More...
 
const char * warning_name ()
 Return a symbolic name representing a warning. More...
 
std::uint32_t warning_code ()
 Return a warning code. More...
 
void set_ignore_warning (bool value)
 Set ignore_warning flag. More...
 
 Warning (const uint32 level, const uint32_t code, LEX_CSTRING message)
 

Public Attributes

uint32_t m_level
 
uint32_t m_code
 
LEX_CSTRING m_message
 

Private Attributes

bool m_ignore_warning
 
bool m_once_property
 
std::string m_warning_name
 
std::uint32_t m_warning_code
 

Detailed Description

Class representing a warning.

A structure to store all information about a warning/error.

Contains following information

  • A flag representing whether to ignore a warning or not
  • A flag representing the scope of a warning
  • Warning name
  • Warning number

Constructor & Destructor Documentation

◆ Warning() [1/2]

Warning::Warning ( std::uint32_t  warning_code,
const char *  warning_name,
bool  once 
)
inline

◆ Warning() [2/2]

Warning::Warning ( const uint32  level,
const uint32_t  code,
LEX_CSTRING  message 
)
inline

Member Function Documentation

◆ expired()

bool Warning::expired ( )
inline

Check if a warning is disabled/enabled for next statement only.

Return values
Trueif the warning is disabled or enabled for next statement only, false otherwise.

◆ ignore_warning()

bool Warning::ignore_warning ( )
inline

Return ignore_warning flag value.

Return values
Trueif ignore_warning flag is set, false otherwise.

◆ set_ignore_warning()

void Warning::set_ignore_warning ( bool  value)
inline

Set ignore_warning flag.

Parameters
valueBoolean value for ignore_warning flag

◆ warning_code()

std::uint32_t Warning::warning_code ( )
inline

Return a warning code.

Return values
Warningcode

◆ warning_name()

const char * Warning::warning_name ( )
inline

Return a symbolic name representing a warning.

Return values
Symbolicname for a warning.

Member Data Documentation

◆ m_code

uint32_t Warning::m_code

◆ m_ignore_warning

bool Warning::m_ignore_warning
private

◆ m_level

uint32_t Warning::m_level

◆ m_message

LEX_CSTRING Warning::m_message

◆ m_once_property

bool Warning::m_once_property
private

◆ m_warning_code

std::uint32_t Warning::m_warning_code
private

◆ m_warning_name

std::string Warning::m_warning_name
private

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