From 780b92ada9afcf1d58085a83a0b9e6bc982203d1 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 17 Feb 2015 17:25:57 +0000 Subject: Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz. --- src/btree/bt_method.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'src/btree/bt_method.c') 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; -- cgit v1.2.1