Skip to content

Feature Request: vitessdriver: ensure a single connection with altered session state can be used safely #13703

@mdlayher

Description

@mdlayher

Feature Description

database/sql has an API added in Go 1.9 that allows pulling a single connection from the pool so that you can safely alter its state and execute subsequent queries: https://pkg.go.dev/database/sql#DB.Conn

I want to verify the vitessdriver can do this safely and take advantage of some of the newer driver APIs to do so in an efficient manner.

Use Case(s)

My use case is pulling a connection from the pool, executing USE keyspace:-80; or similar, and then issuing queries from there while assuring that a concurrent caller cannot pollute my session state.

I will send a PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions