MySQL 9.1.0
Source Code Documentation
Drop_table_error_handler Class Reference

This class is an internal error handler implementation for DROP TABLE statements. More...

#include <error_handler.h>

Inheritance diagram for Drop_table_error_handler:
[legend]

Public Member Functions

bool handle_condition (THD *thd, uint sql_errno, const char *sqlstate, Sql_condition::enum_severity_level *level, const char *msg) override
 Implementation of Drop_table_error_handler::handle_condition(). 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

This class is an internal error handler implementation for DROP TABLE statements.

The thing is that there may be warnings during execution of these statements, which should not be exposed to the user. This class is intended to silence such warnings.

Member Function Documentation

◆ handle_condition()

bool Drop_table_error_handler::handle_condition ( THD thd,
uint  sql_errno,
const char *  sqlstate,
Sql_condition::enum_severity_level level,
const char *  msg 
)
overridevirtual

Implementation of Drop_table_error_handler::handle_condition().

The reason in having this implementation is to silence technical low-level warnings during DROP TABLE operation. Currently we don't want to expose the following warnings during DROP TABLE:

  • Some of table files are missed or invalid (the table is going to be deleted anyway, so why bother that something was missed).
  • The table is using an invalid collation.
Returns
true if the condition is handled.

Implements Internal_error_handler.


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