summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/tests/bug70221.phpt
blob: aa9d4ee8e21c9f0e044bf91930bbb9e4ad243c13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
Bug #70221 (persistent sqlite connection + custom function segfaults)
--SKIPIF--
<?php
if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
?>
--FILE--
<?php
$dbfile = __DIR__ . '/test.sqlite';
$db = new PDO('sqlite:'.$dbfile, null, null, array(PDO::ATTR_PERSISTENT => true));
function _test() { return 42; }
$db->sqliteCreateFunction('test', '_test', 0);
print("Everything is fine, no exceptions here\n");
unset($db);
?>
--CLEAN--
<?php
$dbfile = __DIR__ . '/test.sqlite';
unlink($dbfile);
?>
--EXPECT--
Everything is fine, no exceptions here