Commit d1cb910c authored by lw's avatar lw

*** empty log message ***

parent 2b392528
......@@ -20,19 +20,27 @@ wb_db_info::wb_db_info(wb_db *db) :
void wb_db_info::get(wb_db_txn *txn)
{
int index = 0;
int ret;
m_key.set_data(&index);
m_key.set_size(sizeof(index));
m_data.set_ulen(sizeof(m_volume));
m_data.set_flags(DB_DBT_USERMEM);
m_db->m_t_info->get(txn, &m_key, &m_data, 0);
ret = m_db->m_t_info->get(txn, &m_key, &m_data, 0);
printf("info get: %d\n", ret);
}
void wb_db_info::put(wb_db_txn *txn)
{
int index = 0;
int ret;
m_key.set_data(&index);
m_key.set_size(sizeof(index));
m_db->m_t_info->put(txn, &m_key, &m_data, 0);
ret = m_db->m_t_info->put(txn, &m_key, &m_data, 0);
printf("info put: %d\n", ret);
}
wb_db_class::wb_db_class(wb_db *db, wb_db_txn *txn, pwr_tCid cid) :
......@@ -161,24 +169,29 @@ void wb_db_name::name(wb_name &name)
}
wb_db_ohead::wb_db_ohead() :
m_db(0), m_key(&m_o.oid, sizeof(m_o.oid)), m_data(&m_o, sizeof(m_o))
m_db(0), m_key(&m_oid, sizeof(m_oid)), m_data(&m_o, sizeof(m_o))
{
memset(&m_o, 0, sizeof(m_o));
}
wb_db_ohead::wb_db_ohead(wb_db *db) :
m_db(db), m_key(&m_o.oid, sizeof(m_o.oid)), m_data(&m_o, sizeof(m_o))
m_db(db), m_key(&m_oid, sizeof(m_oid)), m_data(&m_o, sizeof(m_o))
{
memset(&m_o, 0, sizeof(m_o));
}
wb_db_ohead::wb_db_ohead(wb_db *db, pwr_tOid oid) :
m_db(db), m_key(&m_o.oid, sizeof(m_o.oid)), m_data(&m_o, sizeof(m_o))
m_db(db), m_key(&m_oid, sizeof(m_oid)), m_data(&m_o, sizeof(m_o))
{
m_o.oid = oid;
memset(&m_o, 0, sizeof(m_o));
m_oid = oid;
}
wb_db_ohead::wb_db_ohead(wb_db *db, wb_db_txn *txn, pwr_tOid oid) :
m_db(db), m_key(&m_o.oid, sizeof(m_o.oid)), m_data(&m_o, sizeof(m_o))
m_db(db), m_key(&m_oid, sizeof(m_oid)), m_data(&m_o, sizeof(m_o))
{
m_o.oid = oid;
memset(&m_o, 0, sizeof(m_o));
m_oid = oid;
get(txn);
}
......@@ -187,10 +200,11 @@ wb_db_ohead::wb_db_ohead(wb_db *db, pwr_tOid oid, pwr_tCid cid,
const char *name, const char *normname,
pwr_tTime ohTime, pwr_tTime rbTime, pwr_tTime dbTime,
size_t rbSize, size_t dbSize) :
m_db(db), m_key(&m_o.oid, sizeof(m_o.oid)), m_data(&m_o, sizeof(m_o))
m_db(db), m_key(&m_oid, sizeof(m_oid)), m_data(&m_o, sizeof(m_o))
{
m_o.oid = oid;
memset(&m_o, 0, sizeof(m_o));
m_oid = m_o.oid = oid;
m_o.cid = cid;
m_o.poid = poid;
strcpy(m_o.name, name);
......@@ -212,7 +226,10 @@ wb_db_ohead::wb_db_ohead(wb_db *db, pwr_tOid oid, pwr_tCid cid,
wb_db_ohead &wb_db_ohead::get(wb_db_txn *txn)
{
m_db->m_t_ohead->get(txn, &m_key, &m_data, 0);
m_data.set_ulen(sizeof(m_o));
m_data.set_flags(DB_DBT_USERMEM);
int ret = m_db->m_t_ohead->get(txn, &m_key, &m_data, 0);
return *this;
}
......@@ -223,8 +240,11 @@ void wb_db_ohead::put(wb_db_txn *txn)
wb_db_ohead &wb_db_ohead::get(wb_db_txn *txn, pwr_tOid oid)
{
m_o.oid = oid;
m_db->m_t_ohead->get(txn, &m_key, &m_data, 0);
m_oid = oid;
m_data.set_ulen(sizeof(m_o));
m_data.set_flags(DB_DBT_USERMEM);
int ret = m_db->m_t_ohead->get(txn, &m_key, &m_data, 0);
return *this;
}
......@@ -524,6 +544,7 @@ bool wb_db::importVolume(wb_export &e)
}
}
bool wb_db::importHead(pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
pwr_tOid boid, pwr_tOid aoid, pwr_tOid foid, pwr_tOid loid,
const char *name, const char *normname,
......@@ -536,6 +557,14 @@ bool wb_db::importHead(pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
n.put(m_txn);
wb_db_class c(this, cid, oid);
c.put(m_txn);
if (oid.oix == pwr_cNOix) { // This is the volume object
wb_db_info i(this);
i.cid(cid);
i.vid(oid.vid);
i.name(name);
i.put(m_txn);
}
return true;
}
......
......@@ -54,6 +54,11 @@ public:
wb_db(pwr_tVid vid);
//~wb_db();
pwr_tCid cid() { return m_cid;}
pwr_tVid vid() { return m_vid;}
//pwr_tTime time() { return m_volume.time;}
char *volumeName() { return m_volumeName;}
pwr_tOid new_oid(wb_db_txn *txn);
void close();
......@@ -131,6 +136,7 @@ class wb_db_ohead
{
public:
db_sObject m_o;
pwr_tOid m_oid;
wb_db *m_db;
Dbt m_key;
......@@ -149,6 +155,8 @@ public:
wb_db_ohead &get(wb_db_txn *txn);
wb_db_ohead &get(wb_db_txn *txn, pwr_tOid oid);
void setDb(wb_db *db) { m_db = db;}
void put(wb_db_txn *txn);
void del(wb_db_txn *txn);
......@@ -163,9 +171,9 @@ public:
pwr_tOid aoid() { return m_o.aoid;}
pwr_tTime ohTime() { return m_o.time;}
char *name() { return m_o.name;}
const char *name() { return m_o.name;}
char *normname() {return m_o.normname;}
const char *normname() {return m_o.normname;}
size_t rbSize() { return m_o.body[0].size;}
size_t dbSize() { return m_o.body[1].size;}
......
......@@ -143,14 +143,11 @@ wb_dbs::checkObject(sOentry *oep)
switch (oep->o.cid) {
case pwr_eClass_LibHier:
if (m_volume.cid == pwr_eClass_ClassVolume)
break;
if (m_volume.cid != pwr_eClass_ClassVolume)
oep->o.flags.b.devOnly = 1;
break;
case pwr_eClass_Alias:
if (m_volume.cid == pwr_eClass_ClassVolume)
break;
if (m_volume.cid != pwr_eClass_ClassVolume)
oep->o.flags.b.isAliasClient = 1;
break;
case pwr_eClass_MountVolume:
......
......@@ -419,9 +419,9 @@ void wb_erep::loadMeta( pwr_tStatus *status)
strcat( vname, ".db");
dcli_translate_filename( vname, vname);
// wb_vrepdb *vrepdb = new wb_vrepdb( this, vname);
// vrepdb->name(vol_array[0]);
// addDbs( &sts, vrepdb);
wb_vrepdb *vrepdb = new wb_vrepdb( this, vname);
vrepdb->name(vol_array[0]);
addDbs( &sts, vrepdb);
vol_cnt++;
}
}
......
......@@ -21,6 +21,22 @@ wb_orepdb::~wb_orepdb()
{
}
void *
wb_orepdb::operator new(size_t size, wb_vrepdb *v)
{
return (void *)v->new_wb_orepdb(size);
}
#if 1
void
wb_orepdb::operator delete(void *p)
{
wb_orepdb *o = (wb_orepdb *)p;
((wb_vrepdb *)o->m_vrep)->delete_wb_orepdb(p);
}
#endif
//
// Operations declared in wb_orep
//
......@@ -29,7 +45,13 @@ pwr_tOid wb_orepdb::oid() const
{
pwr_tStatus sts;
return m_vrep->oid(&sts, (wb_orep*)this);
return m_oid;
}
pwr_tVid wb_orepdb::cid() const
{
pwr_tStatus sts;
return m_vrep->cid(&sts, (wb_orep*)this);
}
pwr_tVid wb_orepdb::vid() const
......@@ -74,6 +96,11 @@ pwr_tOid wb_orepdb::aoid() const
return m_vrep->aoid(&sts, (wb_orep*)this);
}
wb_name wb_orepdb::longName()
{
return wb_name();
}
const char * wb_orepdb::name() const
{
pwr_tStatus sts;
......
......@@ -19,6 +19,9 @@ public:
wb_orepdb(db_sObject *o);
~wb_orepdb();
void* operator new(size_t size, wb_vrepdb *v);
void operator delete(void *p);
virtual pwr_tOid oid() const;
virtual pwr_tVid vid() const;
virtual pwr_tOix oix() const;
......
......@@ -110,8 +110,8 @@ public:
virtual bool isLocal(const wb_orep *o) = 0;
pwr_tVid vid() const { return m_vid;}
pwr_tCid cid() const { return m_cid;}
pwr_tVid vid(pwr_tVid vid) { m_vid = vid;}
pwr_tCid cid(pwr_tCid cid) { m_cid = cid;}
void vid(pwr_tVid vid) { m_vid = vid;}
void cid(pwr_tCid cid) { m_cid = cid;}
virtual void name( const char *n) { strcpy( m_name, n);}
virtual const char *name() { return m_name;}
......
......@@ -2,6 +2,7 @@
#include <errno.h>
#include "wb_vrepdb.h"
#include "wb_orepdb.h"
#include "wb_erep.h"
#include "db_cxx.h"
#include "wb_ldh.h"
......@@ -26,17 +27,80 @@ wb_vrepdb::wb_vrepdb(wb_erep *erep, const char *fileName) :
m_db = new wb_db();
m_db->open(fileName);
m_ohead.setDb(m_db);
strcpy(m_name, m_db->volumeName());
m_vid = m_db->vid();
m_cid = m_db->cid();
#if 0
m_isDbsenvLoaded = false;
if ( isCommonMeta())
m_merep = m_erep->merep();
else
m_merep = new wb_merep(m_erep, (wb_mvrep *)this);
#endif
}
wb_erep *wb_vrepdb::erep()
{
return m_erep;
}
wb_vrep *wb_vrepdb::next()
{
return 0;
}
wb_merep *wb_vrepdb::merep() const
{
return m_merep;
}
wb_srep *wb_vrepdb::newSession()
{
return 0;
}
wb_name wb_vrepdb::longName(pwr_tStatus *sts, const wb_orep *o)
{
*sts = LDH__SUCCESS;
return wb_name();
}
bool wb_vrepdb::isOffspringOf(pwr_tStatus *sts, const wb_orep *child, const wb_orep *parent)
{
return false;
}
bool wb_vrepdb::isLocal(const wb_orep *o)
{
if (o)
return o->oid().vid == wb_vrep::vid();
return false;
}
bool wb_vrepdb::createSnapshot(const char *fileName)
{
return false;
}
void wb_vrepdb::objectName(const wb_orep *o, char *str)
{
if (str)
*str = '\0';
}
const char *wb_vrepdb::objectName(pwr_tStatus *sts, const wb_orep *o)
{
*sts = LDH__SUCCESS;
try {
m_ohead.get(m_txn, o->oid());
return m_ohead.name();
}
catch (DbException &e) {
*sts = LDH__NOSUCHOBJ;
printf("vrepdb: %s\n", e.what());
return 0;
}
}
void wb_vrepdb::load()
{
}
......@@ -48,6 +112,7 @@ void wb_vrepdb::load()
bool wb_vrepdb::commit(pwr_tStatus *sts)
{
*sts = LDH__SUCCESS;
return m_db->commit(m_txn);
}
......@@ -57,11 +122,13 @@ bool wb_vrepdb::commit(pwr_tStatus *sts)
//
bool wb_vrepdb::abort(pwr_tStatus *sts)
{
*sts = LDH__SUCCESS;
return m_db->abort(m_txn);
}
wb_orep* wb_vrepdb::object(pwr_tStatus *sts)
{
*sts = LDH__SUCCESS;
try {
pwr_tOid oid;
......@@ -82,6 +149,7 @@ wb_orep* wb_vrepdb::object(pwr_tStatus *sts)
wb_orep* wb_vrepdb::object(pwr_tStatus *sts, pwr_tOid oid)
{
*sts = LDH__SUCCESS;
try {
m_ohead.get(m_txn, oid);
......@@ -94,8 +162,14 @@ wb_orep* wb_vrepdb::object(pwr_tStatus *sts, pwr_tOid oid)
}
}
wb_orep* wb_vrepdb::object(pwr_tStatus *sts, wb_name &name)
{
return 0;
}
wb_orep* wb_vrepdb::object(pwr_tStatus *sts, const wb_orep *parent, wb_name &name)
{
*sts = LDH__SUCCESS;
try {
wb_db_name n(m_db, m_txn, parent->oid(), name);
m_ohead.get(m_txn, n.oid());
......@@ -108,8 +182,20 @@ wb_orep* wb_vrepdb::object(pwr_tStatus *sts, const wb_orep *parent, wb_name &nam
}
}
wb_orep *wb_vrepdb::copyObject(pwr_tStatus *sts, const wb_orep *orep, wb_destination &d, wb_name &name)
{
*sts = LDH__NYI;
return 0;
}
bool wb_vrepdb::copyOset(pwr_tStatus *sts, wb_oset *oset, wb_destination &d)
{
return false;
}
wb_orep* wb_vrepdb::createObject(pwr_tStatus *sts, wb_cdef cdef, wb_destination &d, wb_name &name)
{
*sts = LDH__NYI;
wb_db_txn *txn = m_db->begin(0);
try {
......@@ -155,6 +241,7 @@ wb_orep* wb_vrepdb::createObject(pwr_tStatus *sts, wb_cdef cdef, wb_destination
bool wb_vrepdb::deleteObject(pwr_tStatus *sts, wb_orep *orp)
{
*sts = LDH__NYI;
wb_db_ohead o(m_db, orp->oid());
wb_db_txn *txn = m_db->begin(0);
......@@ -179,8 +266,21 @@ bool wb_vrepdb::deleteObject(pwr_tStatus *sts, wb_orep *orp)
return true;
}
bool wb_vrepdb::deleteFamily(pwr_tStatus *sts, wb_orep *orep)
{
*sts = LDH__NYI;
return false;
}
bool wb_vrepdb::deleteOset(pwr_tStatus *sts, wb_oset *oset)
{
*sts = LDH__NYI;
return false;
}
bool wb_vrepdb::moveObject(pwr_tStatus *sts, wb_orep *orp, wb_destination &d)
{
*sts = LDH__NYI;
#if 0
if (!isLocal(o))
return ;
......@@ -210,6 +310,7 @@ bool wb_vrepdb::moveObject(pwr_tStatus *sts, wb_orep *orp, wb_destination &d)
bool wb_vrepdb::renameObject(pwr_tStatus *sts, wb_orep *orp, wb_name &name)
{
*sts = LDH__NYI;
wb_db_txn *txn = m_db->begin(0);
try {
......@@ -237,6 +338,7 @@ bool wb_vrepdb::renameObject(pwr_tStatus *sts, wb_orep *orp, wb_name &name)
bool wb_vrepdb::writeAttribute(pwr_tStatus *sts, wb_orep *o, pwr_eBix bix, size_t offset, size_t size, void *p)
{
*sts = LDH__NYI;
//body.oid = ?;
//body.bix = ?;
//key.data = &body;
......@@ -319,16 +421,19 @@ void *wb_vrepdb::readBody(pwr_tStatus *sts, const wb_orep *orp, pwr_eBix bix, vo
bool wb_vrepdb::writeBody(pwr_tStatus *sts, wb_orep *o, pwr_eBix bix, void *p)
{
*sts = LDH__NYI;
return true;
}
wb_orep *wb_vrepdb::ancestor(pwr_tStatus *sts, const wb_orep *o)
{
*sts = LDH__NYI;
return 0;
}
pwr_tCid wb_vrepdb::cid(pwr_tStatus *sts, const wb_orep *orp)
{
*sts = LDH__SUCCESS;
try {
return m_ohead.get(m_txn, orp->oid()).cid();
}
......@@ -341,6 +446,7 @@ pwr_tCid wb_vrepdb::cid(pwr_tStatus *sts, const wb_orep *orp)
pwr_tTime wb_vrepdb::ohTime(pwr_tStatus *sts, const wb_orep *orp)
{
*sts = LDH__SUCCESS;
try {
return m_ohead.get(m_txn, orp->oid()).ohTime();
}
......@@ -355,6 +461,7 @@ pwr_tTime wb_vrepdb::ohTime(pwr_tStatus *sts, const wb_orep *orp)
pwr_tVid wb_vrepdb::vid(pwr_tStatus *sts, const wb_orep *orp)
{
*sts = LDH__SUCCESS;
try {
return m_ohead.get(m_txn, orp->oid()).vid();
}
......@@ -367,6 +474,7 @@ pwr_tVid wb_vrepdb::vid(pwr_tStatus *sts, const wb_orep *orp)
pwr_tOid wb_vrepdb::oid(pwr_tStatus *sts, const wb_orep *orp)
{
*sts = LDH__SUCCESS;
try {
return m_ohead.get(m_txn, orp->oid()).oid();
}
......@@ -379,6 +487,7 @@ pwr_tOid wb_vrepdb::oid(pwr_tStatus *sts, const wb_orep *orp)
pwr_tOix wb_vrepdb::oix(pwr_tStatus *sts, const wb_orep *orp)
{
*sts = LDH__SUCCESS;
try {
return m_ohead.get(m_txn, orp->oid()).oix();
}
......@@ -391,6 +500,7 @@ pwr_tOix wb_vrepdb::oix(pwr_tStatus *sts, const wb_orep *orp)
pwr_tOid wb_vrepdb::poid(pwr_tStatus *sts, const wb_orep *orp)
{
*sts = LDH__SUCCESS;
try {
return m_ohead.get(m_txn, orp->oid()).poid();
}
......@@ -403,6 +513,7 @@ pwr_tOid wb_vrepdb::poid(pwr_tStatus *sts, const wb_orep *orp)
pwr_tOid wb_vrepdb::foid(pwr_tStatus *sts, const wb_orep *orp)
{
*sts = LDH__SUCCESS;
try {
return m_ohead.get(m_txn, orp->oid()).foid();
}
......@@ -415,6 +526,7 @@ pwr_tOid wb_vrepdb::foid(pwr_tStatus *sts, const wb_orep *orp)
pwr_tOid wb_vrepdb::loid(pwr_tStatus *sts, const wb_orep *orp)
{
*sts = LDH__SUCCESS;
try {
return m_ohead.get(m_txn, orp->oid()).loid();
}
......@@ -427,6 +539,7 @@ pwr_tOid wb_vrepdb::loid(pwr_tStatus *sts, const wb_orep *orp)
pwr_tOid wb_vrepdb::aoid(pwr_tStatus *sts, const wb_orep *orp)
{
*sts = LDH__SUCCESS;
try {
return m_ohead.get(m_txn, orp->oid()).aoid();
}
......@@ -439,6 +552,7 @@ pwr_tOid wb_vrepdb::aoid(pwr_tStatus *sts, const wb_orep *orp)
pwr_tOid wb_vrepdb::boid(pwr_tStatus *sts, const wb_orep *orp)
{
*sts = LDH__SUCCESS;
try {
return m_ohead.get(m_txn, orp->oid()).boid();
}
......@@ -451,6 +565,7 @@ pwr_tOid wb_vrepdb::boid(pwr_tStatus *sts, const wb_orep *orp)
wb_orep *wb_vrepdb::parent(pwr_tStatus *sts, const wb_orep *orp)
{
*sts = LDH__SUCCESS;
try {
m_ohead.get(m_txn, m_ohead.get(m_txn, orp->oid()).poid());
return new (this) wb_orepdb(&m_ohead.m_o);
......@@ -464,6 +579,7 @@ wb_orep *wb_vrepdb::parent(pwr_tStatus *sts, const wb_orep *orp)
wb_orep *wb_vrepdb::after(pwr_tStatus *sts, const wb_orep *orp)
{
*sts = LDH__SUCCESS;
try {
m_ohead.get(m_txn, m_ohead.get(m_txn, orp->oid()).aoid());
return new (this) wb_orepdb(&m_ohead.m_o);
......@@ -477,6 +593,7 @@ wb_orep *wb_vrepdb::after(pwr_tStatus *sts, const wb_orep *orp)
wb_orep *wb_vrepdb::before(pwr_tStatus *sts, const wb_orep *orp)
{
*sts = LDH__SUCCESS;
try {
m_ohead.get(m_txn, m_ohead.get(m_txn, orp->oid()).boid());
return new (this) wb_orepdb(&m_ohead.m_o);
......@@ -490,6 +607,7 @@ wb_orep *wb_vrepdb::before(pwr_tStatus *sts, const wb_orep *orp)
wb_orep *wb_vrepdb::first(pwr_tStatus *sts, const wb_orep *orp)
{
*sts = LDH__SUCCESS;
try {
m_ohead.get(m_txn, m_ohead.get(m_txn, orp->oid()).foid());
return new (this) wb_orepdb(&m_ohead.m_o);
......@@ -503,6 +621,7 @@ wb_orep *wb_vrepdb::first(pwr_tStatus *sts, const wb_orep *orp)
wb_orep *wb_vrepdb::child(pwr_tStatus *sts, const wb_orep *orp, wb_name &name)
{
*sts = LDH__SUCCESS;
try {
wb_db_name n(m_db, m_txn, orp->oid(), name);
m_ohead.get(m_txn, n.oid());
......@@ -517,6 +636,7 @@ wb_orep *wb_vrepdb::child(pwr_tStatus *sts, const wb_orep *orp, wb_name &name)
wb_orep *wb_vrepdb::last(pwr_tStatus *sts, const wb_orep *orp)
{
*sts = LDH__SUCCESS;
try {
m_ohead.get(m_txn, m_ohead.get(m_txn, orp->oid()).loid());
return new (this) wb_orepdb(&m_ohead.m_o);
......@@ -530,6 +650,7 @@ wb_orep *wb_vrepdb::last(pwr_tStatus *sts, const wb_orep *orp)
wb_orep *wb_vrepdb::next(pwr_tStatus *sts, const wb_orep *orp)
{
*sts = LDH__SUCCESS;
try {
m_ohead.get(m_txn, orp->oid());
wb_db_class c(m_db, m_txn, m_ohead.cid());
......@@ -550,9 +671,10 @@ wb_orep *wb_vrepdb::next(pwr_tStatus *sts, const wb_orep *orp)
wb_orep *wb_vrepdb::previous(pwr_tStatus *sts, const wb_orep *orp)
{
*sts = LDH__SUCCESS;
try {
m_ohead.get(m_txn, orp->oid());
wb_db_class c(m_db, m_ohead.cid());
wb_db_class c(m_db, m_txn, m_ohead.cid());
if (c.pred(m_ohead.oid())) {
m_ohead.get(m_txn, c.oid());
return new (this) wb_orepdb(&m_ohead.m_o);
......@@ -615,7 +737,7 @@ void wb_vrepdb::adopt(wb_db_txn *txn, wb_db_ohead &o, wb_destination &dest)
d.put(txn);
wb_db_name n(m_db, o.poid(), o.name());
wb_db_name n(m_db, o.oid(), o.poid(), o.normname());
n.put(txn);
}
......@@ -645,7 +767,44 @@ void wb_vrepdb::unadopt(wb_db_txn *txn, wb_db_ohead &o)
p.put(txn);
wb_db_name n(m_db, o.poid(), o.name());
wb_db_name n(m_db, o.oid(), o.poid(), o.normname());
n.del(txn);
}
bool wb_vrepdb::exportVolume(wb_import &e)
{
return false;
}
bool wb_vrepdb::exportHead(wb_import &e)
{
return false;
}
bool wb_vrepdb::exportRbody(wb_import &e)
{
return false;
}
bool wb_vrepdb::exportDbody(wb_import &e)
{
return false;
}
bool wb_vrepdb::exportMeta(wb_import &e)
{
return false;
}
wb_orepdb *wb_vrepdb::new_wb_orepdb(size_t size)
{
wb_orepdb *o = (wb_orepdb *) calloc(1, size);
o->m_vrep = this;
return o;
}
void wb_vrepdb::delete_wb_orepdb(void *p)
{
free(p);
}
......@@ -13,6 +13,8 @@ protected:
//wb_session m_wsession;
wb_erep *m_erep;
wb_merep *m_merep;
unsigned int m_nSession;
unsigned int m_nRef;
......@@ -125,6 +127,10 @@ public:
#endif
void unadopt(wb_db_txn *txn, wb_db_ohead &o);
void adopt(wb_db_txn *txn, wb_db_ohead &o, wb_destination &dest);
wb_orepdb *new_wb_orepdb(size_t size);
void delete_wb_orepdb(void *p);
};
#endif
......@@ -39,6 +39,7 @@ dbs_sEnv *wb_vrepdbs::dbsenv()
m_isDbsenvLoaded = true;
strcpy(m_name, m_dbsenv.vp->name);
m_vid = m_dbsenv.vp->vid;
m_cid = m_dbsenv.vp->cid;
} else {
ep = &m_dbsenv;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment