~mysql/mysql-server/mysql-6.0

« back to all changes in this revision

Viewing changes to myisam/rt_index.h

Merge with 4.0.3
Some simple optimzations, more comments and indentation changes.
Add ` around database in 'use database' in binary log.
Moved max_error_count and max_warning_count to variables struct.
Removed SHOW_WARNS_COUNT and SHOW_ERRORS_COUNT calls.
Changed string functions to use character set of first string argument as default return characterset
(Each string function can change the above assumption if needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2000 MySQL AB & Ramil Kalimullin & MySQL Finland AB 
 
2
   & TCX DataKonsult AB
 
3
 
 
4
   This program is free software; you can redistribute it and/or modify
 
5
   it under the terms of the GNU General Public License as published by
 
6
   the Free Software Foundation; either version 2 of the License, or
 
7
   (at your option) any later version.
 
8
   
 
9
   This program is distributed in the hope that it will be useful,
 
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
   GNU General Public License for more details.
 
13
   
 
14
   You should have received a copy of the GNU General Public License
 
15
   along with this program; if not, write to the Free Software
 
16
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
17
 
 
18
#ifndef _rt_index_h
 
19
#define _rt_index_h
 
20
 
 
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))
 
25
 
 
26
#define rt_PAGE_MIN_SIZE(block_length) ((uint)(block_length) / 2)
 
27
 
 
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);
 
30
 
 
31
int rtree_find_first(MI_INFO *info, uint keynr, uchar *key, uint key_length, 
 
32
                    uint search_flag);
 
33
int rtree_find_next(MI_INFO *info, uint keynr, uint search_flag);
 
34
 
 
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);
 
37
 
 
38
ha_rows rtree_estimate(MI_INFO *info, uint keynr, uchar *key, 
 
39
                       uint key_length, uint flag);
 
40
 
 
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);
 
43
 
 
44
#endif /* _rt_index_h */