38 #ifndef UNIV_HOTBACKUP
61 static __attribute__((nonnull))
63 mtr_memo_slot_release_func(
70 void*
object = slot->object;
79 case MTR_MEMO_PAGE_S_FIX:
80 case MTR_MEMO_PAGE_X_FIX:
81 case MTR_MEMO_BUF_FIX:
92 ut_ad(slot->type == MTR_MEMO_MODIFY);
93 ut_ad(mtr_memo_contains(mtr,
object, MTR_MEMO_PAGE_X_FIX));
99 # define mtr_memo_slot_release(mtr, slot) mtr_memo_slot_release_func(mtr, slot)
101 # define mtr_memo_slot_release(mtr, slot) mtr_memo_slot_release_func(slot)
108 static __attribute__((nonnull))
114 ut_ad(mtr->magic_n == MTR_MAGIC_N);
115 ut_ad(mtr->state == MTR_COMMITTING);
131 while (slot-- != start) {
132 if (slot->
object != NULL) {
133 mtr_memo_slot_release(mtr, slot);
143 mtr_memo_slot_note_modification(
150 ut_ad(mtr->magic_n == MTR_MAGIC_N);
152 if (slot->
object != NULL && slot->
type == MTR_MEMO_PAGE_X_FIX) {
169 mtr_memo_note_modifications(
177 ut_ad(mtr->magic_n == MTR_MAGIC_N);
178 ut_ad(mtr->state == MTR_COMMITTING);
192 mtr_memo_slot_note_modification(mtr, slot);
200 mtr_add_dirtied_pages_to_flush_list(
221 mtr_memo_note_modifications(mtr);
233 mtr_log_reserve_and_write(
247 if (mtr->n_log_recs > 1) {
250 *first_data = (byte)((ulint)*first_data
254 if (mlog->
heap == NULL) {
257 len = mtr->log_mode != MTR_LOG_NO_REDO
261 first_data, len, &mtr->start_lsn);
267 mtr_add_dirtied_pages_to_flush_list(mtr);
278 if (mtr->log_mode == MTR_LOG_ALL) {
290 ut_ad(mtr->log_mode == MTR_LOG_NONE
291 || mtr->log_mode == MTR_LOG_NO_REDO);
297 mtr_add_dirtied_pages_to_flush_list(mtr);
310 ut_ad(mtr->magic_n == MTR_MAGIC_N);
311 ut_ad(mtr->state == MTR_ACTIVE);
313 ut_d(mtr->state = MTR_COMMITTING);
315 #ifndef UNIV_HOTBACKUP
317 ut_ad(!recv_no_log_write);
321 mtr_log_reserve_and_write(mtr);
324 mtr_memo_pop_all(mtr);
329 #ifdef UNIV_DEBUG_VALGRIND
333 lsn_t start_lsn = mtr->start_lsn;
334 lsn_t end_lsn = mtr->end_lsn;
335 UNIV_MEM_INVALID(mtr,
sizeof *mtr);
336 mtr->start_lsn = start_lsn;
337 mtr->end_lsn = end_lsn;
340 ut_d(mtr->state = MTR_COMMITTED);
343 #ifndef UNIV_HOTBACKUP
355 ut_ad(mtr->magic_n == MTR_MAGIC_N);
356 ut_ad(mtr->state == MTR_ACTIVE);
374 while (slot-- != start) {
375 if (
object == slot->
object && type == slot->
type) {
376 mtr_memo_slot_release(mtr, slot);
395 mtr_t* mtr __attribute__((unused)))
398 ut_ad(mtr->state == MTR_ACTIVE);
399 ut_ad(mtr_memo_contains_page(mtr, ptr, MTR_MEMO_PAGE_S_FIX)
400 || mtr_memo_contains_page(mtr, ptr, MTR_MEMO_PAGE_X_FIX));
406 # ifndef UNIV_HOTBACKUP
412 mtr_memo_contains_page(
430 "Mini-transaction handle: memo size %lu bytes"
431 " log size %lu bytes\n",