summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2002-11-20 22:56:57 +0200
committerunknown <monty@mashka.mysql.fi>2002-11-20 22:56:57 +0200
commit9b9546edbc095e061167588f672549103627bf98 (patch)
tree1deb846a75b9e1e5c1491e20df66b4d74fc6fa0b /mysys
parent33d678fcdc2d0b431c0f08e11e0b6715cd37cda0 (diff)
downloadmariadb-git-9b9546edbc095e061167588f672549103627bf98.tar.gz
Try to optimize the cache buffer size needed for bulk_insert
Fix for shutdown on Mac OS X include/my_tree.h: Try to optimize the cache buffer size needed for bulk_insert myisam/mi_write.c: Try to optimize the cache buffer size needed for bulk_insert mysql-test/r/bdb.result: Make test repeatable mysql-test/t/bdb.test: Make test repeatable mysys/tree.c: Try to optimize the cache buffer size needed for bulk_insert sql/mysql_priv.h: Small optimization sql/mysqld.cc: Fix for shutdown on Mac OS X sql/sql_insert.cc: Try to optimize the cache buffer size needed for bulk_insert sql/sql_yacc.yy: Call thd->strmake() instead of sql_strmake() sql/table.cc: Try to optimize the cache buffer size needed for bulk_insert sql/table.h: Try to optimize the cache buffer size needed for bulk_insert
Diffstat (limited to 'mysys')
-rw-r--r--mysys/tree.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mysys/tree.c b/mysys/tree.c
index 2ac2c88fd66..ea5cf79f084 100644
--- a/mysys/tree.c
+++ b/mysys/tree.c
@@ -45,7 +45,8 @@
#define BLACK 1
#define RED 0
-#define DEFAULT_ALLOC_SIZE (8192-MALLOC_OVERHEAD)
+#define DEFAULT_ALLOC_SIZE 8192
+#define DEFAULT_ALIGN_SIZE 8192
static void delete_tree_element(TREE *,TREE_ELEMENT *);
static int tree_walk_left_root_right(TREE *,TREE_ELEMENT *,
@@ -72,8 +73,9 @@ void init_tree(TREE *tree, uint default_alloc_size, uint memory_limit,
DBUG_ENTER("init_tree");
DBUG_PRINT("enter",("tree: %lx size: %d",tree,size));
- if (!default_alloc_size)
- default_alloc_size= DEFAULT_ALLOC_SIZE;
+ if (default_alloc_size < DEFAULT_ALLOC_SIZE)
+ default_alloc_size= DEFAULT_ALLOC_SIZE;
+ default_alloc_size= MY_ALIGN(default_alloc_size, DEFAULT_ALIGN_SIZE);
bzero((gptr) &tree->null_element,sizeof(tree->null_element));
tree->root= &tree->null_element;
tree->compare=compare;