Skip to content

MySQL multi_query Doesn't Cause the Server to "wait" #4778

@miqrogroove

Description

@miqrogroove

complete before returning control to PHP. The MySQL server will then process
the next query in the sequence. Once the next result is ready, MySQL will wait
for the next execution of <function>mysqli_next_result</function> from PHP.

This phrasing is highly ambiguous. It was pointed out to me, and I confirmed by testing, the MySQL server definitely does not "wait" for PHP when there are more than 2 queries to process. The server executes all of the queries so long as there are no errors. The connection is blocked in a sense, but the work is/was done on the server side. It's clearer to say MySQL will wait after executing all queries if PHP hasn't caught up with the results yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions