mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
fixes/cleanups according to Coverity report
This commit is contained in:
@ -948,15 +948,14 @@ int rtree_delete(MI_INFO *info, uint keynr, uchar *key, uint key_length)
|
||||
/* check for redundant root (not leaf, 1 child) and eliminate */
|
||||
if ((old_root = info->s->state.key_root[keynr]) == HA_OFFSET_ERROR)
|
||||
goto err1;
|
||||
if (!_mi_fetch_keypage(info, keyinfo, old_root, DFLT_INIT_HITS,
|
||||
if (!_mi_fetch_keypage(info, keyinfo, old_root, DFLT_INIT_HITS,
|
||||
info->buff, 0))
|
||||
goto err1;
|
||||
nod_flag = mi_test_if_nod(info->buff);
|
||||
page_size = mi_getint(info->buff);
|
||||
if (nod_flag && (page_size == 2 + key_length +
|
||||
(nod_flag ? nod_flag : info->s->base.rec_reflength)))
|
||||
if (nod_flag && (page_size == 2 + key_length + nod_flag))
|
||||
{
|
||||
my_off_t new_root = _mi_kpos(nod_flag,
|
||||
my_off_t new_root = _mi_kpos(nod_flag,
|
||||
rt_PAGE_FIRST_KEY(info->buff, nod_flag));
|
||||
if (_mi_dispose(info, keyinfo, old_root, DFLT_INIT_HITS))
|
||||
goto err1;
|
||||
|
Reference in New Issue
Block a user