summaryrefslogtreecommitdiff
path: root/storage/innobase/ibuf
diff options
context:
space:
mode:
authorSatya Bodapati <satya.bodapati@oracle.com>2013-09-11 16:57:02 +0530
committerSatya Bodapati <satya.bodapati@oracle.com>2013-09-11 16:57:02 +0530
commit59402fe0a76bae115c622cc241995180c4bdf4c9 (patch)
treedc30c5c7b5e6032fde388ffc10af96ecd0026076 /storage/innobase/ibuf
parent42501173084f8a085a5cab38cb7d19ada8a96739 (diff)
downloadmariadb-git-59402fe0a76bae115c622cc241995180c4bdf4c9.tar.gz
Bug#16752251 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE OPERATION IF
IT IS DONE IN-PLACE With change buffer enabled, InnoDB doesn't write a transaction log record when it merges a record from the insert buffer to an secondary index page if the insertion is performed as an update-in-place. Fixed by logging the 'update-in-place' operation on secondary index pages. Approved by Marko. rb#2429
Diffstat (limited to 'storage/innobase/ibuf')
-rw-r--r--storage/innobase/ibuf/ibuf0ibuf.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/storage/innobase/ibuf/ibuf0ibuf.c b/storage/innobase/ibuf/ibuf0ibuf.c
index 2ba3d785194..ae6c5f6636f 100644
--- a/storage/innobase/ibuf/ibuf0ibuf.c
+++ b/storage/innobase/ibuf/ibuf0ibuf.c
@@ -3024,6 +3024,24 @@ updated_in_place:
/* This is the easy case. Do something similar
to btr_cur_update_in_place(). */
row_upd_rec_in_place(rec, offsets, update);
+
+ /* Log the update in place operation. During recovery
+ MLOG_COMP_REC_UPDATE_IN_PLACE/MLOG_REC_UPDATE_IN_PLACE
+ expects trx_id, roll_ptr for secondary indexes. So we
+ just write dummy trx_id(0), roll_ptr(0) */
+ btr_cur_update_in_place_log(BTR_KEEP_SYS_FLAG, rec,
+ index, update,
+ NULL,
+ ut_dulint_zero, mtr);
+ DBUG_EXECUTE_IF(
+ "crash_after_log_ibuf_upd_inplace",
+ log_buffer_flush_to_disk();
+ fprintf(stderr,
+ "InnoDB: Wrote log record for ibuf "
+ "update in place operation\n");
+ DBUG_SUICIDE();
+ );
+
goto updated_in_place;
}