From db1f0cddf372678381fe7ccb034f6a9b6c6a598d Mon Sep 17 00:00:00 2001 From: Deon Nicholas Date: Wed, 5 Jun 2013 17:25:16 -0700 Subject: [PATCH] Fixed valgrind errors --- db/db_test.cc | 2 +- utilities/merge_operators/string_append/stringappend_test.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/db/db_test.cc b/db/db_test.cc index ed8cbaa463..62da02171d 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -3232,7 +3232,7 @@ TEST(DBTest, MultiGetSimple) { keys[2] = "k3"; keys[3] = "k4"; keys[4] = "k5"; - keys[6] = "no_key"; + keys[5] = "no_key"; std::vector values(20,"Temporary data to be overwritten"); diff --git a/utilities/merge_operators/string_append/stringappend_test.cc b/utilities/merge_operators/string_append/stringappend_test.cc index 2c01659cf8..34782f02ae 100644 --- a/utilities/merge_operators/string_append/stringappend_test.cc +++ b/utilities/merge_operators/string_append/stringappend_test.cc @@ -291,10 +291,9 @@ TEST(StringAppendOperatorTest,BIGRandomMixGetAppend) { TEST(StringAppendOperatorTest,PersistentVariousKeys) { DestroyDB(kDbName, Options()); // Start this test with a fresh DB - StringAppendOperator append_op('\n'); - // Perform the following operations in limited scope { + StringAppendOperator append_op('\n'); auto db = OpenDb(&append_op); StringLists slists(db); @@ -318,6 +317,7 @@ TEST(StringAppendOperatorTest,PersistentVariousKeys) { // Reopen the database (the previous changes should persist / be remembered) { + StringAppendOperator append_op('\n'); auto db = OpenDb(&append_op); StringLists slists(db);