Skip to content

Stdlib: SQLite3Stmt bindParam/getSQL/readOnly + named binds (#19854) - #19858

Merged
PurHur merged 2 commits into
masterfrom
agent/issue-19854-sqlite3-stmt-rest
Jul 17, 2026
Merged

PurHur merged 2 commits into
masterfrom
agent/issue-19854-sqlite3-stmt-rest

Conversation

@PurHur

@PurHur PurHur commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #19854

php-src reference

  • ext/sqlite3/sqlite3.c — bindParam/bindValue, getSQL, readOnly, columnType
  • ext/sqlite3/sqlite3.stub.php

PHP implementation

  • ext/sqlite3/VmSQLite3Stmt.php, VmSQLite3Result.php, VmSqlite3Native.php
  • lib/BuiltinByRefParams.php — sqlite3stmt::bindparam arg index 2
  • Spine: test/selfhost/compiler_lib_spine_smoke/main.php
  • Compliance: test/compliance/cases/ext/sqlite3_stmt_bindparam_getsql.phpt

Test plan

  • Issue repro (VM, PHP_COMPILER_PROFILE=8.4)
  • php script/check-selfhost-spine-coverage-sync.php → OK 5288/5288
  • php script/bootstrap-inventory.php --check → OK 5288/5288
  • PHPUnit filter sqlite3_stmt_bindparam_getsql|sqlite3_query_prepare|sqlite3_memory → 6/6
  • make north-star5-verify-fast → OK

Verification transcript

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh; export PHP_COMPILER_PROFILE=8.4; php bin/vm.php /tmp/sqlite3_stmt_rest.php'
# bindParam=1 getSQL=1 readOnly=1 … row=hello … row=world … bv=1 ok

php script/check-selfhost-spine-coverage-sync.php
# OK (spine covers all 5288 inventory files)

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh; export PHP_COMPILER_PROFILE=8.4; php -d memory_limit=1536M vendor/bin/phpunit --filter "sqlite3_stmt_bindparam_getsql|sqlite3_query_prepare|sqlite3_memory"'
# OK (6 tests, 6 assertions)

./script/docker-exec.sh -- bash -lc 'make north-star5-verify-fast'
# north-star5-verify: OK (fast)

Made with Cursor

Restore spine coverage for #19821 stmt/result units and match php-src
sqlite3.c bind/getSQL/readOnly/columnType-before-row semantics on VM.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur force-pushed the agent/issue-19854-sqlite3-stmt-rest branch from 7bb5f70 to 43273a5 Compare July 17, 2026 03:23
@PurHur
PurHur merged commit 0b604ee into master Jul 17, 2026
@PurHur
PurHur deleted the agent/issue-19854-sqlite3-stmt-rest branch July 17, 2026 03:23
@PurHur
PurHur restored the agent/issue-19854-sqlite3-stmt-rest branch July 17, 2026 03:34
@PurHur
PurHur deleted the agent/issue-19854-sqlite3-stmt-rest branch July 19, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stdlib: SQLite3Stmt bindParam/getSQL/readOnly + Result columnType after step (ext/sqlite3/php_sqlite3.c)

1 participant