@ -12,6 +12,7 @@
# include "include/org_rocksdb_WriteBatchTest.h"
# include "include/org_rocksdb_WriteBatchTest.h"
# include "rocksjni/portal.h"
# include "rocksjni/portal.h"
# include "rocksdb/db.h"
# include "rocksdb/db.h"
# include "rocksdb/immutable_options.h"
# include "db/memtable.h"
# include "db/memtable.h"
# include "rocksdb/write_batch.h"
# include "rocksdb/write_batch.h"
# include "db/write_batch_internal.h"
# include "db/write_batch_internal.h"
@ -203,16 +204,18 @@ jbyteArray Java_org_rocksdb_WriteBatchTest_getContents(
auto factory = std : : make_shared < rocksdb : : SkipListFactory > ( ) ;
auto factory = std : : make_shared < rocksdb : : SkipListFactory > ( ) ;
rocksdb : : Options options ;
rocksdb : : Options options ;
options . memtable_factory = factory ;
options . memtable_factory = factory ;
rocksdb : : MemTable * mem = new rocksdb : : MemTable ( cmp , options ) ;
rocksdb : : MemTable * mem = new rocksdb : : MemTable (
cmp , rocksdb : : ImmutableCFOptions ( options ) ,
rocksdb : : MemTableOptions ( options ) ) ;
mem - > Ref ( ) ;
mem - > Ref ( ) ;
std : : string state ;
std : : string state ;
rocksdb : : ColumnFamilyMemTablesDefault cf_mems_default ( mem , & options ) ;
rocksdb : : ColumnFamilyMemTablesDefault cf_mems_default ( mem , & options ) ;
rocksdb : : Status s =
rocksdb : : Status s =
rocksdb : : WriteBatchInternal : : InsertInto ( b , & cf_mems_default ) ;
rocksdb : : WriteBatchInternal : : InsertInto ( b , & cf_mems_default ) ;
int count = 0 ;
int count = 0 ;
Arena arena ;
rocksdb : : Arena arena ;
ScopedArenaIterator iter ( mem - > NewIterator (
rocksdb : : ScopedArenaIterator iter ( mem - > NewIterator (
rocksdb : : ReadOptions ( ) , false /*don't enforce total order*/ , & arena ) ) ;
rocksdb : : ReadOptions ( ) , & arena ) ) ;
for ( iter - > SeekToFirst ( ) ; iter - > Valid ( ) ; iter - > Next ( ) ) {
for ( iter - > SeekToFirst ( ) ; iter - > Valid ( ) ; iter - > Next ( ) ) {
rocksdb : : ParsedInternalKey ikey ;
rocksdb : : ParsedInternalKey ikey ;
memset ( reinterpret_cast < void * > ( & ikey ) , 0 , sizeof ( ikey ) ) ;
memset ( reinterpret_cast < void * > ( & ikey ) , 0 , sizeof ( ikey ) ) ;