46
29
#define BTR_PCUR_BEFORE_FIRST_IN_TREE 4 /* in an empty tree */
47
30
#define BTR_PCUR_AFTER_LAST_IN_TREE 5 /* in an empty tree */
49
/**************************************************************//**
50
Allocates memory for a persistent cursor object and initializes the cursor.
51
@return own: persistent cursor */
32
/******************************************************************
33
Allocates memory for a persistent cursor object and initializes the cursor. */
54
36
btr_pcur_create_for_mysql(void);
55
37
/*============================*/
56
/**************************************************************//**
38
/* out, own: persistent cursor */
39
/******************************************************************
57
40
Frees the memory for a persistent cursor object. */
60
43
btr_pcur_free_for_mysql(
61
44
/*====================*/
62
btr_pcur_t* cursor); /*!< in, own: persistent cursor */
63
/**************************************************************//**
45
btr_pcur_t* cursor); /* in, own: persistent cursor */
46
/******************************************************************
64
47
Copies the stored position of a pcur to another pcur. */
67
50
btr_pcur_copy_stored_position(
68
51
/*==========================*/
69
btr_pcur_t* pcur_receive, /*!< in: pcur which will receive the
52
btr_pcur_t* pcur_receive, /* in: pcur which will receive the
71
btr_pcur_t* pcur_donate); /*!< in: pcur from which the info is
54
btr_pcur_t* pcur_donate); /* in: pcur from which the info is
73
/**************************************************************//**
56
/******************************************************************
74
57
Sets the old_rec_buf field to NULL. */
79
btr_pcur_t* pcur); /*!< in: persistent cursor */
80
/**************************************************************//**
62
btr_pcur_t* pcur); /* in: persistent cursor */
63
/******************************************************************
81
64
Initializes and opens a persistent cursor to an index tree. It should be
82
65
closed with btr_pcur_close. */
87
dict_index_t* index, /*!< in: index */
88
const dtuple_t* tuple, /*!< in: tuple on which search done */
89
ulint mode, /*!< in: PAGE_CUR_L, ...;
70
dict_index_t* index, /* in: index */
71
const dtuple_t* tuple, /* in: tuple on which search done */
72
ulint mode, /* in: PAGE_CUR_L, ...;
90
73
NOTE that if the search is made using a unique
91
74
prefix of a record, mode should be
92
75
PAGE_CUR_LE, not PAGE_CUR_GE, as the latter
93
76
may end up on the previous page from the
95
ulint latch_mode,/*!< in: BTR_SEARCH_LEAF, ... */
96
btr_pcur_t* cursor, /*!< in: memory buffer for persistent cursor */
97
const char* file, /*!< in: file name */
98
ulint line, /*!< in: line where called */
99
mtr_t* mtr); /*!< in: mtr */
100
#define btr_pcur_open(i,t,md,l,c,m) \
101
btr_pcur_open_func(i,t,md,l,c,__FILE__,__LINE__,m)
102
/**************************************************************//**
78
ulint latch_mode,/* in: BTR_SEARCH_LEAF, ... */
79
btr_pcur_t* cursor, /* in: memory buffer for persistent cursor */
80
mtr_t* mtr); /* in: mtr */
81
/******************************************************************
103
82
Opens an persistent cursor to an index tree without initializing the
107
btr_pcur_open_with_no_init_func(
108
/*============================*/
109
dict_index_t* index, /*!< in: index */
110
const dtuple_t* tuple, /*!< in: tuple on which search done */
111
ulint mode, /*!< in: PAGE_CUR_L, ...;
86
btr_pcur_open_with_no_init(
87
/*=======================*/
88
dict_index_t* index, /* in: index */
89
const dtuple_t* tuple, /* in: tuple on which search done */
90
ulint mode, /* in: PAGE_CUR_L, ...;
112
91
NOTE that if the search is made using a unique
113
92
prefix of a record, mode should be
114
93
PAGE_CUR_LE, not PAGE_CUR_GE, as the latter
115
94
may end up on the previous page of the
117
ulint latch_mode,/*!< in: BTR_SEARCH_LEAF, ...;
96
ulint latch_mode,/* in: BTR_SEARCH_LEAF, ...;
118
97
NOTE that if has_search_latch != 0 then
119
98
we maybe do not acquire a latch on the cursor
120
99
page, but assume that the caller uses his
121
100
btr search latch to protect the record! */
122
btr_pcur_t* cursor, /*!< in: memory buffer for persistent cursor */
123
ulint has_search_latch,/*!< in: latch mode the caller
101
btr_pcur_t* cursor, /* in: memory buffer for persistent cursor */
102
ulint has_search_latch,/* in: latch mode the caller
124
103
currently has on btr_search_latch:
125
104
RW_S_LATCH, or 0 */
126
const char* file, /*!< in: file name */
127
ulint line, /*!< in: line where called */
128
mtr_t* mtr); /*!< in: mtr */
129
#define btr_pcur_open_with_no_init(ix,t,md,l,cur,has,m) \
130
btr_pcur_open_with_no_init_func(ix,t,md,l,cur,has,__FILE__,__LINE__,m)
132
/*****************************************************************//**
105
mtr_t* mtr); /* in: mtr */
106
/*********************************************************************
133
107
Opens a persistent cursor at either end of an index. */
136
110
btr_pcur_open_at_index_side(
137
111
/*========================*/
138
ibool from_left, /*!< in: TRUE if open to the low end,
112
ibool from_left, /* in: TRUE if open to the low end,
139
113
FALSE if to the high end */
140
dict_index_t* index, /*!< in: index */
141
ulint latch_mode, /*!< in: latch mode */
142
btr_pcur_t* pcur, /*!< in: cursor */
143
ibool do_init, /*!< in: TRUE if should be initialized */
144
mtr_t* mtr); /*!< in: mtr */
145
/**************************************************************//**
146
Gets the up_match value for a pcur after a search.
147
@return number of matched fields at the cursor or to the right if
148
search mode was PAGE_CUR_GE, otherwise undefined */
114
dict_index_t* index, /* in: index */
115
ulint latch_mode, /* in: latch mode */
116
btr_pcur_t* pcur, /* in: cursor */
117
ibool do_init, /* in: TRUE if should be initialized */
118
mtr_t* mtr); /* in: mtr */
119
/******************************************************************
120
Gets the up_match value for a pcur after a search. */
151
123
btr_pcur_get_up_match(
152
124
/*==================*/
153
btr_pcur_t* cursor); /*!< in: memory buffer for persistent cursor */
154
/**************************************************************//**
155
Gets the low_match value for a pcur after a search.
156
@return number of matched fields at the cursor or to the right if
157
search mode was PAGE_CUR_LE, otherwise undefined */
125
/* out: number of matched fields at the cursor
126
or to the right if search mode was PAGE_CUR_GE,
127
otherwise undefined */
128
btr_pcur_t* cursor); /* in: memory buffer for persistent cursor */
129
/******************************************************************
130
Gets the low_match value for a pcur after a search. */
160
133
btr_pcur_get_low_match(
161
134
/*===================*/
162
btr_pcur_t* cursor); /*!< in: memory buffer for persistent cursor */
163
/**************************************************************//**
135
/* out: number of matched fields at the cursor
136
or to the right if search mode was PAGE_CUR_LE,
137
otherwise undefined */
138
btr_pcur_t* cursor); /* in: memory buffer for persistent cursor */
139
/******************************************************************
164
140
If mode is PAGE_CUR_G or PAGE_CUR_GE, opens a persistent cursor on the first
165
141
user record satisfying the search condition, in the case PAGE_CUR_L or
166
142
PAGE_CUR_LE, on the last user record. If no such user record exists, then
169
145
BTR_MODIFY_LEAF. */
172
btr_pcur_open_on_user_rec_func(
173
/*===========================*/
174
dict_index_t* index, /*!< in: index */
175
const dtuple_t* tuple, /*!< in: tuple on which search done */
176
ulint mode, /*!< in: PAGE_CUR_L, ... */
177
ulint latch_mode, /*!< in: BTR_SEARCH_LEAF or
148
btr_pcur_open_on_user_rec(
149
/*======================*/
150
dict_index_t* index, /* in: index */
151
const dtuple_t* tuple, /* in: tuple on which search done */
152
ulint mode, /* in: PAGE_CUR_L, ... */
153
ulint latch_mode, /* in: BTR_SEARCH_LEAF or
178
154
BTR_MODIFY_LEAF */
179
btr_pcur_t* cursor, /*!< in: memory buffer for persistent
155
btr_pcur_t* cursor, /* in: memory buffer for persistent
181
const char* file, /*!< in: file name */
182
ulint line, /*!< in: line where called */
183
mtr_t* mtr); /*!< in: mtr */
184
#define btr_pcur_open_on_user_rec(i,t,md,l,c,m) \
185
btr_pcur_open_on_user_rec_func(i,t,md,l,c,__FILE__,__LINE__,m)
186
/**********************************************************************//**
157
mtr_t* mtr); /* in: mtr */
158
/**************************************************************************
187
159
Positions a cursor at a randomly chosen position within a B-tree. */
190
btr_pcur_open_at_rnd_pos_func(
191
/*==========================*/
192
dict_index_t* index, /*!< in: index */
193
ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ... */
194
btr_pcur_t* cursor, /*!< in/out: B-tree pcur */
195
const char* file, /*!< in: file name */
196
ulint line, /*!< in: line where called */
197
mtr_t* mtr); /*!< in: mtr */
198
#define btr_pcur_open_at_rnd_pos(i,l,c,m) \
199
btr_pcur_open_at_rnd_pos_func(i,l,c,__FILE__,__LINE__,m)
200
/**************************************************************//**
162
btr_pcur_open_at_rnd_pos(
163
/*=====================*/
164
dict_index_t* index, /* in: index */
165
ulint latch_mode, /* in: BTR_SEARCH_LEAF, ... */
166
btr_pcur_t* cursor, /* in/out: B-tree pcur */
167
mtr_t* mtr); /* in: mtr */
168
/******************************************************************
201
169
Frees the possible old_rec_buf buffer of a persistent cursor and sets the
202
170
latch mode of the persistent cursor to BTR_NO_LATCHES. */
207
btr_pcur_t* cursor); /*!< in: persistent cursor */
208
/**************************************************************//**
175
btr_pcur_t* cursor); /* in: persistent cursor */
176
/******************************************************************
209
177
The position of the cursor is stored by taking an initial segment of the
210
178
record the cursor is positioned on, before, or after, and copying it to the
211
179
cursor data structure, or just setting a flag if the cursor id before the
229
197
(3) cursor was positioned on the page supremum: restores to the first record
230
198
GREATER than the user record which was the predecessor of the supremum.
231
199
(4) cursor was positioned before the first or after the last in an empty tree:
232
restores to before first or after the last in the tree.
233
@return TRUE if the cursor position was stored when it was on a user
234
record and it can be restored on a user record whose ordering fields
235
are identical to the ones of the original user record */
200
restores to before first or after the last in the tree. */
238
btr_pcur_restore_position_func(
239
/*===========================*/
240
ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ... */
241
btr_pcur_t* cursor, /*!< in: detached persistent cursor */
242
const char* file, /*!< in: file name */
243
ulint line, /*!< in: line where called */
244
mtr_t* mtr); /*!< in: mtr */
245
#define btr_pcur_restore_position(l,cur,mtr) \
246
btr_pcur_restore_position_func(l,cur,__FILE__,__LINE__,mtr)
247
/**************************************************************//**
203
btr_pcur_restore_position(
204
/*======================*/
205
/* out: TRUE if the cursor position
206
was stored when it was on a user record
207
and it can be restored on a user record
208
whose ordering fields are identical to
209
the ones of the original user record */
210
ulint latch_mode, /* in: BTR_SEARCH_LEAF, ... */
211
btr_pcur_t* cursor, /* in: detached persistent cursor */
212
mtr_t* mtr); /* in: mtr */
213
/******************************************************************
248
214
If the latch mode of the cursor is BTR_LEAF_SEARCH or BTR_LEAF_MODIFY,
249
215
releases the page latch and bufferfix reserved by the cursor.
250
216
NOTE! In the case of BTR_LEAF_MODIFY, there should not exist changes
255
221
btr_pcur_release_leaf(
256
222
/*==================*/
257
btr_pcur_t* cursor, /*!< in: persistent cursor */
258
mtr_t* mtr); /*!< in: mtr */
259
/*********************************************************//**
260
Gets the rel_pos field for a cursor whose position has been stored.
261
@return BTR_PCUR_ON, ... */
223
btr_pcur_t* cursor, /* in: persistent cursor */
224
mtr_t* mtr); /* in: mtr */
225
/*************************************************************
226
Gets the rel_pos field for a cursor whose position has been stored. */
264
229
btr_pcur_get_rel_pos(
265
230
/*=================*/
266
const btr_pcur_t* cursor);/*!< in: persistent cursor */
267
/*********************************************************//**
231
/* out: BTR_PCUR_ON, ... */
232
const btr_pcur_t* cursor);/* in: persistent cursor */
233
/*************************************************************
268
234
Sets the mtr field for a pcur. */
271
237
btr_pcur_set_mtr(
272
238
/*=============*/
273
btr_pcur_t* cursor, /*!< in: persistent cursor */
274
mtr_t* mtr); /*!< in, own: mtr */
275
/*********************************************************//**
276
Gets the mtr field for a pcur.
239
btr_pcur_t* cursor, /* in: persistent cursor */
240
mtr_t* mtr); /* in, own: mtr */
241
/*************************************************************
242
Gets the mtr field for a pcur. */
280
245
btr_pcur_get_mtr(
281
246
/*=============*/
282
btr_pcur_t* cursor); /*!< in: persistent cursor */
283
/**************************************************************//**
284
Commits the mtr and sets the pcur latch mode to BTR_NO_LATCHES,
248
btr_pcur_t* cursor); /* in: persistent cursor */
249
/******************************************************************
250
Commits the pcur mtr and sets the pcur latch mode to BTR_NO_LATCHES,
285
251
that is, the cursor becomes detached. If there have been modifications
286
252
to the page where pcur is positioned, this can be used instead of
287
253
btr_pcur_release_leaf. Function btr_pcur_store_position should be used
288
254
before calling this, if restoration of cursor is wanted later. */
259
btr_pcur_t* pcur); /* in: persistent cursor */
260
/******************************************************************
261
Differs from btr_pcur_commit in that we can specify the mtr to commit. */
291
264
btr_pcur_commit_specify_mtr(
292
265
/*========================*/
293
btr_pcur_t* pcur, /*!< in: persistent cursor */
294
mtr_t* mtr); /*!< in: mtr to commit */
295
/**************************************************************//**
296
Tests if a cursor is detached: that is the latch mode is BTR_NO_LATCHES.
297
@return TRUE if detached */
266
btr_pcur_t* pcur, /* in: persistent cursor */
267
mtr_t* mtr); /* in: mtr to commit */
268
/******************************************************************
269
Tests if a cursor is detached: that is the latch mode is BTR_NO_LATCHES. */
300
272
btr_pcur_is_detached(
301
273
/*=================*/
302
btr_pcur_t* pcur); /*!< in: persistent cursor */
303
/*********************************************************//**
274
/* out: TRUE if detached */
275
btr_pcur_t* pcur); /* in: persistent cursor */
276
/*************************************************************
304
277
Moves the persistent cursor to the next record in the tree. If no records are
305
left, the cursor stays 'after last in tree'.
306
@return TRUE if the cursor was not after last in tree */
278
left, the cursor stays 'after last in tree'. */
309
281
btr_pcur_move_to_next(
310
282
/*==================*/
311
btr_pcur_t* cursor, /*!< in: persistent cursor; NOTE that the
283
/* out: TRUE if the cursor was not after last
285
btr_pcur_t* cursor, /* in: persistent cursor; NOTE that the
312
286
function may release the page latch */
313
mtr_t* mtr); /*!< in: mtr */
314
/*********************************************************//**
287
mtr_t* mtr); /* in: mtr */
288
/*************************************************************
315
289
Moves the persistent cursor to the previous record in the tree. If no records
316
are left, the cursor stays 'before first in tree'.
317
@return TRUE if the cursor was not before first in tree */
290
are left, the cursor stays 'before first in tree'. */
320
293
btr_pcur_move_to_prev(
321
294
/*==================*/
322
btr_pcur_t* cursor, /*!< in: persistent cursor; NOTE that the
295
/* out: TRUE if the cursor was not before first
297
btr_pcur_t* cursor, /* in: persistent cursor; NOTE that the
323
298
function may release the page latch */
324
mtr_t* mtr); /*!< in: mtr */
325
/*********************************************************//**
299
mtr_t* mtr); /* in: mtr */
300
/*************************************************************
326
301
Moves the persistent cursor to the last record on the same page. */
329
304
btr_pcur_move_to_last_on_page(
330
305
/*==========================*/
331
btr_pcur_t* cursor, /*!< in: persistent cursor */
332
mtr_t* mtr); /*!< in: mtr */
333
/*********************************************************//**
306
btr_pcur_t* cursor, /* in: persistent cursor */
307
mtr_t* mtr); /* in: mtr */
308
/*************************************************************
334
309
Moves the persistent cursor to the next user record in the tree. If no user
335
records are left, the cursor ends up 'after last in tree'.
336
@return TRUE if the cursor moved forward, ending on a user record */
310
records are left, the cursor ends up 'after last in tree'. */
339
313
btr_pcur_move_to_next_user_rec(
340
314
/*===========================*/
341
btr_pcur_t* cursor, /*!< in: persistent cursor; NOTE that the
315
/* out: TRUE if the cursor moved forward,
316
ending on a user record */
317
btr_pcur_t* cursor, /* in: persistent cursor; NOTE that the
342
318
function may release the page latch */
343
mtr_t* mtr); /*!< in: mtr */
344
/*********************************************************//**
319
mtr_t* mtr); /* in: mtr */
320
/*************************************************************
345
321
Moves the persistent cursor to the first record on the next page.
346
322
Releases the latch on the current page, and bufferunfixes it.
347
323
Note that there must not be modifications on the current page,
368
344
btr_pcur_move_backward_from_page(
369
345
/*=============================*/
370
btr_pcur_t* cursor, /*!< in: persistent cursor, must be on the
346
btr_pcur_t* cursor, /* in: persistent cursor, must be on the
371
347
first record of the current page */
372
mtr_t* mtr); /*!< in: mtr */
348
mtr_t* mtr); /* in: mtr */
373
349
#ifdef UNIV_DEBUG
374
/*********************************************************//**
375
Returns the btr cursor component of a persistent cursor.
376
@return pointer to btr cursor component */
350
/*************************************************************
351
Returns the btr cursor component of a persistent cursor. */
379
354
btr_pcur_get_btr_cur(
380
355
/*=================*/
381
const btr_pcur_t* cursor); /*!< in: persistent cursor */
382
/*********************************************************//**
383
Returns the page cursor component of a persistent cursor.
384
@return pointer to page cursor component */
357
btr cursor component */
358
const btr_pcur_t* cursor); /* in: persistent cursor */
359
/*************************************************************
360
Returns the page cursor component of a persistent cursor. */
387
363
btr_pcur_get_page_cur(
388
364
/*==================*/
389
const btr_pcur_t* cursor); /*!< in: persistent cursor */
366
page cursor component */
367
const btr_pcur_t* cursor); /* in: persistent cursor */
390
368
#else /* UNIV_DEBUG */
391
369
# define btr_pcur_get_btr_cur(cursor) (&(cursor)->btr_cur)
392
370
# define btr_pcur_get_page_cur(cursor) (&(cursor)->btr_cur.page_cur)
393
371
#endif /* UNIV_DEBUG */
394
/*********************************************************//**
395
Returns the page of a persistent cursor.
396
@return pointer to the page */
372
/*************************************************************
373
Returns the page of a persistent cursor. */
399
376
btr_pcur_get_page(
400
377
/*==============*/
401
btr_pcur_t* cursor);/*!< in: persistent cursor */
402
/*********************************************************//**
403
Returns the buffer block of a persistent cursor.
404
@return pointer to the block */
378
/* out: pointer to the page */
379
btr_pcur_t* cursor);/* in: persistent cursor */
380
/*************************************************************
381
Returns the buffer block of a persistent cursor. */
407
384
btr_pcur_get_block(
408
385
/*===============*/
409
btr_pcur_t* cursor);/*!< in: persistent cursor */
410
/*********************************************************//**
411
Returns the record of a persistent cursor.
412
@return pointer to the record */
386
/* out: pointer to the block */
387
btr_pcur_t* cursor);/* in: persistent cursor */
388
/*************************************************************
389
Returns the record of a persistent cursor. */
415
392
btr_pcur_get_rec(
416
393
/*=============*/
417
btr_pcur_t* cursor);/*!< in: persistent cursor */
418
/*********************************************************//**
394
/* out: pointer to the record */
395
btr_pcur_t* cursor);/* in: persistent cursor */
396
/*************************************************************
419
397
Checks if the persistent cursor is on a user record. */
422
400
btr_pcur_is_on_user_rec(
423
401
/*====================*/
424
const btr_pcur_t* cursor);/*!< in: persistent cursor */
425
/*********************************************************//**
402
const btr_pcur_t* cursor);/* in: persistent cursor */
403
/*************************************************************
426
404
Checks if the persistent cursor is after the last user record on
430
408
btr_pcur_is_after_last_on_page(
431
409
/*===========================*/
432
const btr_pcur_t* cursor);/*!< in: persistent cursor */
433
/*********************************************************//**
410
const btr_pcur_t* cursor);/* in: persistent cursor */
411
/*************************************************************
434
412
Checks if the persistent cursor is before the first user record on
438
416
btr_pcur_is_before_first_on_page(
439
417
/*=============================*/
440
const btr_pcur_t* cursor);/*!< in: persistent cursor */
441
/*********************************************************//**
418
const btr_pcur_t* cursor);/* in: persistent cursor */
419
/*************************************************************
442
420
Checks if the persistent cursor is before the first user record in
443
421
the index tree. */
446
424
btr_pcur_is_before_first_in_tree(
447
425
/*=============================*/
448
btr_pcur_t* cursor, /*!< in: persistent cursor */
449
mtr_t* mtr); /*!< in: mtr */
450
/*********************************************************//**
426
btr_pcur_t* cursor, /* in: persistent cursor */
427
mtr_t* mtr); /* in: mtr */
428
/*************************************************************
451
429
Checks if the persistent cursor is after the last user record in
452
430
the index tree. */
455
433
btr_pcur_is_after_last_in_tree(
456
434
/*===========================*/
457
btr_pcur_t* cursor, /*!< in: persistent cursor */
458
mtr_t* mtr); /*!< in: mtr */
459
/*********************************************************//**
435
btr_pcur_t* cursor, /* in: persistent cursor */
436
mtr_t* mtr); /* in: mtr */
437
/*************************************************************
460
438
Moves the persistent cursor to the next record on the same page. */
463
441
btr_pcur_move_to_next_on_page(
464
442
/*==========================*/
465
btr_pcur_t* cursor);/*!< in/out: persistent cursor */
466
/*********************************************************//**
443
btr_pcur_t* cursor);/* in/out: persistent cursor */
444
/*************************************************************
467
445
Moves the persistent cursor to the previous record on the same page. */
470
448
btr_pcur_move_to_prev_on_page(
471
449
/*==========================*/
472
btr_pcur_t* cursor);/*!< in/out: persistent cursor */
450
btr_pcur_t* cursor);/* in/out: persistent cursor */
475
453
/* The persistent B-tree cursor structure. This is used mainly for SQL
476
454
selects, updates, and deletes. */
478
456
struct btr_pcur_struct{
479
btr_cur_t btr_cur; /*!< a B-tree cursor */
480
ulint latch_mode; /*!< see TODO note below!
457
btr_cur_t btr_cur; /* a B-tree cursor */
458
ulint latch_mode; /* see TODO note below!
481
459
BTR_SEARCH_LEAF, BTR_MODIFY_LEAF,
482
460
BTR_MODIFY_TREE, or BTR_NO_LATCHES,
483
461
depending on the latching state of
488
466
detached; it can be restored to
489
467
attached if the old position was
490
468
stored in old_rec */
491
ulint old_stored; /*!< BTR_PCUR_OLD_STORED
469
ulint old_stored; /* BTR_PCUR_OLD_STORED
492
470
or BTR_PCUR_OLD_NOT_STORED */
493
rec_t* old_rec; /*!< if cursor position is stored,
471
rec_t* old_rec; /* if cursor position is stored,
494
472
contains an initial segment of the
495
473
latest record cursor was positioned
496
474
either on, before, or after */
497
ulint old_n_fields; /*!< number of fields in old_rec */
498
ulint rel_pos; /*!< BTR_PCUR_ON, BTR_PCUR_BEFORE, or
475
ulint old_n_fields; /* number of fields in old_rec */
476
ulint rel_pos; /* BTR_PCUR_ON, BTR_PCUR_BEFORE, or
499
477
BTR_PCUR_AFTER, depending on whether
500
478
cursor was on, before, or after the
501
479
old_rec record */
502
480
buf_block_t* block_when_stored;/* buffer block when the position was
504
ib_uint64_t modify_clock; /*!< the modify clock value of the
482
ib_uint64_t modify_clock; /* the modify clock value of the
505
483
buffer block when the cursor position
507
ulint pos_state; /*!< see TODO note below!
485
ulint pos_state; /* see TODO note below!
508
486
BTR_PCUR_IS_POSITIONED,
509
487
BTR_PCUR_WAS_POSITIONED,
510
488
BTR_PCUR_NOT_POSITIONED */
511
ulint search_mode; /*!< PAGE_CUR_G, ... */
512
trx_t* trx_if_known; /*!< the transaction, if we know it;
489
ulint search_mode; /* PAGE_CUR_G, ... */
490
trx_t* trx_if_known; /* the transaction, if we know it;
513
491
otherwise this field is not defined;
514
492
can ONLY BE USED in error prints in
515
493
fatal assertion failures! */