85b59a
Author: Filip Januš <fjanus@redhat.com>
85b59a
Date: 6 Sep 2021
85b59a
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1992402
85b59a
Patch was created based on the discussion in the previous link
85b59a
diff -ur db-5.3.28/src/os/os_map.c db_patch/src/os/os_map.c
85b59a
--- db-5.3.28/src/os/os_map.c	2013-09-09 17:35:09.000000000 +0200
85b59a
+++ db_patch/src/os/os_map.c	2021-09-09 07:33:12.027328265 +0200
85b59a
@@ -213,7 +213,10 @@
85b59a
 	if (rp->max < rp->size)
85b59a
 		rp->max = rp->size;
85b59a
 	if (ret == 0 && F_ISSET(infop, REGION_CREATE)) {
85b59a
-		if (F_ISSET(dbenv, DB_ENV_REGION_INIT))
85b59a
+
85b59a
+		rp->size = rp->max;
85b59a
+
85b59a
+        if (F_ISSET(dbenv, DB_ENV_REGION_INIT))
85b59a
 			ret = __db_file_write(env, infop->fhp,
85b59a
 			    rp->size / MEGABYTE, rp->size % MEGABYTE, 0x00);
85b59a
 		else