~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/include/btr0btr.h

  • Committer: Lee Bieber
  • Date: 2010-11-14 23:15:42 UTC
  • mfrom: (1929.1.42 warning-stack-frame)
  • Revision ID: kalebral@gmail.com-20101114231542-fnnu6ydd2p17n582
Merge Monty - fix bug 672372: some functions use > 32k stack

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (C) 1994, 2010, Innobase Oy. All Rights Reserved.
 
3
Copyright (c) 1994, 2010, Innobase Oy. All Rights Reserved.
4
4
 
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
68
68
        BTR_MODIFY_PREV = 36
69
69
};
70
70
 
71
 
/* BTR_INSERT, BTR_DELETE and BTR_DELETE_MARK are mutually exclusive. */
72
 
 
73
71
/** If this is ORed to btr_latch_mode, it means that the search tuple
74
 
will be inserted to the index, at the searched position.
75
 
When the record is not in the buffer pool, try to use the insert buffer. */
 
72
will be inserted to the index, at the searched position */
76
73
#define BTR_INSERT              512
77
74
 
78
75
/** This flag ORed to btr_latch_mode says that we do the search in query
79
76
optimization */
80
77
#define BTR_ESTIMATE            1024
81
78
 
82
 
/** This flag ORed to BTR_INSERT says that we can ignore possible
 
79
/** This flag ORed to btr_latch_mode says that we can ignore possible
83
80
UNIQUE definition on secondary indexes when we decide if we can use
84
81
the insert buffer to speed up inserts */
85
82
#define BTR_IGNORE_SEC_UNIQUE   2048
86
83
 
87
 
/** Try to delete mark the record at the searched position using the
88
 
insert/delete buffer when the record is not in the buffer pool. */
89
 
#define BTR_DELETE_MARK         4096
90
 
 
91
 
/** Try to purge the record at the searched position using the insert/delete
92
 
buffer when the record is not in the buffer pool. */
93
 
#define BTR_DELETE              8192
94
 
 
95
84
/**************************************************************//**
96
85
Gets the root node of a tree and x-latches it.
97
86
@return root page, x-latched */
105
94
Gets a buffer page and declares its latching order level. */
106
95
UNIV_INLINE
107
96
buf_block_t*
108
 
btr_block_get_func(
109
 
/*===============*/
110
 
        ulint           space,          /*!< in: space id */
111
 
        ulint           zip_size,       /*!< in: compressed page size in bytes
112
 
                                        or 0 for uncompressed pages */
113
 
        ulint           page_no,        /*!< in: page number */
114
 
        ulint           mode,           /*!< in: latch mode */
115
 
        const char*     file,           /*!< in: file name */
116
 
        ulint           line,           /*!< in: line where called */
117
 
        mtr_t*          mtr)            /*!< in/out: mtr */
118
 
        __attribute__((nonnull));
119
 
/** Gets a buffer page and declares its latching order level.
120
 
@param space    tablespace identifier
121
 
@param zip_size compressed page size in bytes or 0 for uncompressed pages
122
 
@param page_no  page number
123
 
@param mode     latch mode
124
 
@param mtr      mini-transaction handle
125
 
@return the block descriptor */
126
 
# define btr_block_get(space,zip_size,page_no,mode,mtr) \
127
 
        btr_block_get_func(space,zip_size,page_no,mode,__FILE__,__LINE__,mtr)
128
 
/** Gets a buffer page and declares its latching order level.
129
 
@param space    tablespace identifier
130
 
@param zip_size compressed page size in bytes or 0 for uncompressed pages
131
 
@param page_no  page number
132
 
@param mode     latch mode
133
 
@param mtr      mini-transaction handle
134
 
@return the uncompressed page frame */
135
 
# define btr_page_get(space,zip_size,page_no,mode,mtr) \
136
 
        buf_block_get_frame(btr_block_get(space,zip_size,page_no,mode,mtr))
 
97
btr_block_get(
 
98
/*==========*/
 
99
        ulint   space,          /*!< in: space id */
 
100
        ulint   zip_size,       /*!< in: compressed page size in bytes
 
101
                                or 0 for uncompressed pages */
 
102
        ulint   page_no,        /*!< in: page number */
 
103
        ulint   mode,           /*!< in: latch mode */
 
104
        mtr_t*  mtr);           /*!< in: mtr */
 
105
/**************************************************************//**
 
106
Gets a buffer page and declares its latching order level. */
 
107
UNIV_INLINE
 
108
page_t*
 
109
btr_page_get(
 
110
/*=========*/
 
111
        ulint   space,          /*!< in: space id */
 
112
        ulint   zip_size,       /*!< in: compressed page size in bytes
 
113
                                or 0 for uncompressed pages */
 
114
        ulint   page_no,        /*!< in: page number */
 
115
        ulint   mode,           /*!< in: latch mode */
 
116
        mtr_t*  mtr);           /*!< in: mtr */
137
117
#endif /* !UNIV_HOTBACKUP */
138
118
/**************************************************************//**
139
119
Gets the index id field of a page.
140
120
@return index id */
141
121
UNIV_INLINE
142
 
index_id_t
 
122
dulint
143
123
btr_page_get_index_id(
144
124
/*==================*/
145
125
        const page_t*   page);  /*!< in: index page */
235
215
        ulint           space,  /*!< in: space where created */
236
216
        ulint           zip_size,/*!< in: compressed page size in bytes
237
217
                                or 0 for uncompressed pages */
238
 
        index_id_t      index_id,/*!< in: index id */
 
218
        dulint          index_id,/*!< in: index id */
239
219
        dict_index_t*   index,  /*!< in: index */
240
220
        mtr_t*          mtr);   /*!< in: mini-transaction handle */
241
221
/************************************************************//**