diff options
author | serg@serg.mylan <> | 2005-01-24 15:48:25 +0100 |
---|---|---|
committer | serg@serg.mylan <> | 2005-01-24 15:48:25 +0100 |
commit | 67ba2e367a2d21321ae58048d131ab39248dea00 (patch) | |
tree | d0b61b703f3c601368669e4acab45d7567a4669b /myisam/rt_index.c | |
parent | b53757ba91f67885911f677d09a2757774998b7b (diff) | |
download | mariadb-git-67ba2e367a2d21321ae58048d131ab39248dea00.tar.gz |
fixes/cleanups according to Coverity report
Diffstat (limited to 'myisam/rt_index.c')
-rw-r--r-- | myisam/rt_index.c | 7 |
1 files changed, 3 insertions, 4 deletions
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; |