mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Bug fix: should use my_multi_malloc() here!!!
This commit is contained in:
@@ -265,13 +265,12 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key,
|
|||||||
|
|
||||||
n_dim = keyinfo->keysegs / 2;
|
n_dim = keyinfo->keysegs / 2;
|
||||||
|
|
||||||
{
|
if (!my_multi_malloc(MYF(0),
|
||||||
int coord_buf_size = n_dim * 2 * sizeof(double) * (max_keys + 1 + 4);
|
&coord_buf, n_dim * 2 * sizeof(double) * (max_keys + 1 + 4),
|
||||||
coord_buf =
|
&task, sizeof(SplitStruct) * (max_keys + 1),
|
||||||
my_alloca(coord_buf_size + sizeof(SplitStruct) * (max_keys + 1));
|
NullS))
|
||||||
|
return -1;
|
||||||
|
|
||||||
task = (SplitStruct *)(((char *)coord_buf) + coord_buf_size);
|
|
||||||
}
|
|
||||||
next_coord = coord_buf;
|
next_coord = coord_buf;
|
||||||
|
|
||||||
stop = task + max_keys;
|
stop = task + max_keys;
|
||||||
|
Reference in New Issue
Block a user