diff --git a/table/table_test.cc b/table/table_test.cc index abaf5ee91..0a84f2750 100644 --- a/table/table_test.cc +++ b/table/table_test.cc @@ -1260,8 +1260,9 @@ TEST_F(BlockBasedTableTest, NoopTransformSeek) { std::vector keys; stl_wrappers::KVMap kvmap; const ImmutableCFOptions ioptions(options); - c.Finish(options, ioptions, table_options, - InternalKeyComparator(options.comparator), &keys, &kvmap); + const InternalKeyComparator internal_comparator(options.comparator); + c.Finish(options, ioptions, table_options, internal_comparator, &keys, + &kvmap); auto* reader = c.GetTableReader(); for (int i = 0; i < 2; ++i) {