php / php/php-src

Feature request: mysqli_poll async support for prepared statements also

Open
#20,640 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Extension: mysqli Feature Status: Needs Triage
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

Recently PHP True Async RFC was rejected. It was supposed to have ONE worker and multiple coroutines. But that functionality would be useful only for external calls (like DB, HTTP etc.) that need time to respond.

While for HTTP calls there is curl_multi_init, for parallel DB queries there is no alternative when prepared statements are needed.

So we propose to finish mysqli_poll or implement similar one for running parallel prepared statements.

We already use mysqli_poll to eager load relations in Eloquent that don't have bindings when the number of relations is big (over 20).

https://stackoverflow.com/questions/36358865/mysqli-async-available-with-prepared-statements-in-php

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names mysqli_poll and prepared statements but no source files or tests; start by tracing those entry points in php-src and establish how existing async polling handles unprepared queries. Define the supported prepared-statement behavior and verify parallel completion with regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, php
Domain
database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.