summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/examples
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2018-11-02 16:36:36 +1100
committerLuke Chen <luke.chen@mongodb.com>2018-11-02 16:36:36 +1100
commita19da30a1bf7462c9a8a0533c43f98bd13fbb190 (patch)
tree090e8225ea84e4971a077dd26dadf3c61068bf33 /src/third_party/wiredtiger/examples
parent1559bd33d108e58ffdc0df5fa2af4cc163ae9721 (diff)
downloadmongo-a19da30a1bf7462c9a8a0533c43f98bd13fbb190.tar.gz
Import wiredtiger: e8cf194d813096cc2b30c0dd2d9d9c93ade79756 from branch mongodb-4.2
ref: 22b1224ee0..e8cf194d81 for: 4.1.5 WT-4298 Fix workgen to retry on WT_ROLLBACK and clear ops after warmup WT-4343 Unlock when sleeping to allow other log threads to make progress WT-4371 Workgen improvements to create a MongoDB-like workload WT-4376 Fix a bug where table index open can race WT-4385 Prepare-conflict during a cursor scan can return the wrong key WT-4392 A large lint change WT-4395 Seg fault walking corrupted log with log cursor WT-4396 When retrying after prepare-conflict, cursor unable to find a valid update WT-4400 Fix workgen use of PRIxxx macros, needed for old C++ compilers
Diffstat (limited to 'src/third_party/wiredtiger/examples')
-rw-r--r--src/third_party/wiredtiger/examples/c/ex_all.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/examples/c/ex_all.c b/src/third_party/wiredtiger/examples/c/ex_all.c
index 190c2c421d3..6b2976f11c3 100644
--- a/src/third_party/wiredtiger/examples/c/ex_all.c
+++ b/src/third_party/wiredtiger/examples/c/ex_all.c
@@ -331,6 +331,8 @@ cursor_ops(WT_SESSION *session)
error_check(cursor->insert(cursor));
}
+ /* Modify requires an explicit transaction. */
+ error_check(session->begin_transaction(session, NULL));
{
/*! [Modify an existing record] */
WT_MODIFY entries[3];
@@ -361,6 +363,7 @@ cursor_ops(WT_SESSION *session)
error_check(cursor->modify(cursor, entries, 3));
/*! [Modify an existing record] */
}
+ error_check(session->commit_transaction(session, NULL));
{
/*! [Update an existing record or insert a new record] */