Skip to content

Commit 77f1e10

Browse files
committed
Diagnostic: actually CALL high-slot UDFs to test bridge dispatch
1 parent da141f1 commit 77f1e10

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

.github/workflows/phpunit-tests-turso.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -756,29 +756,32 @@ jobs:
756756
$log('[d] EXC ' . $e->getMessage());
757757
}
758758
759-
// 4) Register many to see if limit matters.
759+
// 4) Register 50 and CALL each — not just registration. Turso's
760+
// pre-generated bridges used to be capped at 32 slots; we
761+
// expanded to 64, but need to verify slots 32+ actually dispatch.
760762
try {
761-
for ($i = 0; $i < 40; $i++) {
762-
$pdo->createFunction("fn_{$i}", function () { return 1; });
763-
if ($i === 30 || $i === 31 || $i === 32 || $i === 33 || $i === 39) {
764-
$log("[e.{$i}] registered fn_{$i}");
765-
}
763+
for ($i = 0; $i < 50; $i++) {
764+
$pdo->createFunction("fn_{$i}", function () use ($i) { return "v$i"; });
765+
}
766+
$log('[e] registered 50 UDFs ok');
767+
foreach ([0, 31, 32, 33, 49] as $i) {
768+
$r = $pdo->query("SELECT fn_{$i}() AS v")->fetch(PDO::FETCH_ASSOC);
769+
$log("[e.call {$i}] " . json_encode($r));
766770
}
767-
$log('[e] bulk registration ok');
768771
} catch (\Throwable $e) {
769-
$log('[e] EXC at N=' . ($i ?? '?') . ': ' . $e->getMessage());
772+
$log('[e] EXC: ' . $e->getMessage());
770773
}
771774
772775
$log('[done] script finished cleanly');
773776
PHP
774777
775-
gdb -batch \
778+
timeout --kill-after=5 60 gdb -batch \
776779
-ex "set confirm off" \
777780
-ex "set pagination off" \
778781
-ex "set environment LD_PRELOAD=$PRELOAD" \
779782
-ex "run /tmp/diag.php" \
780783
-ex "bt" \
781-
--args "$(command -v php)"
784+
--args "$(command -v php)" || true
782785
783786
- name: Run PHPUnit tests against Turso DB
784787
env:

0 commit comments

Comments
 (0)