summaryrefslogtreecommitdiff
path: root/storage/myisam/rt_split.c
diff options
context:
space:
mode:
authorndbdev@dl145c.mysql.com <>2005-05-23 10:45:48 +0200
committerndbdev@dl145c.mysql.com <>2005-05-23 10:45:48 +0200
commit30def9f3f878111eb504d77b54d287deb698e452 (patch)
tree3ddbb7a46932f6419027b1a071af6b7cbcdf4c94 /storage/myisam/rt_split.c
parent3efa46046dedbfc5fc4dfc055dc16be68699471d (diff)
parentd68a52377ae4827a5582653da3be76d89ee8417a (diff)
downloadmariadb-git-30def9f3f878111eb504d77b54d287deb698e452.tar.gz
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145c.mysql.com:/home/ndbdev/tomas/mysql-5.1
Diffstat (limited to 'storage/myisam/rt_split.c')
-rw-r--r--storage/myisam/rt_split.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/storage/myisam/rt_split.c b/storage/myisam/rt_split.c
index 005e86805bb..31a7d09ab4f 100644
--- a/storage/myisam/rt_split.c
+++ b/storage/myisam/rt_split.c
@@ -257,18 +257,17 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key,
int n_dim;
uchar *source_cur, *cur1, *cur2;
uchar *new_page;
- int err_code = 0;
-
- uint nod_flag = mi_test_if_nod(page);
- uint full_length = key_length + (nod_flag ? nod_flag :
- info->s->base.rec_reflength);
-
- int max_keys = (mi_getint(page)-2) / (full_length);
+ int err_code= 0;
+ uint nod_flag= mi_test_if_nod(page);
+ uint full_length= key_length + (nod_flag ? nod_flag :
+ info->s->base.rec_reflength);
+ int max_keys= (mi_getint(page)-2) / (full_length);
n_dim = keyinfo->keysegs / 2;
- if (!(coord_buf= my_alloca(n_dim * 2 * sizeof(double) * (max_keys + 1 + 4) +
- sizeof(SplitStruct) * (max_keys + 1))))
+ if (!(coord_buf= (double*) my_alloca(n_dim * 2 * sizeof(double) *
+ (max_keys + 1 + 4) +
+ sizeof(SplitStruct) * (max_keys + 1))))
return -1;
task= (SplitStruct *)(coord_buf + n_dim * 2 * (max_keys + 1 + 4));
@@ -311,8 +310,7 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key,
cur1 = rt_PAGE_FIRST_KEY(page, nod_flag);
cur2 = rt_PAGE_FIRST_KEY(new_page, nod_flag);
- n1 = 0;
- n2 = 0;
+ n1= n2 = 0;
for (cur = task; cur < stop; ++cur)
{
uchar *to;