MySQL 9.0.0
Source Code Documentation
anonymous_namespace{sql_audit.cc}::Event_tracking_error_handler Class Referenceabstract

Error handler that controls error reporting by plugin. More...

Inheritance diagram for anonymous_namespace{sql_audit.cc}::Event_tracking_error_handler:
[legend]

Public Member Functions

 Event_tracking_error_handler (THD *thd, const char *warning_message, bool active=true)
 Construction. More...
 
 ~Event_tracking_error_handler () override
 Destruction. More...
 
virtual bool handle ()=0
 Simplified custom handler. More...
 
bool handle_condition (THD *, uint sql_errno, const char *sqlstate, Sql_condition::enum_severity_level *, const char *msg) override
 Error handler. More...
 
virtual void print_warning (const char *warn_msg, uint sql_errno, const char *sqlstate, const char *msg)
 Warning print routine. More...
 
int get_result (int result)
 Convert the result value returned from the audit api. More...
 

Private Member Functions

 Event_tracking_error_handler (const Event_tracking_error_handler &obj)
 Blocked copy constructor (private). More...
 

Private Attributes

THDm_thd
 Current thread data. More...
 
const char * m_warning_message
 Warning message used when the error is rejected. More...
 
bool m_error_reported
 Error has been reported. More...
 
const bool m_active
 Handler has been activated. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Internal_error_handler
 Internal_error_handler ()
 
Internal_error_handlerprev_internal_handler () const
 
virtual ~Internal_error_handler ()=default
 

Detailed Description

Error handler that controls error reporting by plugin.

Constructor & Destructor Documentation

◆ Event_tracking_error_handler() [1/2]

anonymous_namespace{sql_audit.cc}::Event_tracking_error_handler::Event_tracking_error_handler ( const Event_tracking_error_handler obj)
inlineprivate

Blocked copy constructor (private).

◆ Event_tracking_error_handler() [2/2]

anonymous_namespace{sql_audit.cc}::Event_tracking_error_handler::Event_tracking_error_handler ( THD thd,
const char *  warning_message,
bool  active = true 
)
inline

Construction.

Parameters
thdCurrent thread data.
warning_messageWarning message used when error has been suppressed.
activeSpecifies whether the handler is active or not. Optional parameter (default is true).

◆ ~Event_tracking_error_handler()

anonymous_namespace{sql_audit.cc}::Event_tracking_error_handler::~Event_tracking_error_handler ( )
inlineoverride

Destruction.

Member Function Documentation

◆ get_result()

int anonymous_namespace{sql_audit.cc}::Event_tracking_error_handler::get_result ( int  result)
inline

Convert the result value returned from the audit api.

Parameters
resultResult value received from the plugin function.
Returns
Converted result value.

◆ handle()

virtual bool anonymous_namespace{sql_audit.cc}::Event_tracking_error_handler::handle ( )
pure virtual

Simplified custom handler.

Returns
True on error rejection, otherwise false.

Implemented in anonymous_namespace{sql_audit.cc}::Ignore_event_tracking_error_handler, and anonymous_namespace{sql_audit.cc}::Ignore_command_start_error_handler.

◆ handle_condition()

bool anonymous_namespace{sql_audit.cc}::Event_tracking_error_handler::handle_condition ( THD ,
uint  sql_errno,
const char *  sqlstate,
Sql_condition::enum_severity_level ,
const char *  msg 
)
inlineoverridevirtual

Error handler.

See also
Internal_error_handler::handle_condition
Returns
True on error rejection, otherwise false.

Implements Internal_error_handler.

◆ print_warning()

virtual void anonymous_namespace{sql_audit.cc}::Event_tracking_error_handler::print_warning ( const char *  warn_msg,
uint  sql_errno,
const char *  sqlstate,
const char *  msg 
)
inlinevirtual

Warning print routine.

Also prints the underlying error attributes if supplied.

Parameters
warn_msgWarning message to be printed.
sql_errnoThe error number of the underlying error
sqlstateThe SQL state of the underlying error. NULL if none
msgThe text of the underlying error. NULL if none

Reimplemented in anonymous_namespace{sql_audit.cc}::Ignore_event_tracking_error_handler, and anonymous_namespace{sql_audit.cc}::Ignore_command_start_error_handler.

Member Data Documentation

◆ m_active

const bool anonymous_namespace{sql_audit.cc}::Event_tracking_error_handler::m_active
private

Handler has been activated.

◆ m_error_reported

bool anonymous_namespace{sql_audit.cc}::Event_tracking_error_handler::m_error_reported
private

Error has been reported.

◆ m_thd

THD* anonymous_namespace{sql_audit.cc}::Event_tracking_error_handler::m_thd
private

Current thread data.

◆ m_warning_message

const char* anonymous_namespace{sql_audit.cc}::Event_tracking_error_handler::m_warning_message
private

Warning message used when the error is rejected.


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