|
|
|
@ -1631,7 +1631,7 @@ btr_cur_upd_lock_and_undo( |
|
|
|
|
|
|
|
/***********************************************************//** |
|
|
|
Writes a redo log record of updating a record in-place. */ |
|
|
|
UNIV_INLINE |
|
|
|
UNIV_INTERN |
|
|
|
void |
|
|
|
btr_cur_update_in_place_log( |
|
|
|
/*========================*/ |
|
|
|
@ -1659,18 +1659,30 @@ btr_cur_update_in_place_log( |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
/* The code below assumes index is a clustered index: change index to |
|
|
|
the clustered index if we are updating a secondary index record (or we |
|
|
|
could as well skip writing the sys col values to the log in this case |
|
|
|
because they are not needed for a secondary index record update) */ |
|
|
|
|
|
|
|
index = dict_table_get_first_index(index->table); |
|
|
|
/* For secondary indexes, we could skip writing the dummy system fields |
|
|
|
to the redo log but we have to change redo log parsing of |
|
|
|
MLOG_REC_UPDATE_IN_PLACE/MLOG_COMP_REC_UPDATE_IN_PLACE or we have to add |
|
|
|
new redo log record. For now, just write dummy sys fields to the redo |
|
|
|
log if we are updating a secondary index record. |
|
|
|
*/ |
|
|
|
|
|
|
|
mach_write_to_1(log_ptr, flags); |
|
|
|
log_ptr++; |
|
|
|
|
|
|
|
log_ptr = row_upd_write_sys_vals_to_log(index, trx, roll_ptr, log_ptr, |
|
|
|
mtr); |
|
|
|
if (dict_index_is_clust(index)) { |
|
|
|
log_ptr = row_upd_write_sys_vals_to_log( |
|
|
|
index, trx, roll_ptr, log_ptr, mtr); |
|
|
|
} else { |
|
|
|
/* Dummy system fields for a secondary index */ |
|
|
|
/* TRX_ID Position */ |
|
|
|
log_ptr += mach_write_compressed(log_ptr, 0); |
|
|
|
/* ROLL_PTR */ |
|
|
|
trx_write_roll_ptr(log_ptr, 0); |
|
|
|
log_ptr += DATA_ROLL_PTR_LEN; |
|
|
|
/* TRX_ID */ |
|
|
|
log_ptr += mach_ull_write_compressed(log_ptr, 0); |
|
|
|
} |
|
|
|
|
|
|
|
mach_write_to_2(log_ptr, page_offset(rec)); |
|
|
|
log_ptr += 2; |
|
|
|
|
|
|
|
|