diff --git a/src/txn/txn_timestamp.c b/src/txn/txn_timestamp.c index 7ebb848c2..42f2da9b8 100644 --- a/src/txn/txn_timestamp.c +++ b/src/txn/txn_timestamp.c @@ -547,6 +547,14 @@ __wt_txn_validate_commit_timestamp(WT_SESSION_IMPL *session, wt_timestamp_t *com * to roundup timestamps of a prepared transaction, then we will roundup the commit * timestamp to the prepare timestamp of the transaction. */ + + if (commit_ts != txn->first_commit_timestamp && txn->first_commit_timestamp != 0){ + WT_RET_MSG( + session, EINVAL, "cannot set multiple commit timestamps for prepared transactions, commit timestamp %s, first commit timestamp %s.", + __wt_timestamp_to_string(commit_ts, ts_string[0]), + __wt_timestamp_to_string(txn->first_commit_timestamp, ts_string[1]) ); + } + if (txn->prepare_timestamp > commit_ts) { if (!F_ISSET(txn, WT_TXN_TS_ROUND_PREPARED)) WT_RET_MSG(session, EINVAL,