1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge remote-tracking branch 'origin/10.1' into 10.2

This commit is contained in:
Vicențiu Ciorbaru
2017-12-22 12:23:39 +02:00
87 changed files with 1806 additions and 350 deletions

View File

@ -314,13 +314,9 @@ extern "C" void free_user(struct user_conn *uc)
void init_max_user_conn(void)
{
#ifndef NO_EMBEDDED_ACCESS_CHECKS
if (my_hash_init(&hash_user_connections,system_charset_info,max_connections,
0,0, (my_hash_get_key) get_key_conn,
(my_hash_free_key) free_user, 0))
{
sql_print_error("Initializing hash_user_connections failed.");
exit(1);
}
my_hash_init(&hash_user_connections, system_charset_info, max_connections,
0, 0, (my_hash_get_key) get_key_conn,
(my_hash_free_key) free_user, 0);
#endif
}
@ -479,24 +475,16 @@ void init_user_stats(USER_STATS *user_stats,
void init_global_user_stats(void)
{
if (my_hash_init(&global_user_stats, system_charset_info, max_connections,
0, 0, (my_hash_get_key) get_key_user_stats,
(my_hash_free_key)free_user_stats, 0))
{
sql_print_error("Initializing global_user_stats failed.");
exit(1);
}
my_hash_init(&global_user_stats, system_charset_info, max_connections,
0, 0, (my_hash_get_key) get_key_user_stats,
(my_hash_free_key) free_user_stats, 0);
}
void init_global_client_stats(void)
{
if (my_hash_init(&global_client_stats, system_charset_info, max_connections,
0, 0, (my_hash_get_key) get_key_user_stats,
(my_hash_free_key)free_user_stats, 0))
{
sql_print_error("Initializing global_client_stats failed.");
exit(1);
}
my_hash_init(&global_client_stats, system_charset_info, max_connections,
0, 0, (my_hash_get_key) get_key_user_stats,
(my_hash_free_key) free_user_stats, 0);
}
extern "C" uchar *get_key_table_stats(TABLE_STATS *table_stats, size_t *length,
@ -513,12 +501,9 @@ extern "C" void free_table_stats(TABLE_STATS* table_stats)
void init_global_table_stats(void)
{
if (my_hash_init(&global_table_stats, system_charset_info, max_connections,
0, 0, (my_hash_get_key) get_key_table_stats,
(my_hash_free_key)free_table_stats, 0)) {
sql_print_error("Initializing global_table_stats failed.");
exit(1);
}
my_hash_init(&global_table_stats, system_charset_info, max_connections,
0, 0, (my_hash_get_key) get_key_table_stats,
(my_hash_free_key) free_table_stats, 0);
}
extern "C" uchar *get_key_index_stats(INDEX_STATS *index_stats, size_t *length,
@ -535,13 +520,9 @@ extern "C" void free_index_stats(INDEX_STATS* index_stats)
void init_global_index_stats(void)
{
if (my_hash_init(&global_index_stats, system_charset_info, max_connections,
0, 0, (my_hash_get_key) get_key_index_stats,
(my_hash_free_key)free_index_stats, 0))
{
sql_print_error("Initializing global_index_stats failed.");
exit(1);
}
my_hash_init(&global_index_stats, system_charset_info, max_connections,
0, 0, (my_hash_get_key) get_key_index_stats,
(my_hash_free_key) free_index_stats, 0);
}