コード例 #1
0
ファイル: smindex.cpp プロジェクト: glycerine/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::destroy_all_assoc()                                        *
 *--------------------------------------------------------------*/
rc_t
ss_m::destroy_all_assoc(stid_t stid, const vec_t& key, int& num)
{
    SM_PROLOGUE_RC(ss_m::destroy_assoc, in_xct, read_write, 0);
    W_DO(_destroy_all_assoc(stid, key, num));
    return RCOK;
}
コード例 #2
0
ファイル: smindex.cpp プロジェクト: glycerine/shore-mt
rc_t
ss_m::print_md_index(stid_t stid, ostream &out)
{
    SM_PROLOGUE_RC(ss_m::print_index, in_xct, read_only, 0);
    W_DO(_print_md_index(stid, out));
    return RCOK;
}
コード例 #3
0
ファイル: smfile.cpp プロジェクト: mengqingzhong/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::set_store_property()                                  *
 *--------------------------------------------------------------*/
rc_t
ss_m::set_store_property(stid_t stid, store_property_t property)
{
    SM_PROLOGUE_RC(ss_m::set_store_property, in_xct, read_write, 0);
    W_DO( _set_store_property( stid, property) );
    return RCOK;
}
コード例 #4
0
ファイル: smindex.cpp プロジェクト: glycerine/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::destroy_md_assoc()                                    *
 *--------------------------------------------------------------*/
rc_t
ss_m::destroy_md_assoc(stid_t stid, const nbox_t& key, const vec_t& el)
{
    SM_PROLOGUE_RC(ss_m::destroy_md_assoc, in_xct, read_write, 0);
    W_DO(_destroy_md_assoc(stid, key, el));
    return RCOK;
}
コード例 #5
0
ファイル: smindex.cpp プロジェクト: glycerine/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::print_index()                                                *
 *--------------------------------------------------------------*/
rc_t
ss_m::print_index(stid_t stid)
{
    SM_PROLOGUE_RC(ss_m::print_index, in_xct, read_only, 0);
    W_DO(_print_index(stid));
    return RCOK;
}
コード例 #6
0
ファイル: smindex.cpp プロジェクト: glycerine/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::draw_rtree()                                                *
 *--------------------------------------------------------------*/
rc_t
ss_m::draw_rtree(const stid_t& stid, ostream &s)
{
    SM_PROLOGUE_RC(ss_m::draw_rtree, in_xct, read_only, 0);
    W_DO(_draw_rtree(stid, s));
    return RCOK;
}
コード例 #7
0
ファイル: smindex.cpp プロジェクト: glycerine/shore-mt
rc_t
ss_m::destroy_md_index(const stid_t& iid)
{
    SM_PROLOGUE_RC(ss_m::destroy_md_index, in_xct, read_write, 0);
    W_DO( _destroy_md_index(iid) );
    return RCOK;
}
コード例 #8
0
ファイル: smfile.cpp プロジェクト: mengqingzhong/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::update_rec_hdr()                                        *
 *--------------------------------------------------------------*/
rc_t
ss_m::update_rec_hdr(const rid_t& rid, smsize_t start, const vec_t& hdr)
{
    SM_PROLOGUE_RC(ss_m::update_rec_hdr, in_xct,read_write, 0);
    W_DO(_update_rec_hdr(rid, start, hdr));
    return RCOK;
}
コード例 #9
0
ファイル: smfile.cpp プロジェクト: mengqingzhong/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::get_store_property()                                  *
 *--------------------------------------------------------------*/
rc_t
ss_m::get_store_property(stid_t stid, store_property_t& property)
{
    SM_PROLOGUE_RC(ss_m::get_store_property, in_xct,read_only, 0);
    W_DO( _get_store_property( stid, property) );
    return RCOK;
}
コード例 #10
0
ファイル: smfile.cpp プロジェクト: mengqingzhong/shore-mt
rc_t
ss_m::vid_to_lvid(vid_t vid, lvid_t& lvid)
{
    SM_PROLOGUE_RC(ss_m::lvid_to_vid, can_be_in_xct,read_only, 0);
    lvid = io->get_lvid(vid);
    if (lvid == lvid_t::null) return RC(eBADVOL);
    return RCOK;
}
コード例 #11
0
ファイル: smindex.cpp プロジェクト: glycerine/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::find_md_assoc()                                        *
 *--------------------------------------------------------------*/
