summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/dba/tests/dba_gdbm.phpt1
-rw-r--r--ext/dba/tests/dba_handler.inc8
-rw-r--r--ext/dba/tests/test.inc1
3 files changed, 6 insertions, 4 deletions
diff --git a/ext/dba/tests/dba_gdbm.phpt b/ext/dba/tests/dba_gdbm.phpt
index 79b41dadea..11e267d650 100644
--- a/ext/dba/tests/dba_gdbm.phpt
+++ b/ext/dba/tests/dba_gdbm.phpt
@@ -9,6 +9,7 @@ DBA GDBM handler test
<?php
require_once('test.inc');
$handler = 'gdbm';
+ $lock_flag = ''; // lock in library
require_once('dba_handler.inc');
?>
--EXPECT--
diff --git a/ext/dba/tests/dba_handler.inc b/ext/dba/tests/dba_handler.inc
index acc8dd4e2a..98048bb7c0 100644
--- a/ext/dba/tests/dba_handler.inc
+++ b/ext/dba/tests/dba_handler.inc
@@ -1,7 +1,7 @@
<?php
echo "database handler: $handler\n";
@unlink($db_filename);
- if (($db_file = @dba_open($db_filename, "nl", $handler))!==FALSE) {
+ if (($db_file = dba_open($db_filename, 'n'.$lock_flag, $handler))!==FALSE) {
dba_insert("key1", "Content String 1", $db_file);
dba_insert("key2", "Content String 2", $db_file);
dba_insert("key3", "Third Content String", $db_file);
@@ -27,8 +27,8 @@
} else {
echo "Error creating database\n";
}
- $db_writer = @dba_open($db_filename, "wl", $handler);
- if (($dba_reader = @dba_open($db_filename, "rlt", $handler))===false) {
+ $db_writer = dba_open($db_filename, 'w'.$lock_flag, $handler);
+ if (($dba_reader = dba_open($db_filename, 'r'.$lock_flag.($lock_flag ? 't' : ''), $handler))===false) {
echo "Cannot read during write operation\n";
} else {
echo "Read during write permitted\n";
@@ -44,7 +44,7 @@
} else {
die("Error reopening database\n");
}
- if (($db_file = @dba_open($db_filename, "rd", $handler))!==FALSE) {
+ if (($db_file = dba_open($db_filename, 'r'.$lock_flag, $handler))!==FALSE) {
$key = dba_firstkey($db_file);
$res = array();
while($key) {
diff --git a/ext/dba/tests/test.inc b/ext/dba/tests/test.inc
index 0f920838ce..bd617bc8d6 100644
--- a/ext/dba/tests/test.inc
+++ b/ext/dba/tests/test.inc
@@ -10,4 +10,5 @@
} else {
$handler = $handler[0];
}
+ $lock_flag = 'l';
?>