longlongago7777的专栏

class table1

{

char<8>f1;

char<80>f2;

uint4f3;

uint4f4;

doublef5;

uint4f6;

uniquetree<f1,f2>Idx1;

tree<f6>Idx2;

};

Steps:

find the records;

did not find the record instep 1.

The record should be there, what happened when the putmethod is used, the index is changed after _put method?

If a class has one or more indexes, thenthe field(s) on which the index is defined

will have an index component (hash tableentry or tree node) in addition to the

actual field value. The index component isnot updated when the field’s _put()

function is called, but rather when theREAD_WRITE transaction containing this

update is committed. Or, alternatively, a_checkpoint() function can be called

to explicitly update the index componentsfor this object. The _checkpoint()

function completes the object’s update before the transaction is committed,

however if the application decides to rollback the current transaction, all the

updates for the object including indexcomponents are discarded. (Committing a

transaction implicitly checkpoints all theobjects created, updated or deleted in the

transaction.)

Updating f6causes the object to be removed from all indexes. Using _checkpoint()after _put() is the correct approach.

,当你见过了世界上最美丽的风景,

longlongago7777的专栏

相关文章:

你感兴趣的文章:

标签云: