Long field manager log records
Long field manager log records
are written only if a database is recoverable. That is, if the database
is configured with either the logarchmeth1 or logarchmeth2 parameter
set to a value other than OFF. The log records are
written whenever long field data is inserted, deleted, or updated.
To conserve log space, long field data inserted into tables is not logged if the database is configured for circular logging. In addition, when a long field value is updated, the before image is shadowed and not logged.
All long field manager log records begin with a header.
All long field manager log record offsets are from the end of the log manager log record header.
When a table was altered to capture LONG VARCHAR OR LONG VARGRAPHIC
columns by specifying INCLUDE LONGVAR COLUMNS on the ALTER TABLE statement:
- The long field manager writes the appropriate long field log record.
- When long field data is updated, the update is treated as a delete of the old long field value, followed by an insert of the new value. To determine whether a delete or add long field record is associated with an update operation on the table the original operation value would be logged to the long field manager log record.
- When tables with long field columns are updated, but the long field columns themselves are not updated, a non-update long field record is written.
- The delete long field record and the non-update long field record are information only log records.
| Description | Type | Offset (Bytes) |
|---|---|---|
| Originator code (component identifier = 3) | unsigned char | 0 (1) |
| Operation type (See Table 2.) | unsigned char | 1 (1) |
| Table space identifier | unsigned short | 2 (2) |
| Object identifier | unsigned short | 4 (2) |
| Parent table space identifier1 | unsigned short | 6 (2) |
| Parent object identifier2 | unsigned short | 8 (2) |
| Total Length: 10 bytes | ||
Note:
- Table space ID of the data object
- Object ID of the data object
| Value | Definition |
|---|---|
| 113 | Add long field record |
| 114 | Delete long field record |
| 115 | Non-update long field record |
Add/delete/non-update long field record log records
These log records are written whenever long field data is inserted, deleted, or updated. The length of the data is rounded up to the next 512-byte boundary.
| Description | Type | Offset (Bytes) |
|---|---|---|
| Log header | LongFieldLogRecordHeader | 0 (10) |
| Internal | Internal | 10 (1) |
| Original operation type1 | char | 11 (1) |
| Column identifier2 | unsigned short | 12 (2) |
| Long field length3 | unsigned short | 14 (2) |
| File offset4 | sqluint32 | 16 (4) |
| Long field data | char[ ] | 20 (variable) |
Note:
- Original operation type
1 Insert 2 Delete 4 Update - The column number that the log record is applied to. Column number starts from 0.
- Long field data length in 512-byte sectors (actual data length
is recorded as the first 4 bytes of long field descriptor (LF descriptor),
which is logged in the following insert/delete/update log record as
part of formatted user data record). The value of this field is always
positive.
The long field manager never writes log records for zero length long field data that is being inserted, deleted, or updated.
- 512-byte sector offset into long field object where data is to be located.