![]() |
MySQL 8.0.43
Source Code Documentation
|
Classes | |
| class | Closure_error_handler |
| Class template which derives from Internal_error_handler and overrides handle_condition with the CONDITION_HANDLER_CLOS template parameter. More... | |
Functions | |
| bool | checked_return (bool ret) |
| In debug mode, check that a true argument is paired with thd->is_error() or thd->killed being set. More... | |
| bool | mdl_lock (THD *thd, MDL_key::enum_mdl_namespace ns, const String_type &schema_name, const String_type &object_name, enum_mdl_type mt=MDL_EXCLUSIVE, enum_mdl_duration md=MDL_TRANSACTION) |
| Convenience function for obtaining MDL. More... | |
| template<typename T > | |
| const T & | ptr_as_cref (const T *p) |
| template<typename CH_CLOS , typename ACTION_CLOS > | |
| bool | handle_errors (THD *thd, CH_CLOS &&chc, ACTION_CLOS &&ac) |
| Set up a custom error handler to use for errors from the execution of a closure. More... | |
| template<typename P_TYPE , typename CLOS_TYPE > | |
| std::unique_ptr< P_TYPE, CLOS_TYPE > | make_guard (P_TYPE *p, CLOS_TYPE &&clos) |
|
inline |
In debug mode, check that a true argument is paired with thd->is_error() or thd->killed being set.
In optimized mode it turns into a noop.
| [in] | ret | return value to check |
NDEBUG
| bool dd::sdi_utils::handle_errors | ( | THD * | thd, |
| CH_CLOS && | chc, | ||
| ACTION_CLOS && | ac | ||
| ) |
Set up a custom error handler to use for errors from the execution of a closure.
| thd | thread context |
| chc | closure which implements the Internal_error_handler::handle_condition override |
| ac | closure action for which error conditions should be handled. |
| true | if an error occurs |
| false | otherwise |
| std::unique_ptr< P_TYPE, CLOS_TYPE > dd::sdi_utils::make_guard | ( | P_TYPE * | p, |
| CLOS_TYPE && | clos | ||
| ) |
|
inline |
Convenience function for obtaining MDL.
Sets up the MDL_request struct and populates it, before calling Mdl_context::acquire_lock.
| thd | thread context |
| ns | MDL key namespace |
| schema_name | schema name |
| object_name | object name |
| mt | MDL type |
| md | MDL duration |
| const T & dd::sdi_utils::ptr_as_cref | ( | const T * | p | ) |