diff options
author | unknown <monty@mashka.mysql.fi> | 2003-10-11 22:00:24 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-10-11 22:00:24 +0300 |
commit | 3b8f34a56cda018cc6ded6dd3c59c1f65f9fa908 (patch) | |
tree | 50a7bfd87153439907087d4b3529d622cfc75313 /sql/sql_parse.cc | |
parent | 1a8bdb002369bc351659fe9e07ae93605cd7f858 (diff) | |
download | mariadb-git-3b8f34a56cda018cc6ded6dd3c59c1f65f9fa908.tar.gz |
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
configure.in:
Added detection of mallinfo
mysql-test/r/variables.result:
Test of new variables
mysql-test/t/variables.test:
Test of new variables
sql/ha_berkeley.cc:
Use init_sql_alloc instead of init_alloc_root for better OOM detection
sql/log_event.cc:
Add new user variables for tuning memory usage
sql/mysql_priv.h:
Add new user variables for tuning memory usage
sql/mysqld.cc:
Add new user variables for tuning memory usage
sql/opt_ft.cc:
Add new user variables for tuning memory usage
sql/opt_ft.h:
Add new user variables for tuning memory usage
sql/opt_range.cc:
Add new user variables for tuning memory usage
Add more checks for out of memory conditions
sql/opt_range.h:
Add new user variables for tuning memory usage
sql/set_var.cc:
Add new user variables for tuning memory usage
sql/sql_acl.cc:
Add new user variables for tuning memory usage
sql/sql_class.h:
Add new user variables for tuning memory usage
sql/sql_delete.cc:
Add new user variables for tuning memory usage
sql/sql_parse.cc:
Add new user variables for tuning memory usage
sql/sql_select.cc:
Add new user variables for tuning memory usage
sql/sql_test.cc:
Add information about memory useage if system supports mallinfo()
sql/sql_udf.cc:
Add new user variables for tuning memory usage
sql/sql_update.cc:
Add new user variables for tuning memory usage
sql/table.cc:
Add new user variables for tuning memory usage
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 0c4e3cad763..c913b29cdeb 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -46,11 +46,6 @@ #endif /* HAVE_OPENSSL */ #define SCRAMBLE_LENGTH 8 -#define MEM_ROOT_BLOCK_SIZE 8192 -#define MEM_ROOT_PREALLOC 8192 -#define TRANS_MEM_ROOT_BLOCK_SIZE 4096 -#define TRANS_MEM_ROOT_PREALLOC 4096 - extern int yyparse(void); extern "C" pthread_mutex_t THR_LOCK_keycache; #ifdef SOLARIS @@ -714,9 +709,12 @@ pthread_handler_decl(handle_one_connection,arg) thd->command=COM_SLEEP; thd->version=refresh_version; thd->set_time(); - init_sql_alloc(&thd->mem_root, MEM_ROOT_BLOCK_SIZE, MEM_ROOT_PREALLOC); + init_sql_alloc(&thd->mem_root, thd->variables.query_alloc_block_size, + thd->variables.query_prealloc_size); init_sql_alloc(&thd->transaction.mem_root, - TRANS_MEM_ROOT_BLOCK_SIZE, TRANS_MEM_ROOT_PREALLOC); + thd->variables.trans_alloc_block_size, + thd->variables.trans_prealloc_size); + while (!net->error && net->vio != 0 && !thd->killed) { if (do_command(thd)) @@ -791,9 +789,11 @@ extern "C" pthread_handler_decl(handle_bootstrap,arg) thd->priv_user=thd->user=(char*) my_strdup("boot", MYF(MY_WME)); buff= (char*) thd->net.buff; - init_sql_alloc(&thd->mem_root, MEM_ROOT_BLOCK_SIZE, MEM_ROOT_PREALLOC); + init_sql_alloc(&thd->mem_root, thd->variables.query_alloc_block_size, + thd->variables.query_prealloc_size); init_sql_alloc(&thd->transaction.mem_root, - TRANS_MEM_ROOT_BLOCK_SIZE, TRANS_MEM_ROOT_PREALLOC); + thd->variables.trans_alloc_block_size, + thd->variables.trans_prealloc_size); while (fgets(buff, thd->net.max_packet, file)) { uint length=(uint) strlen(buff); |