MySQL  8.0.17
Source Code Documentation
sql_plugin_services.h
Go to the documentation of this file.
1 /* Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
2 
3  This program is free software; you can redistribute it and/or modify
4  it under the terms of the GNU General Public License, version 2.0,
5  as published by the Free Software Foundation.
6 
7  This program is also distributed with certain software (including
8  but not limited to OpenSSL) that is licensed under separate terms,
9  as designated in a particular file or component or in included license
10  documentation. The authors of MySQL hereby grant you an additional
11  permission to link the program and your derivative works with the
12  separately licensed software that they have included with MySQL.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License, version 2.0, for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 /* support for Services */
24 #include "mysql/services.h"
25 #include "service_versions.h"
26 
27 /**
28  @page page_ext_plugin_svc_new_service_howto How to add a new service
29 
30  A "plugin service" is in its core a C struct containing one or more function
31  pointers.
32 
33  If you want to export C++ class you need to provide an
34  extern "C" function that will create a new instance of your class,
35  and put it in a service. But be careful to also provide a destructor
36  method since the heaps of the server and the plugin may be different.
37 
38  Data structures are not part of the service structure, but they are part
39  of the API you create and usually need to be declared in the same
40  service_*.h file.
41 
42  To turn a **pre-existing** set of functions (foo_func1, foo_func2)
43  into a service "foo" you need to:
44 
45  <ol>
46  <li>
47  Create a new file include/mysql/service_foo.h
48 
49  The template is:
50 
51  @include service_foo.h
52 
53  The service_foo.h file should be self-contained, if it needs system headers -
54  include them in it, e.g. if you use `size_t`
55 
56  ~~~~
57  #include <stdlib.h>
58  ~~~~
59 
60  It should also declare all the accompanying data structures, as necessary
61  (e.g. ::thd_alloc_service declares ::MYSQL_LEX_STRING).
62 </li><li>
63  Add the new file to include/mysql/services.h
64 </li><li>
65  Increase the minor plugin ABI version in include/mysql/plugin.h:
66  ::MYSQL_PLUGIN_INTERFACE_VERSION = ::MYSQL_PLUGIN_INTERFACE_VERSION + 1
67 </li><li>
68  Add the version of your service to include/service_versions.h:
69  ~~~~
70  #define VERSION_foo 0x0100
71  ~~~~
72 </li><li>
73  Create a new file `libservices/foo_service.c` using the following template:
74  @include service_foo.cc
75 </li><li>
76  Add the new file to libservices/CMakeLists.txt (MYSQLSERVICES_SOURCES)
77 </li><li>
78  And finally, register your service for dynamic linking in
79  sql/sql_plugin_services.h
80  <ul><li>
81  Fill in the service structure:
82  ~~~
83  static struct foo_service_st foo_handler = {
84  foo_func1,
85  foo_func2
86  }
87  ~~~
88  </li><li>
89  Add it to the ::list_of_services
90 
91  ~~~
92  { "foo_service", VERSION_foo, &foo_handler }
93  ~~~
94  </li></ul></li></ol>
95 */
96 
97 /**
98  @page page_ext_plugin_api_goodservices What defines a "good" plugin service ?
99 
100  The following is an attempt to explain what is a good plugin service.
101  It is also an attempt to mention some bad practices that should be
102  avoided. The text is in no way conclusive and is a constant work in progress
103  to keep it updated.
104 
105 
106  Avoid exposing the definitions of complex server structure
107  ----------------------------------------------------------
108 
109  @ref page_ext_plugin_svc_new_service_howto states that the service header
110  should be self-contained, i.e. all data structures used by the API need to be
111  defined by the service header.
112 
113  The service headers are considered "public" and are packaged into the binary
114  packages for users of these binary packages to use when developing plugins
115  that are using the service.
116 
117  When you combine the two together it becomes evident that complex server data
118  structures should definitely be avoided as parts of the API.
119 
120  The main inconvenience is that a complex structure's definition should be
121  copied into the service's header. And if that is a frequently changed
122  structure all plugins using it will need to be recompiled every time it
123  changes.
124 
125  That is the reason why it is always better to pass individual members of
126  these structures that are simpler. Even if this means passing more than just
127  a single argument.
128 
129  If you absolutely must pass references to complex structure instances it is
130  better to do it as a "handle", i.e. a `void *`. For convenience, you can have
131  a named class for that, e.g.
132  ~~~~
133  typedef void *my_new_handle_t;
134  ~~~~
135 
136  This isolates the layout of the server structure from the plugin code while
137  still allowing the plugins to operate on it via accessor and mutator methods.
138 
139  Strive to make reusable services
140  --------------------------------
141 
142  Services have some extra processing associated with them. So they should be
143  used only for functionality that more than one plugin will probably use.
144 
145  How do we know if a service is reusable ?
146 
147  If a service deals with complex structures related to a specific plugin API
148  or does not provide a logically complete set of operations chances are that
149  there will not be much re-use of this service.
150 
151  Keep the identifier namespace clean
152  -----------------------------------
153 
154  As discussed in @ref page_ext_plugin_svc_anathomy each function of each
155  service API is added to the global C/C++ namespace for all plugins via a set
156  of preprocessor defines.
157 
158  So if you name your plugin service functions after single common words, e.g.
159  `get` or `put` etc you will strongly pollute the namespace that the plugin
160  authors will use. They will either have to refrain from using such methods or
161  go to the extra trouble of using either preprocessor or C++ namespace tricks.
162 
163  Thus, prefix your APIs. We typically use the `my_` prefix for all MySQL
164  exported functions (note that the `mysql_` prefix is reserved for the C API
165  functions, e.g. ::mysql_real_connect()). We also add a subsystem prefix, e.g.
166  ::my_plugin_log_message() is the service API name for plugins to log messages
167  to the server's error log.
168 
169  Use services for "published" APIs only
170  --------------------------------------
171 
172  Plugin services are an element of the binary APIs that must be kept stable
173  to keep existing plugins operating.
174  Plugin service APIs are thus versioned to allow the server to check if the
175  plugins are using the right version of the particular service API.
176  The server's build scripts also package the service API headers in a
177  designated directory and are documented in a specific service API document.
178 
179  This stability comes at a price. All of the above should be observed and the
180  versions should be increased accoringly.
181 
182  Major should be bumped (and the minor reset) when there are incompatible
183  changes: signature change, meaning change etc.
184 
185  Minor should be bumped when there are backward compatible changes: adding
186  new functions at the end of the API, adding new named constants to be used
187  by the API etc.
188 
189  Use services to make plugins "clean"
190  ------------------------------------
191 
192  A clean plugin is one that does not need to reference the symbols of the
193  server binary that loads it. Such plugin can be loaded by any binary and
194  it is guaranteed to operate in a predictable way as long as the right
195  plugin APIs are called and the relevant plugin service APIs are defined
196  by the loading binary.
197 
198  Always make fully-formed plugin service APIs
199  --------------------------------------------
200 
201  Follow strictly and completely the steps defined in
202  @ref page_ext_plugin_svc_new_service_howto.
203 
204  Don't skip steps or you'll be decresing the usability of the service API.
205 */
206 
207 /**
208  @defgroup group_ext_plugin_services MySQL Server Plugin Services
209 
210  This is a group of all plugin service APIs.
211 
212  See @ref page_ext_plugin_services for more details.
213 */
214 
215 /**
216  A server-side reference to a plugin service.
217 
218  @sa plugin_add, list_of_services
219 */
221  /** The name of the service pointer symbol exported by the plugin */
222  const char *name;
223  /** The service version provided by the server */
225  /** The actual server side service structure pointer */
226  void *service;
227 };
228 
234 
237 };
238 
245 
249 
251  thd_wait_end};
252 
255 
258 
265 };
266 
269 
272 
282 
285 };
286 
289 };
290 
293 
299 
302 
305 
306 static struct st_service_ref list_of_services[] = {
307  {"srv_session_service", VERSION_srv_session_service,
309  {"command_service", VERSION_command, &command_handler},
310  {"srv_session_info_service", VERSION_srv_session_info_service,
312  {"thd_alloc_service", VERSION_thd_alloc, &thd_alloc_handler},
313  {"thd_wait_service", VERSION_thd_wait, &thd_wait_handler},
314  {"my_thread_scheduler_service", VERSION_my_thread_scheduler,
316  {"my_plugin_log_service", VERSION_my_plugin_log, &my_plugin_log_handler},
317  {"mysql_string_service", VERSION_mysql_string, &mysql_string_handler},
318  {"mysql_malloc_service", VERSION_mysql_malloc, &mysql_malloc_handler},
319  {"mysql_password_policy_service", VERSION_mysql_password_policy,
321  {"mysql_parser_service", VERSION_parser, &parser_handler},
322  {"rpl_transaction_ctx_service", VERSION_rpl_transaction_ctx_service,
324  {"transaction_write_set_service", VERSION_transaction_write_set_service,
326  {"security_context_service", VERSION_security_context_service,
328  {"mysql_locking_service", VERSION_locking_service,
330  {"mysql_keyring_service", VERSION_mysql_keyring_service,
332  {"plugin_registry_service", VERSION_plugin_registry_service,
334 };
int srv_session_attach(MYSQL_SESSION session, MYSQL_THD *ret_previous_thd)
Attaches a session to current physical thread.
Definition: srv_session_service.cc:199
static struct my_thread_scheduler_service my_thread_scheduler_handler
Definition: sql_plugin_services.h:253
mysql_string_iterator_handle mysql_string_get_iterator(mysql_string_handle string_handle)
Definition: string_service.cc:81
int my_calculate_password_strength(const char *, unsigned int)
Invoke the component/plugin to evalue the strength of a password.
Definition: password_policy_service.cc:129
static struct srv_session_info_service_st srv_session_info_handler
Definition: sql_plugin_services.h:239
MYSQL_LEX_STRING * thd_make_lex_string(MYSQL_THD thd, MYSQL_LEX_STRING *lex_str, const char *str, size_t size, int allocate_lex_string)
Create a LEX_STRING in this connection&#39;s local memory pool.
Definition: sql_thd_api.cc:576
my_svc_bool security_context_lookup(MYSQL_SECURITY_CONTEXT ctx, const char *user, const char *host, const char *ip, const char *db)
Looks up in the defined user accounts an account based on the user@host[ip] combo supplied and checks...
Definition: service_security_context.cc:172
my_svc_bool security_context_get_option(MYSQL_SECURITY_CONTEXT, const char *name, void *inout_pvalue)
Reads a named security context attribute and retuns its value.
Definition: service_security_context.cc:223
const char * name
The name of the service pointer symbol exported by the plugin.
Definition: sql_plugin_services.h:222
int my_connection_handler_set(struct Connection_handler_functions *chf, struct THD_event_functions *tef)
Instantiates Plugin_connection_handler based on the supplied Conection_handler_functions and sets it ...
Definition: connection_handler_manager.cc:283
static struct thd_wait_service_st thd_wait_handler
Definition: sql_plugin_services.h:250
int mysql_parser_visit_tree(MYSQL_THD thd, parse_node_visit_function processor, unsigned char *arg)
Definition: parser_service.cc:326
int mysql_parser_get_number_params(MYSQL_THD thd)
Definition: parser_service.cc:314
int mysql_plugin_registry_release(const mysql_service_registry_t *reg)
Releases a registry service reference.
Definition: plugin_registry_service.cc:74
char * thd_strmake(MYSQL_THD thd, const char *str, size_t size)
Definition: sql_thd_api.cc:572
Definition: service_thd_wait.h:90
Definition: service_command.h:380
#define VERSION_mysql_password_policy
Definition: service_versions.h:40
#define VERSION_parser
Definition: service_versions.h:41
int mysql_string_iterator_isdigit(mysql_string_iterator_handle iterator_handle)
Definition: string_service.cc:136
int srv_session_info_set_client_port(MYSQL_SESSION session, uint16_t port)
Sets the client port of a session.
Definition: service_thd_alloc.h:46
Definition: service_rpl_transaction_ctx.h:60
#define VERSION_thd_wait
Definition: service_versions.h:35
#define VERSION_srv_session_info_service
Definition: service_versions.h:46
static struct srv_session_service_st srv_session_service_handler
Definition: sql_plugin_services.h:229
static struct mysql_malloc_service_st mysql_malloc_handler
Definition: sql_plugin_services.h:267
char * my_strdup(PSI_memory_key key, const char *from, myf_t flags)
Definition: my_malloc.cc:292
MYSQL_LEX_STRING mysql_parser_item_string(MYSQL_ITEM item)
Definition: parser_service.cc:332
static struct mysql_string_service_st mysql_string_handler
Definition: sql_plugin_services.h:259
LEX_CSTRING srv_session_info_get_current_db(MYSQL_SESSION session)
Returns the current database of a session.
void thd_wait_begin(MYSQL_THD thd, int wait_type)
Definition: sql_thd_api.cc:616
void * my_memdup(PSI_memory_key key, const void *from, size_t length, myf_t flags)
Definition: my_malloc.cc:285
void my_free(void *ptr)
Frees the memory pointed by the ptr.
Definition: my_memory.cc:81
Transaction_write_set * get_transaction_write_set(unsigned long m_thread_id)
Definition: rpl_transaction_write_set_ctx.cc:101
A bridge service allowing plugins to work with the registry.
Definition: service_plugin_registry.h:46
static struct st_service_ref list_of_services[]
Definition: sql_plugin_services.h:306
#define VERSION_rpl_transaction_ctx_service
Definition: service_versions.h:42
int my_plugin_log_message(MYSQL_PLUGIN *plugin, enum plugin_log_level level, const char *format,...)
Definition: log.cc:2336
#define VERSION_my_plugin_log
Definition: service_versions.h:37
int my_connection_handler_reset()
Destroys the current connection handler and restores the previous.
Definition: connection_handler_manager.cc:300
void * my_realloc(PSI_memory_key key, void *ptr, size_t size, myf_t flags)
Definition: my_malloc.cc:94
my_svc_bool security_context_destroy(MYSQL_SECURITY_CONTEXT ctx)
Deallocates a security context.
Definition: service_security_context.cc:122
static struct mysql_keyring_service_st mysql_keyring_handler
Definition: sql_plugin_services.h:300
Definition: service_rpl_transaction_write_set.h:61
uint version
The service version provided by the server.
Definition: sql_plugin_services.h:224
MYSQL_LEX_STRING mysql_parser_get_normalized_query(MYSQL_THD thd)
Definition: parser_service.cc:352
void mysql_parser_free_string(MYSQL_LEX_STRING string)
Definition: parser_service.cc:344
static struct my_plugin_log_service my_plugin_log_handler
Definition: sql_plugin_services.h:256
Definition: service_mysql_string.h:38
void mysql_string_iterator_free(mysql_string_iterator_handle)
Definition: string_service.cc:76
MYSQL_LEX_STRING mysql_parser_get_query(MYSQL_THD thd)
Definition: parser_service.cc:346
static struct security_context_service_st security_context_handler
Definition: sql_plugin_services.h:294
my_svc_bool thd_get_security_context(MYSQL_THD, MYSQL_SECURITY_CONTEXT *out_ctx)
Gets the security context for the thread.
Definition: service_security_context.cc:54
static struct rpl_transaction_ctx_service_st rpl_transaction_ctx_handler
Definition: sql_plugin_services.h:283
#define VERSION_transaction_write_set_service
Definition: service_versions.h:43
int srv_session_server_is_available()
Returns if the server is available (not booting or shutting down)
Definition: srv_session_service.cc:185
int srv_session_info_killed(MYSQL_SESSION session)
Returns whether the session was killed.
Enables plugins to log messages into the server&#39;s error log.
Definition: service_my_plugin_log.h:53
my_thread_id srv_session_info_get_session_id(MYSQL_SESSION session)
Returns the ID of a session.
Definition: service_thread_scheduler.h:35
unsigned int srv_session_info_thread_count(const void *plugin)
Returns the number opened sessions in thread initialized by srv_session service.
Definition: srv_session_info_service.cc:143
int mysql_release_locking_service_locks(MYSQL_THD opaque_thd, const char *lock_namespace)
Definition: locking_service.cc:185
void * thd_calloc(MYSQL_THD thd, size_t size)
Definition: sql_thd_api.cc:566
int srv_session_close(MYSQL_SESSION session)
Closes a previously opened session.
int mysql_string_convert_to_char_ptr(mysql_string_handle string_handle, const char *charset_name, char *buffer, unsigned int buffer_size, int *error)
Definition: string_service.cc:50
int mysql_parser_get_statement_type(MYSQL_THD thd)
Definition: parser_service.cc:282
int srv_session_info_set_connection_type(MYSQL_SESSION session, enum enum_vio_type type)
Sets the connection type of a session.
#define VERSION_command
Definition: service_versions.h:33
static struct mysql_locking_service_st locking_service_handler
Definition: sql_plugin_services.h:291
static struct plugin_registry_service_st plugin_registry_handler
Definition: sql_plugin_services.h:303
static struct mysql_password_policy_service_st mysql_password_policy_handler
Definition: sql_plugin_services.h:270
A server-side reference to a plugin service.
Definition: sql_plugin_services.h:220
void mysql_string_free(mysql_string_handle)
Definition: string_service.cc:66
int my_key_generate(const char *, const char *, const char *, size_t)
Iterates over all active keyring plugins and calls the mysql_key_generate API for the first one found...
Definition: keyring_service.cc:165
Definition: service_srv_session_info.h:42
unsigned int uint
Definition: uca-dump.cc:29
int mysql_parser_extract_prepared_params(MYSQL_THD thd, int *positions)
Definition: parser_service.cc:318
This service allows plugins to validate passwords based on a common policy.
Definition: service_mysql_password_policy.h:45
int mysql_string_iterator_islower(mysql_string_iterator_handle iterator_handle)
Definition: string_service.cc:126
void * thd_memdup(MYSQL_THD thd, const void *str, size_t size)
Definition: sql_thd_api.cc:585
#define VERSION_security_context_service
Definition: service_versions.h:44
const mysql_service_registry_t * mysql_plugin_registry_acquire()
Returns a new reference to the "registry" service.
Definition: plugin_registry_service.cc:46
int my_key_fetch(const char *, char **, const char *, void **, size_t *)
Iterates over all active keyring plugins and calls the mysql_key_fetch API for the first one found...
Definition: keyring_service.cc:124
int srv_session_init_thread(const void *plugin)
Initializes the current physical thread to use with session service.
Definition: srv_session_service.cc:58
This service provides support for taking read/write locks.
Definition: service_locking.h:76
#define VERSION_locking_service
Definition: service_versions.h:45
int my_key_store(const char *, const char *, const char *, const void *, size_t)
Iterates over all active keyring plugins calls the mysql_key_store API for the first one found...
Definition: keyring_service.cc:140
int mysql_parser_get_statement_digest(MYSQL_THD thd, unsigned char *digest)
Definition: parser_service.cc:304
This service allows plugins to interact with key store backends.
Definition: service_mysql_keyring.h:60
int my_validate_password_policy(const char *, unsigned int)
Invoke the component/plugin to validate the input password.
Definition: password_policy_service.cc:71
This service allows plugins to allocate and free memory through the server&#39;s memory handling routines...
Definition: service_mysql_alloc.h:58
MYSQL_THD mysql_parser_current_session()
Definition: parser_service.cc:138
uint16_t srv_session_info_get_client_port(MYSQL_SESSION session)
Returns the client port of a session.
unsigned int srv_session_info_session_count()
Returns the number opened sessions in thread initialized by srv_session service.
Definition: srv_session_info_service.cc:132
int command_service_run_command(MYSQL_SESSION session, enum enum_server_command command, const union COM_DATA *data, const CHARSET_INFO *client_cs, const struct st_command_service_cbs *callbacks, enum cs_text_or_binary text_or_binary, void *service_callbacks_ctx)
Executes a server command in a session.
Definition: service_parser.h:196
int mysql_parser_parse(MYSQL_THD thd, const MYSQL_LEX_STRING query, unsigned char is_prepared, sql_condition_handler_function handle_condition, void *condition_handler_state)
Definition: parser_service.cc:232
my_svc_bool thd_set_security_context(MYSQL_THD, MYSQL_SECURITY_CONTEXT in_ctx)
Sets a new security context for the thread.
Definition: service_security_context.cc:79
MYSQL_THD mysql_parser_open_session()
Definition: parser_service.cc:140
Definition: service_srv_session.h:47
char * thd_strdup(MYSQL_THD thd, const char *str)
Definition: sql_thd_api.cc:568
void my_claim(const void *ptr)
Definition: my_malloc.cc:131
void * service
The actual server side service structure pointer.
Definition: sql_plugin_services.h:226
#define VERSION_mysql_string
Definition: service_versions.h:38
void * thd_alloc(MYSQL_THD thd, size_t size)
Allocate memory in the connection&#39;s local memory pool.
Definition: sql_thd_api.cc:564
int mysql_string_iterator_next(mysql_string_iterator_handle iterator_handle)
Definition: string_service.cc:93
int srv_session_detach(MYSQL_SESSION session)
Detaches a session from current physical thread.
MYSQL_THD srv_session_info_get_thd(MYSQL_SESSION session)
Returns the THD of a session.
mysql_string_handle mysql_string_to_lowercase(mysql_string_handle string_handle)
Definition: string_service.cc:146
int mysql_acquire_locking_service_locks(MYSQL_THD opaque_thd, const char *lock_namespace, const char **lock_names, size_t lock_num, enum enum_locking_service_lock_type lock_type, uint64_t lock_timeout)
#define VERSION_mysql_keyring_service
Definition: service_versions.h:48
int my_key_remove(const char *, const char *)
Iterates over all active keyring plugins and calls the mysql_key_remove API for the first one found...
Definition: keyring_service.cc:153
#define VERSION_thd_alloc
Definition: service_versions.h:34
#define VERSION_srv_session_service
Definition: service_versions.h:47
void mysql_parser_start_thread(MYSQL_THD thd, callback_function fun, void *arg, struct my_thread_handle *thread_handle)
int mysql_string_iterator_isupper(mysql_string_iterator_handle iterator_handle)
Definition: string_service.cc:116
my_svc_bool security_context_create(MYSQL_SECURITY_CONTEXT *out_ctx)
Creates a new security context and initializes it with the defaults (no access, no user etc)...
Definition: service_security_context.cc:104
#define VERSION_my_thread_scheduler
Definition: service_versions.h:36
char * my_strndup(PSI_memory_key key, const char *from, size_t length, myf_t flags)
Definition: my_malloc.cc:300
static struct command_service_st command_handler
Definition: sql_plugin_services.h:235
void srv_session_deinit_thread()
Deinitializes the current physical thread to use with session service.
Definition: srv_session_service.cc:65
#define VERSION_plugin_registry_service
Definition: service_versions.h:49
static struct transaction_write_set_service_st transaction_write_set_handler
Definition: sql_plugin_services.h:287
void mysql_parser_set_current_database(MYSQL_THD thd, const MYSQL_LEX_STRING db)
Definition: parser_service.cc:221
void * my_malloc(PSI_memory_key key, size_t size, int flags)
Below functions are used by the components.
Definition: my_memory.cc:57
This service provides functions for plugins and storage engines to manipulate the thread&#39;s security c...
Definition: service_security_context.h:71
static struct thd_alloc_service_st thd_alloc_handler
Definition: sql_plugin_services.h:246
MYSQL_SESSION srv_session_open(srv_session_error_cb error_cb, void *plugin_ctx)
Opens a server session.
Definition: srv_session_service.cc:77
my_svc_bool security_context_copy(MYSQL_SECURITY_CONTEXT in_ctx, MYSQL_SECURITY_CONTEXT *out_ctx)
Duplicates a security context.
Definition: service_security_context.cc:141
my_svc_bool security_context_set_option(MYSQL_SECURITY_CONTEXT, const char *name, void *pvalue)
Sets a value for a named security context attribute Currently defined names are:
Definition: service_security_context.cc:286
void thd_wait_end(MYSQL_THD thd)
Interface for MySQL Server, plugins and storage engines to report when they waking up from a sleep/st...
Definition: sql_thd_api.cc:627
void mysql_parser_join_thread(struct my_thread_handle *thread_handle)
Definition: parser_service.cc:217
#define VERSION_mysql_malloc
Definition: service_versions.h:39
int set_transaction_ctx(Transaction_termination_ctx transaction_termination_ctx)
Definition: rpl_transaction_ctx.cc:93
static struct mysql_parser_service_st parser_handler
Definition: sql_plugin_services.h:273