1
/* Copyright (C) 2002, 2004 MySQL AB & Ramil Kalimullin
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
19
#ifdef HAVE_RTREE_KEYS
21
#define rt_PAGE_FIRST_KEY(page, nod_flag) (page + 2 + nod_flag)
22
#define rt_PAGE_NEXT_KEY(key, key_length, nod_flag) (key + key_length + \
23
(nod_flag ? nod_flag : info->s->base.rec_reflength))
24
#define rt_PAGE_END(page) (page + mi_getint(page))
26
#define rt_PAGE_MIN_SIZE(block_length) ((uint)(block_length) / 3)
28
int rtree_insert(MI_INFO *info, uint keynr, uchar *key, uint key_length);
29
int rtree_delete(MI_INFO *info, uint keynr, uchar *key, uint key_length);
31
int rtree_find_first(MI_INFO *info, uint keynr, uchar *key, uint key_length,
33
int rtree_find_next(MI_INFO *info, uint keynr, uint search_flag);
35
int rtree_get_first(MI_INFO *info, uint keynr, uint key_length);
36
int rtree_get_next(MI_INFO *info, uint keynr, uint key_length);
38
ha_rows rtree_estimate(MI_INFO *info, uint keynr, uchar *key,
39
uint key_length, uint flag);
41
int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key,
42
uint key_length, my_off_t *new_page_offs);
44
#endif /*HAVE_RTREE_KEYS*/
45
#endif /* _rt_index_h */