summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2002-11-11 12:00:58 +0000
committerMarcus Boerger <helly@php.net>2002-11-11 12:00:58 +0000
commitdcc7fc16b6b5e546290001b798ddc1bcf3492f8f (patch)
tree18c414970ff007cdd8574b3d47f3744e75532481 /ext
parent1cb7dc21666d833533626bc994075e573dde4115 (diff)
downloadphp-git-dcc7fc16b6b5e546290001b798ddc1bcf3492f8f.tar.gz
-Precondiftion: no open files
-do not show warning from dba_open call for read during write # Interesting is that on some systems read during write is permitted... # I will change the tests as soon as i find a way to have this equal on all # systems
Diffstat (limited to 'ext')
-rw-r--r--ext/dba/tests/dba_handler.inc3
-rw-r--r--ext/dba/tests/test.inc2
2 files changed, 3 insertions, 2 deletions
diff --git a/ext/dba/tests/dba_handler.inc b/ext/dba/tests/dba_handler.inc
index 98048bb7c0..5690075fab 100644
--- a/ext/dba/tests/dba_handler.inc
+++ b/ext/dba/tests/dba_handler.inc
@@ -1,6 +1,5 @@
<?php
echo "database handler: $handler\n";
- @unlink($db_filename);
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);
@@ -28,7 +27,7 @@
echo "Error creating database\n";
}
$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) {
+ 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";
diff --git a/ext/dba/tests/test.inc b/ext/dba/tests/test.inc
index bd617bc8d6..e280226f68 100644
--- a/ext/dba/tests/test.inc
+++ b/ext/dba/tests/test.inc
@@ -11,4 +11,6 @@
$handler = $handler[0];
}
$lock_flag = 'l';
+ @unlink($db_filename);
+ @unlink($db_filename.'.lck');
?>