diff options
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/cursor/cur_std.c | 3 | ||||
-rw-r--r-- | src/third_party/wiredtiger/test/suite/test_cursor_bound01.py | 6 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 168bf427b5d..7a828be921c 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "3eb558c3abf568c34995bb387da6fa087ce53523" + "commit": "28d772e6b8433274a5b2d506baca68a69b29a0bd" } diff --git a/src/third_party/wiredtiger/src/cursor/cur_std.c b/src/third_party/wiredtiger/src/cursor/cur_std.c index 239ec5ce18e..4cbcd1c614f 100644 --- a/src/third_party/wiredtiger/src/cursor/cur_std.c +++ b/src/third_party/wiredtiger/src/cursor/cur_std.c @@ -1139,6 +1139,9 @@ __wt_cursor_largest_key(WT_CURSOR *cursor) key_only = F_ISSET(cursor, WT_CURSTD_KEY_ONLY); CURSOR_API_CALL(cursor, session, largest_key, CUR2BT(cbt)); + if (WT_CURSOR_BOUNDS_SET(cursor)) + WT_ERR_MSG(session, EINVAL, "cursor largest key is not compatible with bounded cursors"); + WT_ERR(__wt_scr_alloc(session, 0, &key)); /* Reset the cursor to give up the cursor position. */ diff --git a/src/third_party/wiredtiger/test/suite/test_cursor_bound01.py b/src/third_party/wiredtiger/test/suite/test_cursor_bound01.py index d45ebe186f1..657a05f46e5 100644 --- a/src/third_party/wiredtiger/test/suite/test_cursor_bound01.py +++ b/src/third_party/wiredtiger/test/suite/test_cursor_bound01.py @@ -110,5 +110,11 @@ class test_cursor_bound01(bound_base): cursor.bound("action=clear,bound=lower") cursor.bound("action=clear,bound=upper") + # Check that largest key doesn't work with bounded cursors. + cursor.set_key(self.gen_key(1)) + cursor.bound("bound=lower") + self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: cursor.largest_key(), + '/Invalid argument/') + if __name__ == '__main__': wttest.run() |