This internal handler is used to trap ER_NO_SUCH_TABLE and ER_WRONG_MRG_TABLE errors during CHECK/REPAIR TABLE for MERGE tables.
More...
This internal handler is used to trap ER_NO_SUCH_TABLE and ER_WRONG_MRG_TABLE errors during CHECK/REPAIR TABLE for MERGE tables.
◆ Repair_mrg_table_error_handler() [1/2]
Repair_mrg_table_error_handler::Repair_mrg_table_error_handler |
( |
| ) |
|
|
inline |
◆ Repair_mrg_table_error_handler() [2/2]
Repair_mrg_table_error_handler::Repair_mrg_table_error_handler |
( |
| ) |
|
|
inline |
◆ handle_condition() [1/2]
Handle a sql condition.
This method can be implemented by a subclass to achieve any of the following:
- mask a warning/error internally, prevent exposing it to the user,
- mask a warning/error and throw another one instead. When this method returns true, the sql condition is considered 'handled', and will not be propagated to upper layers. It is the responsibility of the code installing an internal handler to then check for trapped conditions, and implement logic to recover from the anticipated conditions trapped during runtime.
This mechanism is similar to C++ try/throw/catch:
- 'try' correspond to
THD::push_internal_handler()
,
- 'throw' correspond to
my_error()
, which invokes my_message_sql()
,
- 'catch' correspond to checking how/if an internal handler was invoked, before removing it from the exception stack with
THD::pop_internal_handler()
.
- Parameters
-
thd | the calling thread |
sql_errno | the error number for the condition raised. |
sqlstate | the SQLSTATE for the condition raised. |
level | the severity level for the condition raised. |
msg | the error message for the condition raised. |
- Returns
- true if the condition is handled
Implements Internal_error_handler.
◆ handle_condition() [2/2]
Handle a sql condition.
This method can be implemented by a subclass to achieve any of the following:
- mask a warning/error internally, prevent exposing it to the user,
- mask a warning/error and throw another one instead. When this method returns true, the sql condition is considered 'handled', and will not be propagated to upper layers. It is the responsibility of the code installing an internal handler to then check for trapped conditions, and implement logic to recover from the anticipated conditions trapped during runtime.
This mechanism is similar to C++ try/throw/catch:
- 'try' correspond to
THD::push_internal_handler()
,
- 'throw' correspond to
my_error()
, which invokes my_message_sql()
,
- 'catch' correspond to checking how/if an internal handler was invoked, before removing it from the exception stack with
THD::pop_internal_handler()
.
- Parameters
-
thd | the calling thread |
sql_errno | the error number for the condition raised. |
sqlstate | the SQLSTATE for the condition raised. |
level | the severity level for the condition raised. |
msg | the error message for the condition raised. |
- Returns
- true if the condition is handled
Implements Internal_error_handler.
◆ safely_trapped_errors() [1/2]
bool Repair_mrg_table_error_handler::safely_trapped_errors |
( |
| ) |
|
|
inline |
Returns true if there were ER_NO_SUCH_/WRONG_MRG_TABLE and there were no unhandled errors.
false otherwise.
◆ safely_trapped_errors() [2/2]
bool Repair_mrg_table_error_handler::safely_trapped_errors |
( |
| ) |
|
|
inline |
Returns true if there were ER_NO_SUCH_/WRONG_MRG_TABLE and there were no unhandled errors.
false otherwise.
◆ m_handled_errors
bool Repair_mrg_table_error_handler::m_handled_errors |
|
private |
◆ m_unhandled_errors
bool Repair_mrg_table_error_handler::m_unhandled_errors |
|
private |
The documentation for this class was generated from the following files: