WL#4903: Plug-in Service API: part 1
Affects: Server-5.5 — Status: Complete — Priority: Medium
This is a subset of WL#3859 which provides the automatic versioning protection for plugins that use server functionality. It allows server to create services and plugins to use them. Automatic version checks and dynamic linking on load is implemented. Manual load (using get_service) with version negotiation is not. Reference counting is not implemented either - it's only needed when plugins will *provide* services, not *use* them. Now all services are statically compiled into the server. Thus no service needs to be "released", and releasing is not implemented either.
Services will be declared in include/mysql/service_XXX.h files. To avoid a long list of #include's in plugin.h (to keep plugin.h readable), plugin.h will include services.h, which, in turn, will include all service_XXX.h files. All service declarations will be controlled by abi_check rule (indirectly, via plugin.h.pp). Service versions will be in include/service_versions.h (this file shouldn't be installed on a target system), as a list of defines - one per service. Symbols with the versions that will be replaced by pointers to the real services (see WL#3859) will be in a libservices.a, which will be in libservices/. It's crucial to have one file per service there. Services will be defined in sql/sql_plugin_services.h, which will be included into sql/sql_plugin.cc An example service will be implemented - "my_snprintf" service, which provides my_snprintf and my_vsnprintf. daemon plugin will make use of it.
Copyright (c) 2000, 2015, Oracle Corporation and/or its affiliates. All rights reserved.