summaryrefslogtreecommitdiff
path: root/src/mp/mp_backup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mp/mp_backup.c')
-rw-r--r--src/mp/mp_backup.c7
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 {