php / php/php-src

Send COM_RESET_CONNECTION in mysqlnd_conn_data::restart_psession

Open
#20,225 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

Inspired by the mailing list thread at https://externals.io/message/128741.

To make the use of persistent connections with MySQL somewhat safer, MySQLnd should send a connection reset when “restarting” a persistent session.

According to https://dev.mysql.com/doc/c-api/8.4/en/mysql-reset-connection.html, MySQL should then take care of cleaning up all connection-specific state.

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

Start by locating mysqlnd_conn_data::restart_psession and read the linked MySQL reset-connection documentation to understand the required protocol operation. Done means the persistent-session restart path sends COM_RESET_CONNECTION so MySQL cleans up connection-specific state.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, mysql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.