summaryrefslogtreecommitdiff
path: root/src/btree/bt_method.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_method.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_method.c')
-rw-r--r--src/btree/bt_method.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/btree/bt_method.c b/src/btree/bt_method.c
index 5cf93d2e..2fb33be2 100644
--- a/src/btree/bt_method.c
+++ b/src/btree/bt_method.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1999, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -15,7 +15,7 @@
static int __bam_set_bt_minkey __P((DB *, u_int32_t));
static int __bam_get_bt_compare
- __P((DB *, int (**)(DB *, const DBT *, const DBT *)));
+ __P((DB *, int (**)(DB *, const DBT *, const DBT *, size_t *)));
static int __bam_get_bt_prefix
__P((DB *, size_t(**)(DB *, const DBT *, const DBT *)));
static int __bam_set_bt_prefix
@@ -233,7 +233,7 @@ incompat:
static int
__bam_get_bt_compare(dbp, funcp)
DB *dbp;
- int (**funcp) __P((DB *, const DBT *, const DBT *));
+ int (**funcp) __P((DB *, const DBT *, const DBT *, size_t *));
{
BTREE *t;
@@ -251,13 +251,13 @@ __bam_get_bt_compare(dbp, funcp)
* __bam_set_bt_compare --
* Set the comparison function.
*
- * PUBLIC: int __bam_set_bt_compare
- * PUBLIC: __P((DB *, int (*)(DB *, const DBT *, const DBT *)));
+ * PUBLIC: int __bam_set_bt_compare __P((DB *,
+ * PUBLIC: int (*)(DB *, const DBT *, const DBT *, size_t *)));
*/
int
__bam_set_bt_compare(dbp, func)
DB *dbp;
- int (*func) __P((DB *, const DBT *, const DBT *));
+ int (*func) __P((DB *, const DBT *, const DBT *, size_t *));
{
BTREE *t;
@@ -351,6 +351,13 @@ __bam_set_bt_compress(dbp, compress, decompress)
return (EINVAL);
}
+ /* Compression is incompatible with blob storage. */
+ if (dbp->blob_threshold > 0) {
+ __db_errx(dbp->env, DB_STR("1198",
+ "compression cannot be used with blobs enabled."));
+ return (EINVAL);
+ }
+
if (compress != 0 && decompress != 0) {
t->bt_compress = compress;
t->bt_decompress = decompress;