summaryrefslogtreecommitdiff
path: root/src/btree/bt_delete.c
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-02-17 17:25:57 +0000
committer <>2015-03-17 16:26:24 +0000
commit780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch)
tree598f8b9fa431b228d29897e798de4ac0c1d3d970 /src/btree/bt_delete.c
parent7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff)
downloadberkeleydb-master.tar.gz
Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz.HEADdb-6.1.23master
Diffstat (limited to 'src/btree/bt_delete.c')
-rw-r--r--src/btree/bt_delete.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/btree/bt_delete.c b/src/btree/bt_delete.c
index 37496b3f..a1ccef71 100644
--- a/src/btree/bt_delete.c
+++ b/src/btree/bt_delete.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.
*/
/*
* Copyright (c) 1990, 1993, 1994, 1995, 1996
@@ -61,15 +61,18 @@ __bam_ditem(dbc, h, indx)
PAGE *h;
u_int32_t indx;
{
+ BBLOB bl;
BINTERNAL *bi;
BKEYDATA *bk;
DB *dbp;
+ db_seq_t blob_id;
u_int32_t nbytes;
int ret;
db_indx_t *inp;
dbp = dbc->dbp;
inp = P_INP(dbp, h);
+ ret = 0;
/* The page should already have been dirtied by our caller. */
DB_ASSERT(dbp->env, IS_DIRTY(h));
@@ -139,6 +142,13 @@ __bam_ditem(dbc, h, indx)
dbc, (GET_BOVERFLOW(dbp, h, indx))->pgno)) != 0)
return (ret);
break;
+ case B_BLOB:
+ nbytes = BBLOB_SIZE;
+ memcpy(&bl, bk, BBLOB_SIZE);
+ blob_id = (db_seq_t)bl.id;
+ if ((ret = __blob_del(dbc, blob_id)) != 0)
+ return (ret);
+ break;
case B_KEYDATA:
nbytes = BKEYDATA_SIZE(bk->len);
break;
@@ -241,7 +251,7 @@ __bam_dpages(dbc, use_top, flags)
* single item deleted, and the rest of the pages are to be removed.
*
* Recno always has a stack to the root and __bam_merge operations
- * may have unneeded items in the sack. We find the lowest page
+ * may have unneeded items in the stack. We find the lowest page
* in the stack that has more than one record in it and start there.
*/
ret = 0;
@@ -493,7 +503,9 @@ stop: done = 1;
/*
* __bam_pupdate --
- * Update parent key pointers up the tree.
+ * Update parent key pointers up the tree after putting a new key
+ * at the start of a leaf page.
+ *
*
* PUBLIC: int __bam_pupdate __P((DBC *, PAGE *));
*/