MySQL 9.4.0
Source Code Documentation
The Service Registry Service

The Service Registry is a central part of Components subsystem.

It maintains a list of the Service Implementations and allow acquiring them by any actor that has a reference to main Registry Service Implementation. For each Service a reference counter is maintained to make sure no one can remove any Service Implementation being actively used. The Service Implementations can be acquired by the Service name or by the full Service Implementation name. For each Service a default Service Implementation is distinguished, the first one to be added, but it is possible to change it at will at any point.

Registry _no_lock deprecation note

Dynamic Loader unload operation order is altered and does not require _no_lock variant of registry API. For more information on dynamic loader unload operation see Dynamic Loader unload order.

The following registry API functions are depreceated:

  • mysql_registry_no_lock_imp::acquire()
  • mysql_registry_no_lock_imp::acquire_related()
  • mysql_registry_no_lock_imp::release()
  • mysql_registry_no_lock_imp::register_service()
  • mysql_registry_no_lock_imp::unregister()
  • mysql_registry_no_lock_imp::set_default()

It is recommended to use synchronized variant of registry API instead:

  • mysql_registry_imp::acquire()
  • mysql_registry_imp::acquire_related()
  • mysql_registry_imp::release()
  • mysql_registry_imp::register_service()
  • mysql_registry_imp::unregister()
  • mysql_registry_imp::set_default()

A convenient RAII-style wrapper on Service acquisition and automatic release is provided, the my_service<T> class.