More detail...
RecordVersion::thaw() returns a record with a null data pointer.
It first tries to thaw from the Serial Log, but the transaction is
commited, so it tries a record fetch. In each case, Transaction::state
== Committed, writePending == false, dependencies > 0.
Section::fetchRecord() fails because there is no data page assigned to
the record:
bool Section::fetchRecord(int32 recordNumber, Stream *stream, TransId
transId)
[...]
RecordIndex *index = locatorPage->elements + slot;
// If there isn't a page number, there isn't a record
if (index->page == 0)
{
bdb->release(REL_HISTORY);
return false;
}
This happens reliably with the SystemQA chill/thaw stress test, so far
only during an index scan:
RecordVersion::thaw()
Table::fetchForUpdate(Transaction * transaction=0x040a3e70, Record *
source=0x07d14b60, bool usingIndex=false) Line 3552
StorageDatabase::nextRow(StorageTable * storageTable=0x04869398, int
recordNumber=135, bool lockForUpdate=true) Line 288
StorageTable::next(int recordNumber=135, bool lockForUpdate=true) Line 158
StorageInterface::rnd_next(unsigned char * buf=0x06e3e9f0) Line 613 +
0x31 bytes C++
rr_sequential(READ_RECORD * info=0x0777e400) Line 390 + 0x1f bytes C++
mysql_update()
mysql_execute_command(THD * thd=0x06db6180)
mysql_parse()
...
If Ann's theory is correct, then a failed thaw may legitimately occur
but should be handled correctly.
Ann W. Harrison wrote:
> Here's the timeline ... all transactions on separate connections and
> concurrent except as noted.
>
> Assume table t1 (f1 integer) with an index on f1.
>
>
> T1: insert into table1 values 3;
>
> T1: commit;
>
> T2: start;
>
> T3: start;
>
> T3: update t1 set f1 = 5 where f1 = 3;
>
> (at this point the index on f1 has entries for values 3 and 5, both
> with record 1. There's a record version object with the new and
> old versions in the record cache. The old index entry has been
> processed, and there's a new index entry in T3's deferred index)
>
> System chills T3 changes - new version of record 1 is chilled, old
> version is left in memory as back version.
>
> T3: commit;
>
> T2: commit;
>
> T4: select * from table1 where f1 > 1 and f1 < 4; (index bitmap
> built, with hit for 3);
>
> System removes obsolete version of record 1 (f1 = 3), from cache
> and disk, and index. Index lookup find a hit for 3 on record 1.
>
> T3 becomes write complete, T4 has a dependency on T3
>
> Thaw fails to find record with that value
> Fetch fails to find record with that value
>