rc_t
ss_m::find_md_assoc(stid_t stid, const nbox_t& key,
                    void* el, smsize_t& elen, bool& found)
{
    SM_PROLOGUE_RC(ss_m::find_assoc, in_xct, read_only, 0);
    W_DO(_find_md_assoc(stid, key, el, elen, found));
    return RCOK;
}
コード例 #12
0
ファイル: smfile.cpp プロジェクト: mengqingzhong/shore-mt
rc_t
ss_m::lvid_to_vid(const lvid_t& lvid, vid_t& vid)
{
    SM_PROLOGUE_RC(ss_m::lvid_to_vid, can_be_in_xct,read_only, 0);
    vid = io->get_vid(lvid);
    if (vid == vid_t::null) return RC(eBADVOL);
    return RCOK;
}
コード例 #13
0
ファイル: smfile.cpp プロジェクト: mengqingzhong/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::destroy_rec()                                                *
 *--------------------------------------------------------------*/
rc_t
ss_m::destroy_rec(const rid_t& rid, const bool bIgnoreLocks)
{
    SM_PROLOGUE_RC(ss_m::destroy_rec, in_xct,read_write, 0);
    DBG(<<"destroy_rec " <<rid);
    W_DO(_destroy_rec(rid, bIgnoreLocks));
    return RCOK;
}
コード例 #14
0
ファイル: smfile.cpp プロジェクト: mengqingzhong/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::update_mrbt_rec_hdr()                                 *
 *--------------------------------------------------------------*/
rc_t
ss_m::update_mrbt_rec_hdr(const rid_t& rid, smsize_t start, const vec_t& hdr,
			  const bool bIgnoreLocks, const bool bIgnoreLatches)
{
    SM_PROLOGUE_RC(ss_m::update_mrbt_rec_hdr, in_xct,read_write, 0);
    W_DO(_update_mrbt_rec_hdr(rid, start, hdr, bIgnoreLocks, bIgnoreLatches));
    return RCOK;
}
コード例 #15
0
ファイル: smfile.cpp プロジェクト: mengqingzhong/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::destroy_mrbt_file()                                   *
 *--------------------------------------------------------------*/
rc_t
ss_m::destroy_mrbt_file(const stid_t& fid)
{
    SM_PROLOGUE_RC(ss_m::destroy_mrbt_file, in_xct,read_write, 0);
    DBGTHRD(<<"destroy_mrbt_file " <<fid);
    W_DO(_destroy_file(fid));
    return RCOK;
}
コード例 #16
0
ファイル: smindex.cpp プロジェクト: glycerine/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::rtree_stats()                                                *
 *--------------------------------------------------------------*/
rc_t
ss_m::rtree_stats(const stid_t& stid, rtree_stats_t& stat, 
                uint2_t size, uint2_t* ovp, bool audit)
{
    SM_PROLOGUE_RC(ss_m::rtree_stats, in_xct, read_only, 0);
    W_DO(_rtree_stats(stid, stat, size, ovp, audit));
    return RCOK;
}
コード例 #17
0
ファイル: smindex.cpp プロジェクト: glycerine/shore-mt
rc_t
ss_m::bulkld_index(
    const stid_t&         stid, 
    sort_stream_i&         sorted_stream,
    sm_du_stats_t&         _stats)
{
    SM_PROLOGUE_RC(ss_m::bulkld_index, in_xct, read_write, 0);
    W_DO(_bulkld_index(stid, sorted_stream, _stats) );
    DBG(<<"bulkld_index " <<stid<<" returning RCOK");
    return RCOK;
}
コード例 #18
0
ファイル: smindex.cpp プロジェクト: glycerine/shore-mt
rc_t
ss_m::bulkld_md_index(
    const stid_t&         stid, 
    sort_stream_i&        sorted_stream,
    sm_du_stats_t&        _stats,
    int2_t                hff, 
    int2_t                hef, 
    nbox_t*               universe)
{
    SM_PROLOGUE_RC(ss_m::bulkld_md_index, in_xct, read_write, 0);
    W_DO(_bulkld_md_index(stid, sorted_stream, _stats, hff, hef, universe));
    return RCOK;
}
コード例 #19
0
ファイル: smfile.cpp プロジェクト: mengqingzhong/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::append_rec()                                                *
 *--------------------------------------------------------------*/
