mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
Bug fix: should check _mi_new() return value.
This commit is contained in:
parent
475d288e8f
commit
aa19b26c7b
1 changed files with 5 additions and 2 deletions
|
@ -330,8 +330,11 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key,
|
|||
mi_putint(page, 2 + n1 * full_length, nod_flag);
|
||||
mi_putint(new_page, 2 + n2 * full_length, nod_flag);
|
||||
|
||||
*new_page_offs=_mi_new(info, keyinfo);
|
||||
err_code= _mi_write_keypage(info, keyinfo, *new_page_offs, new_page);
|
||||
if ((*new_page_offs= _mi_new(info, keyinfo)) == HA_OFFSET_ERROR)
|
||||
err_code= -1;
|
||||
else
|
||||
err_code= _mi_write_keypage(info, keyinfo, *new_page_offs, new_page);
|
||||
|
||||
my_afree((byte*)new_page);
|
||||
|
||||
split_err:
|
||||
|
|
Loading…
Add table
Reference in a new issue