| Class | Innodb::UndoRecord |
| In: |
lib/innodb/undo_record.rb
|
| Parent: | Object |
A single undo log record.
| TYPE | = | { 11 => :insert, 12 => :update_existing, 13 => :update_deleted, 14 => :delete, } | Possible undo record types. | |
| TYPE_MASK | = | 0x0f | ||
| COMPILATION_INFO_MASK | = | 0x70 | ||
| COMPILATION_INFO_SHIFT | = | 4 | ||
| COMPILATION_INFO_NO_ORDER_CHANGE_BV | = | 1 | ||
| COMPILATION_INFO_NO_SIZE_CHANGE_BV | = | 2 | ||
| EXTERN_FLAG | = | 0x80 |
| index_page | [RW] | |
| position | [R] | |
| undo_log | [RW] | |
| undo_page | [R] |
The header really starts 2 bytes before the undo record position, as the pointer to the previous record is written there.
Find the previous row version by following the roll_ptr from one undo record to the next (backwards through the record version history). Since we are operating without the benefit of knowing about active transactions and without protection from purge, check that everything looks sane before returning it.