1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

compatibility issues

Fixed errors reported by valgrind (some errors in NDB remains)
This commit is contained in:
monty@mysql.com
2005-05-20 16:14:35 +03:00
parent ed674271d4
commit 0b75f6e37b
8 changed files with 33 additions and 23 deletions

View File

@ -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;