summaryrefslogtreecommitdiff
path: root/storage/myisam/rt_split.c
diff options
context:
space:
mode:
authoristruewing@chilla.local <>2007-03-08 12:13:54 +0100
committeristruewing@chilla.local <>2007-03-08 12:13:54 +0100
commita44009fe75a134fba0efe9b3338b3ea3c4c2cb6c (patch)
tree34e6c154ab025381413ec6ad4616177ffe853cca /storage/myisam/rt_split.c
parent3eb448049d0d207711a34b4141d964528b746eb7 (diff)
parentf1bbbcce220dd273f7aca9688092c5d5c559332e (diff)
downloadmariadb-git-a44009fe75a134fba0efe9b3338b3ea3c4c2cb6c.tar.gz
Merge chilla.local:/home/mydev/mysql-5.0-bug25673
into chilla.local:/home/mydev/mysql-5.1-bug25673
Diffstat (limited to 'storage/myisam/rt_split.c')
-rw-r--r--storage/myisam/rt_split.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/storage/myisam/rt_split.c b/storage/myisam/rt_split.c
index 9f25ee608d8..0f6dc872958 100644
--- a/storage/myisam/rt_split.c
+++ b/storage/myisam/rt_split.c
@@ -264,13 +264,15 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key,
uint full_length= key_length + (nod_flag ? nod_flag :
info->s->base.rec_reflength);
int max_keys= (mi_getint(page)-2) / (full_length);
+ DBUG_ENTER("rtree_split_page");
+ DBUG_PRINT("rtree", ("splitting block"));
n_dim = keyinfo->keysegs / 2;
if (!(coord_buf= (double*) my_alloca(n_dim * 2 * sizeof(double) *
(max_keys + 1 + 4) +
sizeof(SplitStruct) * (max_keys + 1))))
- return -1;
+ DBUG_RETURN(-1); /* purecov: inspected */
task= (SplitStruct *)(coord_buf + n_dim * 2 * (max_keys + 1 + 4));
@@ -341,12 +343,13 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key,
else
err_code= _mi_write_keypage(info, keyinfo, *new_page_offs,
DFLT_INIT_HITS, new_page);
+ DBUG_PRINT("rtree", ("split new block: %lu", (ulong) *new_page_offs));
my_afree((byte*)new_page);
split_err:
my_afree((byte*) coord_buf);
- return err_code;
+ DBUG_RETURN(err_code);
}
#endif /*HAVE_RTREE_KEYS*/