summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChenhao Qu <chenhao.qu@mongodb.com>2022-09-14 14:54:58 +1000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-09-14 05:37:18 +0000
commit28633300cb9cc7df249dc304845b91aa7e6003b7 (patch)
treec913d82de93b3bdd3ede74c87963ac71db943897
parent93753affa5367c5544767b3cfc971ec2bd6eb2c1 (diff)
downloadmongo-28633300cb9cc7df249dc304845b91aa7e6003b7.tar.gz
Import wiredtiger: daa82cae33d1c4454cd66b356bcf5ab79147b811 from branch mongodb-master
ref: 1e9c299068..daa82cae33 for: 6.2.0-rc0 WT-8931 Changed the values of columns in a ComplexDataSet so they are not ordered. (#8257)
-rw-r--r--src/third_party/wiredtiger/import.data2
-rwxr-xr-xsrc/third_party/wiredtiger/test/suite/test_jsondump01.py3
-rwxr-xr-xsrc/third_party/wiredtiger/test/suite/wtdataset.py14
3 files changed, 13 insertions, 6 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 79908858691..2d2b9ee7ed9 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": "1e9c2990684bd7ad967539f1c2b650f73fa95664"
+ "commit": "daa82cae33d1c4454cd66b356bcf5ab79147b811"
}
diff --git a/src/third_party/wiredtiger/test/suite/test_jsondump01.py b/src/third_party/wiredtiger/test/suite/test_jsondump01.py
index 1f540dfb039..c115227c1bb 100755
--- a/src/third_party/wiredtiger/test/suite/test_jsondump01.py
+++ b/src/third_party/wiredtiger/test/suite/test_jsondump01.py
@@ -116,7 +116,8 @@ class test_jsondump01(wttest.WiredTigerTestCase, suite_subprocess):
data = tables[uri][1]["data"]
d = data[24]
if 'column5' in d:
- self.assertEqual(d['column5'], '25: abcde')
+ self.assertEqual(d['column2'], '52: abcdefghijklmnopqrstuvw')
+ self.assertEqual(d['column3'], 52)
else:
self.assertEqual(d['value0'], '25: abcdefghijklmnopqrstuvwxyz')
diff --git a/src/third_party/wiredtiger/test/suite/wtdataset.py b/src/third_party/wiredtiger/test/suite/wtdataset.py
index d3a2cc21d79..0bc82571818 100755
--- a/src/third_party/wiredtiger/test/suite/wtdataset.py
+++ b/src/third_party/wiredtiger/test/suite/wtdataset.py
@@ -286,10 +286,16 @@ class ComplexDataSet(BaseDataSet):
# A value suitable for checking the value returned by a cursor, as
# cursor.get_value() returns a list.
def comparable_value(self, i):
- return [str(i) + ': abcdefghijklmnopqrstuvwxyz'[0:i%26],
- i,
- str(i) + ': abcdefghijklmnopqrstuvwxyz'[0:i%23],
- str(i) + ': abcdefghijklmnopqrstuvwxyz'[0:i%18]]
+ # Most of these columns are the keys for indices. To make sure our indices
+ # are ordered in a different order than the main btree, we'll reverse some
+ # decimal strings to produce the column values.
+ reversed = str(i)[::-1]
+ reversed18 = str(i*18)[::-1]
+ reversed23 = str(i*23)[::-1]
+ return [reversed + ': abcdefghijklmnopqrstuvwxyz'[0:i%26], # column2
+ int(reversed), # column3
+ reversed23 + ': abcdefghijklmnopqrstuvwxyz'[0:i%23], # column4
+ reversed18 + ': abcdefghijklmnopqrstuvwxyz'[0:i%18]] # column5
# A value suitable for assigning to a cursor, as cursor.set_value() expects
# a tuple when it is used with a single argument and the value is composite.