From 67ba2e367a2d21321ae58048d131ab39248dea00 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Mon, 24 Jan 2005 15:48:25 +0100 Subject: fixes/cleanups according to Coverity report --- myisam/rt_index.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'myisam/rt_index.c') diff --git a/myisam/rt_index.c b/myisam/rt_index.c index bdf5ee9c60f..97554dca4e6 100644 --- a/myisam/rt_index.c +++ b/myisam/rt_index.c @@ -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; -- cgit v1.2.1