summaryrefslogtreecommitdiff
path: root/ext/dba/dba_db4.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dba/dba_db4.c')
-rw-r--r--ext/dba/dba_db4.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/dba/dba_db4.c b/ext/dba/dba_db4.c
index 6dee094832..93ec4bc235 100644
--- a/ext/dba/dba_db4.c
+++ b/ext/dba/dba_db4.c
@@ -77,14 +77,15 @@ DBA_OPEN_FUNC(db4)
info->mode == DBA_WRITER ? 0 :
info->mode == DBA_TRUNC ? DB_CREATE | DB_TRUNCATE : -1;
- if (info->flags & DBA_PERSISTENT) {
- gmode |= DB_THREAD;
- }
-
if (gmode == -1) {
return FAILURE; /* not possible */
}
+ gmode |= DB_INIT_LOCK;
+ if (info->flags & DBA_PERSISTENT) {
+ gmode |= DB_THREAD;
+ }
+
if (info->argc > 0) {
convert_to_long_ex(info->argv[0]);
filemode = Z_LVAL_PP(info->argv[0]);