1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Add new user variables for tuning memory usage:

query_alloc_block_size, query_prealloc_size, range_alloc_block_size,transaction_alloc_block_size and transaction_prealloc_size
Add more checks for "out of memory" detection in range optimization
This commit is contained in:
monty@mashka.mysql.fi
2003-10-11 22:00:24 +03:00
parent 9bba878b8c
commit c95d142f8f
21 changed files with 257 additions and 81 deletions

View File

@ -183,7 +183,7 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
thd->net.last_error);
goto end;
}
init_sql_alloc(&mem,1024,0);
init_sql_alloc(&mem, ACL_ALLOC_BLOCK_SIZE, 0);
init_read_record(&read_record_info,thd,table= tables[0].table,NULL,1,0);
VOID(my_init_dynamic_array(&acl_hosts,sizeof(ACL_HOST),20,50));
while (!(read_record_info.read_record(&read_record_info)))
@ -2417,7 +2417,7 @@ my_bool grant_init(THD *org_thd)
grant_option = FALSE;
(void) hash_init(&hash_tables,0,0,0, (hash_get_key) get_grant_table,
(hash_free_key) free_grant_table,0);
init_sql_alloc(&memex,1024,0);
init_sql_alloc(&memex, ACL_ALLOC_BLOCK_SIZE, 0);
/* Don't do anything if running with --skip-grant */
if (!initialized)