summaryrefslogtreecommitdiff
path: root/cpp/src/Freeze/IndexI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Freeze/IndexI.cpp')
-rw-r--r--cpp/src/Freeze/IndexI.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/cpp/src/Freeze/IndexI.cpp b/cpp/src/Freeze/IndexI.cpp
index 1b6c5b9586d..69d9d6ff2b7 100644
--- a/cpp/src/Freeze/IndexI.cpp
+++ b/cpp/src/Freeze/IndexI.cpp
@@ -57,7 +57,8 @@ Freeze::IndexI::untypedFindFirst(const Key& bytes, Int firstN) const
Dbt dbValue;
dbValue.set_flags(DB_DBT_USERMEM | DB_DBT_PARTIAL);
- Ice::CommunicatorPtr communicator = _store->communicator();
+ const Ice::CommunicatorPtr& communicator = _store->communicator();
+ const Ice::EncodingVersion& encoding = _store->encoding();
TransactionIPtr transaction = _store->evictor()->beforeQuery();
DbTxn* tx = transaction == 0 ? 0 : transaction->dbTxn();
@@ -99,7 +100,7 @@ Freeze::IndexI::untypedFindFirst(const Key& bytes, Int firstN) const
pkey.resize(pdbKey.get_size());
Ice::Identity ident;
- ObjectStoreBase::unmarshal(ident, pkey, communicator);
+ ObjectStoreBase::unmarshal(ident, pkey, communicator, encoding);
identities.push_back(ident);
flags = DB_NEXT_DUP;
}
@@ -315,6 +316,7 @@ Freeze::IndexI::associate(ObjectStoreBase* store, DbTxn* txn,
assert(txn != 0);
_store = store;
_index._communicator = store->communicator();
+ _index._encoding = store->encoding();
_db.reset(new Db(store->evictor()->dbEnv()->getEnv(), 0));
_db->set_flags(DB_DUP | DB_DUPSORT);
@@ -377,12 +379,13 @@ int
Freeze::IndexI::secondaryKeyCreate(Db* secondary, const Dbt* dbKey,
const Dbt* dbValue, Dbt* result)
{
- Ice::CommunicatorPtr communicator = _store->communicator();
+ const Ice::CommunicatorPtr& communicator = _store->communicator();
+ const Ice::EncodingVersion& encoding = _store->encoding();
ObjectRecord rec;
Byte* first = static_cast<Byte*>(dbValue->get_data());
Value value(first, first + dbValue->get_size());
- ObjectStoreBase::unmarshal(rec, value, communicator);
+ ObjectStoreBase::unmarshal(rec, value, communicator, encoding);
Key bytes;
if(_index.marshalKey(rec.servant, bytes))