rc_t
ss_m::append_rec(const rid_t& rid, const vec_t& data)
{
#if FILE_LOG_COMMENT_ON
    {
        w_ostrstream s;
        s << "append_rec " << rid;
        W_DO(log_comment(s.c_str()));
    }
#endif
    SM_PROLOGUE_RC(ss_m::append_rec, in_xct,read_write, 0);
    W_DO(_append_rec(rid, data));
    return RCOK;
}
コード例 #20
0
ファイル: smindex.cpp プロジェクト: glycerine/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::bulkld_index()                                        *
 *--------------------------------------------------------------*/
rc_t
ss_m::bulkld_index(
    const stid_t&         stid, 
    int                   nsrcs,
    const stid_t*         source,
    sm_du_stats_t&        _stats,
    bool                  sort_duplicates, // = true
    bool                  lexify_keys // = true
    )
{
    SM_PROLOGUE_RC(ss_m::bulkld_index, in_xct, read_write, 0);
    W_DO(_bulkld_index(stid, nsrcs, source, _stats, sort_duplicates, lexify_keys) );
    return RCOK;
}
コード例 #21
0
ファイル: smindex.cpp プロジェクト: glycerine/shore-mt
rc_t
ss_m::bulkld_md_index(
    const stid_t&         stid, 
    int                   nsrcs,
    const stid_t*         source,
    sm_du_stats_t&        _stats,
    int2_t                hff, 
    int2_t                hef, 
    nbox_t*               universe)
{
    SM_PROLOGUE_RC(ss_m::bulkld_md_index, in_xct, read_write, 0);
    W_DO(_bulkld_md_index(stid, nsrcs, source, _stats, hff, hef, universe));
    return RCOK;
}
コード例 #22
0
ファイル: smindex.cpp プロジェクト: glycerine/shore-mt
rc_t
ss_m::create_md_index(
    vid_t                 vid, 
    ndx_t                 ntype, 
    store_property_t         property,
    stid_t&                 stid, 
    int2_t                 dim
    )
{
    SM_PROLOGUE_RC(ss_m::create_md_index, in_xct, read_write, 0);
    W_DO(_create_md_index(vid, ntype, property,
                          stid, dim));
    return RCOK;
}
コード例 #23
0
ファイル: smfile.cpp プロジェクト: mengqingzhong/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::update_mrbt_rec()                                     *
 *--------------------------------------------------------------*/
rc_t
ss_m::update_mrbt_rec(const rid_t& rid, smsize_t start, const vec_t& data,
		      const bool bIgnoreLocks, const bool bIgnoreLatches)
{
#if FILE_LOG_COMMENT_ON
    {
        w_ostrstream s;
        s << "update_mrbt_rec " << rid;
        W_DO(log_comment(s.c_str()));
    }
#endif
    SM_PROLOGUE_RC(ss_m::update_mrbt_rec, in_xct,read_write, 0);
    W_DO(_update_mrbt_rec(rid, start, data, bIgnoreLocks, bIgnoreLatches));
    return RCOK;
}
コード例 #24
0
ファイル: smindex.cpp プロジェクト: glycerine/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::destroy_assoc()                                        *
 *--------------------------------------------------------------*/
rc_t
ss_m::destroy_assoc(stid_t stid, const vec_t& key, const vec_t& el
#ifdef SM_DORA
                   , const bool bIgnoreLocks
#endif
                    )
{
    SM_PROLOGUE_RC(ss_m::destroy_assoc, in_xct, read_write, 0);
    W_DO(_destroy_assoc(stid, key, el
#ifdef SM_DORA
                        , bIgnoreLocks
#endif
                        ));
    return RCOK;
}
コード例 #25
0
ファイル: smindex.cpp プロジェクト: glycerine/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::find_assoc()                                                *
 *--------------------------------------------------------------*/
rc_t
ss_m::find_assoc(stid_t stid, const vec_t& key, 
                 void* el, smsize_t& elen, bool& found
#ifdef SM_DORA
                 , const bool bIgnoreLocks
#endif
              )
{
    SM_PROLOGUE_RC(ss_m::find_assoc, in_xct, read_only, 0);
    W_DO(_find_assoc(stid, key, el, elen, found
#ifdef SM_DORA
                     , bIgnoreLocks
#endif
                     ));
    return RCOK;
}
コード例 #26
0
ファイル: smfile.cpp プロジェクト: mengqingzhong/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::create_mrbt_rec_in_page()                             *
 *--------------------------------------------------------------*/
rc_t
ss_m::find_page_and_create_mrbt_rec(const stid_t& fid, const lpid_t& leaf, const vec_t& hdr,
				    smsize_t len_hint, const vec_t& data, rid_t& new_rid,
				    const bool bIgnoreLocks, const bool bIgnoreLatches)
{
#if FILE_LOG_COMMENT_ON
    {
        w_ostrstream s;
        s << "find_page_and_create_mrbt_rec: file=" << fid ;
        W_DO(log_comment(s.c_str()));
    }
#endif
    SM_PROLOGUE_RC(ss_m::find_page_and_create_mrbt_rec, in_xct,read_write, 0);    
    W_DO(_find_page_and_create_mrbt_rec(fid, leaf, hdr, len_hint, data, new_rid,
					bIgnoreLocks, bIgnoreLatches));
    return RCOK;
}
コード例 #27
0
ファイル: smfile.cpp プロジェクト: mengqingzhong/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::create_rec()                                                *
 *--------------------------------------------------------------*/
rc_t
ss_m::create_rec(const stid_t& fid, const vec_t& hdr,
                 smsize_t len_hint, const vec_t& data, rid_t& new_rid,
                 const bool bIgnoreLocks
)
{
#if FILE_LOG_COMMENT_ON
    {
        w_ostrstream s;
        s << "create_rec " << fid;
        W_DO(log_comment(s.c_str()));
    }
#endif
    SM_PROLOGUE_RC(ss_m::create_rec, in_xct,read_write, 0);
    W_DO(_create_rec(fid, hdr, len_hint, data, new_rid, bIgnoreLocks));
    return RCOK;
}
コード例 #28
0
ファイル: smfile.cpp プロジェクト: mengqingzhong/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::create_mrbt_file()                                    *
 *--------------------------------------------------------------*/
rc_t
ss_m::create_mrbt_file(
    vid_t                          vid, 
    stid_t&                        fid, 
    store_property_t               property,
    shpid_t                        cluster_hint // = 0
)
{
#if FILE_LOG_COMMENT_ON
    W_DO(log_comment("create_mrbt_file"));
#endif
    SM_PROLOGUE_RC(ss_m::create_mrbt_file, in_xct, read_write, 0);
    DBGTHRD(<<"create_mrbt_file " <<vid << " " << property );
    W_DO(_create_mrbt_file(vid, fid, property, cluster_hint));
    DBGTHRD(<<"create_mrbt_file returns " << fid);
    return RCOK;
}
コード例 #29
0
ファイル: smindex.cpp プロジェクト: glycerine/shore-mt
rc_t
ss_m::create_index(
    vid_t                 vid, 
    ndx_t                 ntype, 
    store_property_t      property,
    const char*           key_desc,
    concurrency_t         cc, 
    stid_t&               stid
    )
{
    SM_PROLOGUE_RC(ss_m::create_index, in_xct, read_write, 0);
    if(property == t_temporary) {
                return RC(eBADSTOREFLAGS);
    }
    W_DO(_create_index(vid, ntype, property, key_desc, cc, stid));

    return RCOK;
}
コード例 #30
0
ファイル: smfile.cpp プロジェクト: mengqingzhong/shore-mt
/*--------------------------------------------------------------*
 *  ss_m::create_mrbt_rec_in_page()                             *
 *--------------------------------------------------------------*/
rc_t
ss_m::create_mrbt_rec_in_page(const stid_t& fid, file_p& page, const vec_t& hdr,
			      smsize_t len_hint, const vec_t& data, rid_t& new_rid, bool& space_found,
			      const bool bIgnoreLocks, const bool bIgnoreLatches)
{
#if FILE_LOG_COMMENT_ON
    {
        w_ostrstream s;
        s << "create_mrbt_rec_in_page: file=" << fid << " page=" << page.pid() ;
        W_DO(log_comment(s.c_str()));
    }
#endif
    SM_PROLOGUE_RC(ss_m::create_mrbt_rec_in_page, in_xct,read_write, 0);
    W_DO(_create_mrbt_rec_in_page(fid, page, hdr, len_hint, data, new_rid,
				  space_found, bIgnoreLocks, bIgnoreLatches));

    return RCOK;
}