8.11.6.1 Thread Pool Components and Installation

The thread pool feature comprises these components:

To be usable by the server, the thread pool library object file must be located in the MySQL plugin directory (the directory named by the plugin_dir system variable). To enable thread pool capability, load the plugins to be used by starting the server with the --plugin-load option. For example, if you name just the plugin object file, the server loads all plugins that it contains (that is, the thread pool plugin and all the INFORMATION_SCHEMA tables). To do this, put these lines in your my.cnf file:

[mysqld]
plugin-load=thread_pool.so

That is equivalent to loading all thread pool plugins by naming them individually:

[mysqld]
plugin-load=thread_pool.so
plugin-load=thread_pool=thread_pool.so;tp_thread_state=thread_pool.so;tp_thread_group_state=thread_pool.so;tp_thread_group_stats=thread_pool.so

If object files have a suffix different from .so on your system, substitute the correct suffix (for example, .dll on Windows).

If necessary, set the value of the plugin_dir system variable to tell the server the location of the plugin directory.

If desired, you can load individual plugins from the library file. To load the thread pool plugin but not the INFORMATION_SCHEMA tables, use an option like this:

[mysqld]
plugin-load=thread_pool=thread_pool.so

To load the thread pool plugin and only the TP_THREAD_STATE INFORMATION_SCHEMA table, use an option like this:

[mysqld]
plugin-load=thread_pool=thread_pool.so;TP_THREAD_STATE=thread_pool.so

However, if you do not load all the INFORMATION_SCHEMA tables, some or all MySQL Enterprise Monitor thread pool graphs will be empty.

To verify plugin installation, examine the INFORMATION_SCHEMA.PLUGINS table or use the SHOW PLUGINS statement. See Section 5.1.8.2, “Obtaining Server Plugin Information”.

If the server loads the thread plugin successfully, it sets the thread_handling system variable to dynamically-loaded. If the plugin fails to load, the server writes a message to the error log.