MySQL 8.0.39
Source Code Documentation
Mysql::Tools::Base::Message_data Class Reference

Structure to represent message from server sent after executing query. More...

#include <message_data.h>

Inheritance diagram for Mysql::Tools::Base::Message_data:
[legend]

Public Member Functions

 Message_data (uint64 code, std::string message, Message_type message_type)
 
virtual ~Message_data ()=default
 
uint64 get_code () const
 
std::string get_message () const
 
Message_type get_message_type () const
 
bool is_fatal () const
 Check if fatal error is encountered that mysql_upgrade cannot ignore. More...
 
std::string get_message_type_string () const
 
virtual void print_error (std::string program_name) const
 Prints errors, warnings and notes to standard error. More...
 

Static Public Attributes

static const char * message_type_strings []
 
static const int message_type_strings_count
 

Private Attributes

uint64 m_code
 
std::string m_message
 
Message_type m_message_type
 

Detailed Description

Structure to represent message from server sent after executing query.

Constructor & Destructor Documentation

◆ Message_data()

Message_data::Message_data ( uint64  code,
std::string  message,
Message_type  message_type 
)

◆ ~Message_data()

virtual Mysql::Tools::Base::Message_data::~Message_data ( )
virtualdefault

Member Function Documentation

◆ get_code()

uint64 Message_data::get_code ( ) const

◆ get_message()

std::string Message_data::get_message ( ) const

◆ get_message_type()

Message_type Message_data::get_message_type ( ) const

◆ get_message_type_string()

std::string Message_data::get_message_type_string ( ) const

◆ is_fatal()

bool Message_data::is_fatal ( ) const

Check if fatal error is encountered that mysql_upgrade cannot ignore.

For instance: server is not reachable during upgrade

Return values
truefatal error is encountered false otherwise

◆ print_error()

void Message_data::print_error ( std::string  program_name) const
virtual

Prints errors, warnings and notes to standard error.

Reimplemented in Mysql::Tools::Base::Warning_data.

Member Data Documentation

◆ m_code

uint64 Mysql::Tools::Base::Message_data::m_code
private

◆ m_message

std::string Mysql::Tools::Base::Message_data::m_message
private

◆ m_message_type

Message_type Mysql::Tools::Base::Message_data::m_message_type
private

◆ message_type_strings

const char * Message_data::message_type_strings
static
Initial value:
= {
"INFORMATION", "NOTE", "WARNING", "ERROR", "Unknown message type"}

◆ message_type_strings_count

const int Message_data::message_type_strings_count
static
Initial value:
=
static const char * message_type_strings[]
Definition: message_data.h:59
#define array_elements(A)
Definition: validate_password_imp.cc:48

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