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/mp/mp_backup.c | |
parent | 7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff) | |
download | berkeleydb-master.tar.gz |
Diffstat (limited to 'src/mp/mp_backup.c')
-rw-r--r-- | src/mp/mp_backup.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mp/mp_backup.c b/src/mp/mp_backup.c index f376cda7..f1072292 100644 --- a/src/mp/mp_backup.c +++ b/src/mp/mp_backup.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. * * $Id$ */ @@ -145,6 +145,9 @@ __memp_backup_mpf(env, mpf, ip, first_pgno, last_pgno, fp, handle, flags) if (backup == NULL || (len = backup->size) == 0) len = MEGABYTE; + /* Ensure backup page size is at least as big as db page size */ + if (len < mfp->pagesize) + len = mfp->pagesize; if ((ret = __os_malloc(env, len, &buf)) != 0) return (ret); write_size = (u_int32_t)(len / mfp->pagesize); @@ -188,7 +191,7 @@ __memp_backup_mpf(env, mpf, ip, first_pgno, last_pgno, fp, handle, flags) if (backup != NULL && backup->write != NULL) { if ((ret = backup->write( - env->dbenv, gigs, off, (u_int32_t)nr, + env->dbenv, gigs, off, (u_int32_t)nr, buf, handle)) != 0) break; } else { |