summaryrefslogtreecommitdiff
path: root/myisam/mi_extra.c
diff options
context:
space:
mode:
authorserg@serg.mysql.com <>2001-07-02 21:18:57 +0200
committerserg@serg.mysql.com <>2001-07-02 21:18:57 +0200
commit15b6738474fd9df56c4aff8f984278cd374bd3f3 (patch)
treec2f7be1c19137e631cb5b7d9a3163a215a3d14e6 /myisam/mi_extra.c
parent3c7cc2285c6a80cd998faa5d669d7d9d0d20b632 (diff)
downloadmariadb-git-15b6738474fd9df56c4aff8f984278cd374bd3f3.tar.gz
memory-limited tree
bulk inserts optimization: caching keys in binary tree
Diffstat (limited to 'myisam/mi_extra.c')
-rw-r--r--myisam/mi_extra.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/myisam/mi_extra.c b/myisam/mi_extra.c
index e1e4fe75a07..d7f3e4dc04a 100644
--- a/myisam/mi_extra.c
+++ b/myisam/mi_extra.c
@@ -336,6 +336,24 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function)
case HA_EXTRA_QUICK:
info->quick_mode=1;
break;
+ case HA_EXTRA_BULK_INSERT_BEGIN:
+ error=_mi_init_bulk_insert(info);
+ break;
+ case HA_EXTRA_BULK_INSERT_END:
+ if (info->bulk_insert)
+ {
+ uint i;
+ for (i=0 ; i < share->base.keys ; i++)
+ {
+ if (is_tree_inited(& info->bulk_insert[i]))
+ {
+ delete_tree(& info->bulk_insert[i]);
+ }
+ }
+ my_free((void *)info->bulk_insert, MYF(0));
+ info->bulk_insert=0;
+ }
+ break;
case HA_EXTRA_NO_ROWS:
if (!share->state.header.uniques)
info->opt_flag|= OPT_NO_ROWS;