mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
cleanup: PSI key is *always* the first argument
This commit is contained in:
@ -1608,26 +1608,24 @@ int plugin_init(int *argc, char **argv, int flags)
|
||||
init_alloc_root(key_memory_plugin_mem_root, &plugin_vars_mem_root, 4096, 4096, MYF(0));
|
||||
init_alloc_root(PSI_NOT_INSTRUMENTED, &tmp_root, 4096, 4096, MYF(0));
|
||||
|
||||
if (my_hash_init(&bookmark_hash, &my_charset_bin, 32, 0, 0,
|
||||
get_bookmark_hash_key, NULL, HASH_UNIQUE,
|
||||
key_memory_plugin_bookmark))
|
||||
if (my_hash_init(key_memory_plugin_bookmark, &bookmark_hash, &my_charset_bin, 32, 0, 0,
|
||||
get_bookmark_hash_key, NULL, HASH_UNIQUE))
|
||||
goto err;
|
||||
|
||||
/*
|
||||
The 80 is from 2016-04-27 when we had 71 default plugins
|
||||
Big enough to avoid many mallocs even in future
|
||||
*/
|
||||
if (my_init_dynamic_array(&plugin_dl_array, key_memory_mysql_plugin_dl,
|
||||
if (my_init_dynamic_array(key_memory_mysql_plugin_dl, &plugin_dl_array,
|
||||
sizeof(struct st_plugin_dl *), 16, 16, MYF(0)) ||
|
||||
my_init_dynamic_array(&plugin_array, key_memory_mysql_plugin,
|
||||
my_init_dynamic_array(key_memory_mysql_plugin, &plugin_array,
|
||||
sizeof(struct st_plugin_int *), 80, 32, MYF(0)))
|
||||
goto err;
|
||||
|
||||
for (i= 0; i < MYSQL_MAX_PLUGIN_TYPE_NUM; i++)
|
||||
{
|
||||
if (my_hash_init(&plugin_hash[i], system_charset_info, 32, 0, 0,
|
||||
get_plugin_hash_key, NULL, HASH_UNIQUE,
|
||||
key_memory_plugin_mem_root))
|
||||
if (my_hash_init(key_memory_plugin_mem_root, &plugin_hash[i], system_charset_info, 32, 0, 0,
|
||||
get_plugin_hash_key, NULL, HASH_UNIQUE))
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user