Zero  0.1.0
Classes | Functions
SSMSP

Classes

class  sm_save_point_t
 A point to which a transaction can roll back. More...
 

Functions

static rc_t ss_m::save_work (sm_save_point_t &sp)
 Populate a save point. More...
 
static rc_t ss_m::rollback_work (const sm_save_point_t &sp)
 Roll back to a savepoint. More...
 

Detailed Description

A transaction may perform a partial rollback using savepoints. The transaction populates a savepoint by calling ss_m::save_work, then it may roll back to that point with ss_m::rollback_work. Locks acquired between the save_work and rollback_work are not released.

Function Documentation

§ rollback_work()

rc_t ss_m::rollback_work ( const sm_save_point_t sp)
static

Roll back to a savepoint.

Parameters
[in]spAn sm_save_point_t owned by the caller and populated by save_work.

Undo everything that was done from the time save_work was called on this savepoint.

Note
Locks are not freed.
Only one thread may be attached to a transaction when this is called.

§ save_work()

rc_t ss_m::save_work ( sm_save_point_t sp)
static

Populate a save point.

Parameters
[out]spAn sm_save_point_t owned by the caller.

Store in sp the needed information to be able to roll back to this point. For use with rollback_work.

Note
Only one thread may be attached to a transaction when this is called.