Beispiel #1
0
 public void PutRecordCase1(HashDatabase db, Transaction txn)
 {
     byte[] bigArray = new byte[262144];
     for (int i = 0; i < 50; i++)
     {
         if (txn == null)
             db.Put(new DatabaseEntry(BitConverter.GetBytes(i)),
                 new DatabaseEntry(BitConverter.GetBytes(i)));
         else
             db.Put(new DatabaseEntry(BitConverter.GetBytes(i)),
                 new DatabaseEntry(BitConverter.GetBytes(i)), txn);
     }
     for (int i = 50; i < 100; i++)
     {
         if (txn == null)
             db.Put(new DatabaseEntry(bigArray),
                 new DatabaseEntry(bigArray));
         else
             db.Put(new DatabaseEntry(bigArray),
                 new DatabaseEntry(bigArray), txn);
     }
 }