~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2010-11-06 05:47:12 UTC
  • mto: This revision was merged to the branch mainline in revision 1909.
  • Revision ID: brian@tangent.org-20101106054712-jwxd8e0s0s3nm7qn
Merge in encapsulations in filesort.

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, 2009, 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 */
130
119
Gets the index id field of a page.
131
120
@return index id */
132
121
UNIV_INLINE
133
 
index_id_t
 
122
dulint
134
123
btr_page_get_index_id(
135
124
/*==================*/
136
125
        const page_t*   page);  /*!< in: index page */
204
193
        mtr_t*          mtr);           /*!< in: mtr */
205
194
/**************************************************************//**
206
195
Gets the child node file address in a node pointer.
207
 
NOTE: the offsets array must contain all offsets for the record since
208
 
we read the last field according to offsets and assume that it contains
209
 
the child page number. In other words offsets must have been retrieved
210
 
with rec_get_offsets(n_fields=ULINT_UNDEFINED).
211
196
@return child node address */
212
197
UNIV_INLINE
213
198
ulint
226
211
        ulint           space,  /*!< in: space where created */
227
212
        ulint           zip_size,/*!< in: compressed page size in bytes
228
213
                                or 0 for uncompressed pages */
229
 
        index_id_t      index_id,/*!< in: index id */
 
214
        dulint          index_id,/*!< in: index id */
230
215
        dict_index_t*   index,  /*!< in: index */
231
216
        mtr_t*          mtr);   /*!< in: mini-transaction handle */
232
217
/************************************************************//**
332
317
that mtr holds an x-latch on the tree. */
333
318
UNIV_INTERN
334
319
void
335
 
btr_insert_on_non_leaf_level_func(
336
 
/*==============================*/
 
320
btr_insert_on_non_leaf_level(
 
321
/*=========================*/
337
322
        dict_index_t*   index,  /*!< in: index */
338
323
        ulint           level,  /*!< in: level, must be > 0 */
339
324
        dtuple_t*       tuple,  /*!< in: the record to be inserted */
340
 
        const char*     file,   /*!< in: file name */
341
 
        ulint           line,   /*!< in: line where called */
342
325
        mtr_t*          mtr);   /*!< in: mtr */
343
 
# define btr_insert_on_non_leaf_level(i,l,t,m)                          \
344
 
        btr_insert_on_non_leaf_level_func(i,l,t,__FILE__,__LINE__,m)
345
326
#endif /* !UNIV_HOTBACKUP */
346
327
/****************************************************************//**
347
328
Sets a record as the predefined minimum record. */