mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user