Skip to content

Add ResetConnectionAsync #831

Closed
Closed
@bgrainger

Description

@bgrainger

From #178 (comment)

For advanced scenarios, it could be useful to support the following API:

class MySqlConnection
{
    public ValueTask ResetConnectionAsync(CancellationToken token = default);
}

This would send a COM_RESET_CONNECTION packet to reset the open connection. By allowing the user to manually reset the connection only when needed (e.g., a temporary table has been created or user variables were set), it would be practical to add ConnectionReset=false to the connection string and avoid its overhead when retrieving a pooled connection (see #178).

Since this is an advanced API, is a synchronous version of this method needed? (Probably not.)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions