diff options
author | Luke Chen <luke.chen@mongodb.com> | 2019-01-07 13:43:42 +1100 |
---|---|---|
committer | Luke Chen <luke.chen@mongodb.com> | 2019-01-07 13:43:42 +1100 |
commit | 678c4c661d1a79e308baa21f21ead1a784bf6a27 (patch) | |
tree | b4005613113212cfcf5d4e432611c3d3e48c68ea /src/third_party | |
parent | b734df99416b073b5cdf7f2213e29ce1c9fb7a89 (diff) | |
download | mongo-678c4c661d1a79e308baa21f21ead1a784bf6a27.tar.gz |
Import wiredtiger: 86012f8e40636cd602188ba7cf3a4724624bfa53 from branch mongodb-4.2
ref: e6c1b9724e..86012f8e40
for: 4.1.7
WT-4510 Failure when verifying internal pages of older version data files
WT-4519 test/format RNG no longer random
Diffstat (limited to 'src/third_party')
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/include/cell.i | 11 | ||||
-rw-r--r-- | src/third_party/wiredtiger/test/format/format.h | 2 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index a08bdd38a69..492e436224c 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -1,5 +1,5 @@ { - "commit": "e6c1b9724ed6ed2879a36d7e140f4fa9daceb261", + "commit": "86012f8e40636cd602188ba7cf3a4724624bfa53", "github": "wiredtiger/wiredtiger.git", "vendor": "wiredtiger", "branch": "mongodb-4.2" diff --git a/src/third_party/wiredtiger/src/include/cell.i b/src/third_party/wiredtiger/src/include/cell.i index 94e50ae7917..f9d5b576d1f 100644 --- a/src/third_party/wiredtiger/src/include/cell.i +++ b/src/third_party/wiredtiger/src/include/cell.i @@ -622,6 +622,15 @@ __wt_cell_unpack_safe(const WT_PAGE_HEADER *dsk, return (WT_ERROR); \ } while (0) + /* + * NB: when unpacking a WT_CELL_VALUE_COPY cell, unpack.cell is returned + * as the original cell, not the copied cell (in other words, data from + * the copied cell must be available from unpack after we return, as our + * caller has no way to find the copied cell. + */ + WT_CELL_LEN_CHK(cell, 0); + unpack->cell = cell; + restart: /* * This path is performance critical for read-only trees, we're parsing @@ -630,8 +639,6 @@ restart: * initialize all structure elements either here or in the immediately * following switch. */ - WT_CELL_LEN_CHK(cell, 0); - unpack->cell = cell; unpack->v = 0; unpack->start_ts = WT_TS_NONE; unpack->stop_ts = WT_TS_MAX; diff --git a/src/third_party/wiredtiger/test/format/format.h b/src/third_party/wiredtiger/test/format/format.h index 4b8eadeea1d..6df45627462 100644 --- a/src/third_party/wiredtiger/test/format/format.h +++ b/src/third_party/wiredtiger/test/format/format.h @@ -381,7 +381,7 @@ mmrand(WT_RAND_STATE *rnd, u_int min, u_int max) * Test runs with small row counts can easily pass a max of 0 (for * example, "g.rows / 20"). Avoid the problem. */ - if (min <= max) + if (max <= min) return (min); v = rng(rnd); |