summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2021-12-30 15:53:23 +1100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-12-30 05:17:45 +0000
commitc636b1e71274ae651808b9957c3b7f22f0d4b222 (patch)
tree306d789079338f684055f2ff6c42586e17774592 /src/third_party/wiredtiger/src
parent23166382f8f7d7c9ed322e590e5020d37a29b540 (diff)
downloadmongo-c636b1e71274ae651808b9957c3b7f22f0d4b222.tar.gz
Import wiredtiger: 562f6d57d38b218c7a5c12e8ddee39a87df71b03 from branch mongodb-master
ref: aab21d5814..562f6d57d3 for: 5.3.0 WT-8609 Return an error if there's an attempt to prepare a logged object rather than asserting
Diffstat (limited to 'src/third_party/wiredtiger/src')
-rw-r--r--src/third_party/wiredtiger/src/txn/txn.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/third_party/wiredtiger/src/txn/txn.c b/src/third_party/wiredtiger/src/txn/txn.c
index b27ff605759..5f136e22783 100644
--- a/src/third_party/wiredtiger/src/txn/txn.c
+++ b/src/third_party/wiredtiger/src/txn/txn.c
@@ -1966,10 +1966,8 @@ __wt_txn_prepare(WT_SESSION_IMPL *session, const char *cfg[])
* A transaction should not have updated any of the logged tables, if debug mode logging is not
* turned on.
*/
- if (!FLD_ISSET(S2C(session)->log_flags, WT_CONN_LOG_DEBUG_MODE))
- WT_RET_ASSERT(session, txn->logrec == NULL, EINVAL,
- "A transaction should not have been assigned a log record if WT_CONN_LOG_DEBUG mode is "
- "not enabled");
+ if (txn->logrec != NULL && !FLD_ISSET(S2C(session)->log_flags, WT_CONN_LOG_DEBUG_MODE))
+ WT_RET_MSG(session, EINVAL, "a prepared transaction cannot include a logged table");
/* Set the prepare timestamp. */
WT_RET(__wt_txn_set_timestamp(session, cfg));