helly Mon Nov 11 07:00:59 2002 EDT
Modified files:
/php4/ext/dba/tests dba_handler.inc test.inc
Log:
-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
Index: php4/ext/dba/tests/dba_handler.inc
diff -u php4/ext/dba/tests/dba_handler.inc:1.6 php4/ext/dba/tests/dba_handler.inc:1.7
--- php4/ext/dba/tests/dba_handler.inc:1.6 Sun Nov 10 17:56:29 2002
+++ php4/ext/dba/tests/dba_handler.inc Mon Nov 11 07:00:58 2002
@@ -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";
Index: php4/ext/dba/tests/test.inc
diff -u php4/ext/dba/tests/test.inc:1.6 php4/ext/dba/tests/test.inc:1.7
--- php4/ext/dba/tests/test.inc:1.6 Sun Nov 10 17:56:29 2002
+++ php4/ext/dba/tests/test.inc Mon Nov 11 07:00:58 2002
@@ -11,4 +11,6 @@
$handler = $handler[0];
}
$lock_flag = 'l';
+ @unlink($db_filename);
+ @unlink($db_filename.'.lck');
?>
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php