summaryrefslogtreecommitdiff
path: root/src/btree/bt_method.c
diff options
context:
space:
mode:
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;