b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | Author: Filip Januลก <fjanus@redhat.com> |
| 2 | Date: 6 Sep 2021 |
| 3 | Related: https://bugzilla.redhat.com/show_bug.cgi?id=1992402 |
| 4 | Patch was created based on the discussion in the previous link |
| 5 | --- a/src/os/os_map.c |
| 6 | +++ b/src/os/os_map.c |
| 7 | @@ -213,7 +213,10 @@ __os_attach(env, infop, rp) |
| 8 | if (rp->max < rp->size) |
| 9 | rp->max = rp->size; |
| 10 | if (ret == 0 && F_ISSET(infop, REGION_CREATE)) { |
| 11 | - if (F_ISSET(dbenv, DB_ENV_REGION_INIT)) |
| 12 | + |
| 13 | + rp->size = rp->max; |
| 14 | + |
| 15 | + if (F_ISSET(dbenv, DB_ENV_REGION_INIT)) |
| 16 | ret = __db_file_write(env, infop->fhp, |
| 17 | rp->size / MEGABYTE, rp->size % MEGABYTE, 0x00); |
| 18 | else |