diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-02-17 17:25:57 +0000 |
---|---|---|
committer | <> | 2015-03-17 16:26:24 +0000 |
commit | 780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch) | |
tree | 598f8b9fa431b228d29897e798de4ac0c1d3d970 /src/btree/bt_method.c | |
parent | 7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff) | |
download | berkeleydb-master.tar.gz |
Diffstat (limited to 'src/btree/bt_method.c')
-rw-r--r-- | src/btree/bt_method.c | 19 |
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; |