Download src/php/php-src/ext/pdo_sqlite/tests/gh13998.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 511 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pdo_sqlite/tests/gh13998.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pdo_sqlite/tests/gh13998.phpt
-
curl -L -o gh13998.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pdo_sqlite/tests/gh13998.phpt
511 Bytes
| --TEST-- | |
| Fix GH-13998: Manage refcount of agg_context->val correctly | |
| --EXTENSIONS-- | |
| pdo_sqlite | |
| --FILE-- | |
| $step = function () { | |
| throw new Exception(); | |
| }; | |
| $finalize = function () { | |
| }; | |
| $db = new PDO('sqlite::memory:'); | |
| $db->query('CREATE TABLE test (a int, b int)'); | |
| $stmt = $db->query('INSERT INTO test VALUES (1, 1), (2, 2), (3, 3)'); | |
| $db->sqliteCreateAggregate('S', $step, $finalize, 1); | |
| try { | |
| $db->query('SELECT S(a) FROM test'); | |
| } catch (Exception $e) { | |
| echo 'done!'; | |
| } | |
| --EXPECT-- | |
| done! | |