diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2005-12-20 15:26:45 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2005-12-20 15:26:45 +0000 |
| commit | d508cfee49746c1e2ef89ee72eaf4890661712ac (patch) | |
| tree | 4be59106c1796789d25995d5c69515e3e7552b62 /ext/sqlite/tests | |
| parent | cf2e00bb39fc3156b494897a22363aec202fdd01 (diff) | |
| download | php-git-d508cfee49746c1e2ef89ee72eaf4890661712ac.tar.gz | |
MFB51:
Updated libsqlite in ext/sqlite to 2.8.17.
Use in-memory database for tests.
Diffstat (limited to 'ext/sqlite/tests')
| -rw-r--r-- | ext/sqlite/tests/blankdb.inc | 16 | ||||
| -rwxr-xr-x | ext/sqlite/tests/blankdb_oo.inc | 10 |
2 files changed, 2 insertions, 24 deletions
diff --git a/ext/sqlite/tests/blankdb.inc b/ext/sqlite/tests/blankdb.inc index 43c6ff3582..5ca4841176 100644 --- a/ext/sqlite/tests/blankdb.inc +++ b/ext/sqlite/tests/blankdb.inc @@ -1,17 +1,3 @@ <?php #vim:ft=php -$dbname = tempnam(dirname(__FILE__), "phpsql"); -function cleanup() { - $retry = 10; - - if (is_resource($GLOBALS['db'])) { - @sqlite_close($GLOBALS['db']); - } - do { - usleep(500000); - if (@unlink($GLOBALS['dbname'])) - break; - } while (file_exists($GLOBALS['dbname']) && --$retry); -} -register_shutdown_function("cleanup"); -$db = sqlite_open($dbname); +$db = sqlite_open(":memory:"); ?> diff --git a/ext/sqlite/tests/blankdb_oo.inc b/ext/sqlite/tests/blankdb_oo.inc index 3bbf4fd0b3..1139d17c8b 100755 --- a/ext/sqlite/tests/blankdb_oo.inc +++ b/ext/sqlite/tests/blankdb_oo.inc @@ -1,11 +1,3 @@ <?php #vim:ft=php -$dbname = tempnam(dirname(__FILE__), "phpsql"); -function cleanup() { - global $db, $dbname; - $db = NULL; - usleep(500000); - @unlink($dbname); -} -register_shutdown_function("cleanup"); -$db = new SQLiteDatabase($dbname); +$db = new SQLiteDatabase(":memory:"); ?> |
