summaryrefslogtreecommitdiff
path: root/myisam/mi_write.c
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2002-07-23 18:31:22 +0300
committermonty@mashka.mysql.fi <>2002-07-23 18:31:22 +0300
commitdddc20d9d1eea5fd526a2082a43801fed304afe4 (patch)
tree2e458857fc65791ee553b4cde0e28ef9459050a5 /myisam/mi_write.c
parent373e19dca1d209476a15d7d61cb350361c9d6efa (diff)
downloadmariadb-git-dddc20d9d1eea5fd526a2082a43801fed304afe4.tar.gz
New SET syntax & system variables.
Made a some new buffers thread specific and changeable. Resize of key_buffer. AUTO_COMMIT -> AUTOCOMMIT Fixed mutex bug in DROP DATABASE Fixed bug when using auto_increment as second part of a key where first part could include NULL. Split handler->extra() to extra() and extra_opt() to be able to support thread specific buffers. Don't write message to error log when slave reconnects becasue of timeout. Fixed possible update problem when using DELETE/UPDATE on small tables (In some cases we used index even if table scanning would be better) A lot of minior code cleanups
Diffstat (limited to 'myisam/mi_write.c')
-rw-r--r--myisam/mi_write.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/myisam/mi_write.c b/myisam/mi_write.c
index 9998a25a96a..cfacd0bc4d5 100644
--- a/myisam/mi_write.c
+++ b/myisam/mi_write.c
@@ -801,7 +801,7 @@ static int keys_free(uchar *key, TREE_FREE mode, bulk_insert_param *param)
}
-int _mi_init_bulk_insert(MI_INFO *info)
+int _mi_init_bulk_insert(MI_INFO *info, ulong cache_size)
{
MYISAM_SHARE *share=info->s;
MI_KEYDEF *key=share->keyinfo;
@@ -809,6 +809,7 @@ int _mi_init_bulk_insert(MI_INFO *info)
uint i, num_keys;
ulonglong key_map=0;
DBUG_ENTER("_mi_init_bulk_insert");
+ DBUG_PRINT("enter",("cache_size: %lu", cache_size));
if (info->bulk_insert)
DBUG_RETURN(0);
@@ -824,7 +825,7 @@ int _mi_init_bulk_insert(MI_INFO *info)
}
if (num_keys==0 ||
- num_keys * MI_MIN_SIZE_BULK_INSERT_TREE > myisam_bulk_insert_tree_size)
+ num_keys * MI_MIN_SIZE_BULK_INSERT_TREE > cache_size)
DBUG_RETURN(0);
info->bulk_insert=(TREE *)
@@ -842,8 +843,8 @@ int _mi_init_bulk_insert(MI_INFO *info)
params->info=info;
params->keynr=i;
init_tree(&info->bulk_insert[i],
- myisam_bulk_insert_tree_size / num_keys / 4 + 10,
- myisam_bulk_insert_tree_size / num_keys, 0,
+ cache_size / num_keys / 4 + 10,
+ cache_size / num_keys, 0,
(qsort_cmp2)keys_compare, 0,
(tree_element_free) keys_free, (void *)params++);
}