@@ -2811,7 +2811,7 @@ btr_cur_ins_lock_and_undo(
2811
2811
}
2812
2812
2813
2813
if (flags & BTR_NO_UNDO_LOG_FLAG) {
2814
- roll_ptr = 0 ;
2814
+ roll_ptr = roll_ptr_t ( 1 ) << ROLL_PTR_INSERT_FLAG_POS ;
2815
2815
} else {
2816
2816
err = trx_undo_report_row_operation (thr, index, entry,
2817
2817
NULL , 0 , NULL , NULL ,
@@ -3016,7 +3016,7 @@ btr_cur_optimistic_insert(
3016
3016
3017
3017
DBUG_LOG (" ib_cur" ,
3018
3018
" insert " << index->name << " (" << index->id << " ) by "
3019
- << ib::hex (thr ? trx_get_id_for_print ( thr_get_trx ( thr)) : 0 )
3019
+ << ib::hex (thr ? thr-> graph -> trx -> id : 0 )
3020
3020
<< ' ' << rec_printer (entry).str ());
3021
3021
DBUG_EXECUTE_IF (" do_page_reorganize" ,
3022
3022
btr_page_reorganize (page_cursor, index, mtr););
@@ -3033,6 +3033,29 @@ btr_cur_optimistic_insert(
3033
3033
goto fail_err;
3034
3034
}
3035
3035
3036
+ #ifdef UNIV_DEBUG
3037
+ if (!(flags & BTR_CREATE_FLAG)
3038
+ && index->is_primary () && page_is_leaf (page)) {
3039
+ const dfield_t * trx_id = dtuple_get_nth_field (
3040
+ entry, dict_col_get_clust_pos (
3041
+ dict_table_get_sys_col (index->table ,
3042
+ DATA_TRX_ID),
3043
+ index));
3044
+
3045
+ ut_ad (trx_id->len == DATA_TRX_ID_LEN);
3046
+ ut_ad (trx_id[1 ].len == DATA_ROLL_PTR_LEN);
3047
+ ut_ad (*static_cast <const byte*>
3048
+ (trx_id[1 ].data ) & 0x80 );
3049
+ if (!(flags & BTR_NO_UNDO_LOG_FLAG)) {
3050
+ ut_ad (thr->graph ->trx ->id );
3051
+ ut_ad (thr->graph ->trx ->id
3052
+ == trx_read_trx_id (
3053
+ static_cast <const byte*>(
3054
+ trx_id->data )));
3055
+ }
3056
+ }
3057
+ #endif
3058
+
3036
3059
*rec = page_cur_tuple_insert (
3037
3060
page_cursor, entry, index, offsets, heap,
3038
3061
n_ext, mtr);
0 commit comments