summaryrefslogtreecommitdiff
path: root/src/btree/row_key.c
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2013-03-25 22:51:35 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2013-03-25 22:51:35 +1100
commit7b08fda19c283c8af7793e003e690c34bd05a0f2 (patch)
tree0d4b64d24804bcd7b0e8591430093107a6367de3 /src/btree/row_key.c
parent068bd803ba2bb21feae8b7508f69f228b33d07e9 (diff)
parent7d2126b55dc59e093e0f263f21d67932a5265539 (diff)
downloadmongo-7b08fda19c283c8af7793e003e690c34bd05a0f2.tar.gz
Merge branch 'develop' into data-handles
Conflicts: src/btree/bt_evict.c src/btree/bt_handle.c src/btree/bt_page.c src/btree/rec_evict.c src/conn/conn_dhandle.c src/cursor/cur_stat.c src/include/btree.h src/include/btree.i src/include/stat.h src/lsm/lsm_cursor.c src/schema/schema_create.c src/txn/txn_ckpt.c
Diffstat (limited to 'src/btree/row_key.c')
-rw-r--r--src/btree/row_key.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/btree/row_key.c b/src/btree/row_key.c
index 043cbace5ee..1142bffbdcc 100644
--- a/src/btree/row_key.c
+++ b/src/btree/row_key.c
@@ -309,7 +309,7 @@ next: switch (direction) {
/* If still needed, instantiate the key. */
key = WT_ROW_KEY_COPY(rip_arg);
if (!__wt_off_page(page, key)) {
- WT_ERR(__wt_row_ikey_alloc(session,
+ WT_ERR(__wt_row_ikey(session,
WT_PAGE_DISK_OFFSET(page, key),
retb->data, retb->size, &ikey));
@@ -380,11 +380,27 @@ __wt_row_value(WT_PAGE *page, WT_ROW *rip)
}
/*
- * __wt_row_ikey_alloc --
+ * __wt_row_ikey_incr --
+ * Instantiate a key in a WT_IKEY structure and increment the page's
+ * memory footprint.
+ */
+int
+__wt_row_ikey_incr(WT_SESSION_IMPL *session, WT_PAGE *page,
+ uint32_t cell_offset, const void *key, uint32_t size, void *ikeyp)
+{
+ WT_RET(__wt_row_ikey(session, cell_offset, key, size, ikeyp));
+
+ __wt_cache_page_inmem_incr(session, page, sizeof(WT_IKEY) + size);
+
+ return (0);
+}
+
+/*
+ * __wt_row_ikey --
* Instantiate a key in a WT_IKEY structure.
*/
int
-__wt_row_ikey_alloc(WT_SESSION_IMPL *session,
+__wt_row_ikey(WT_SESSION_IMPL *session,
uint32_t cell_offset, const void *key, uint32_t size, void *ikeyp)
{
WT_IKEY *ikey;