#include <sm_vas.h>  // which includes scan.h
class scan_rt_i {
public:
    stid_t			stid;
    tid_t			tid;
    ndx_t 			ntype;
    serial_t			serial;  // serial number if store has
					 // a logical ID 
    
    NORET			scan_rt_i(
	const stid_t& 		    stid, 
	sob_cmp_t 		    c,
	const nbox_t& 		    box,
	concurrency_t		    cc = t_cc_page);
    NORET			scan_rt_i(
	const lvid_t& 		    lvid, 
	const serial_t& 	    stid,
	sob_cmp_t 		    c,
	const nbox_t& 		    box,
	concurrency_t		    cc = t_cc_page);
    NORET			~scan_rt_i();
    
    rc_t			next(
	nbox_t& 		    key,
	void* 			    el,
	smsize_t&		    elen, 
	bool& 		    	    eof);
    void			finish();
    
    bool			eof()	{ return _eof; }
    bool			error_detected()
};
A common question is what is the effect of changes to an index made by a transaction that is also scanning the index. It is not safe to change anything in the file while scanning. Instead, a list of changes should be made during the scan and only performed after the scan is complete.