Skip to content

ExecContext should return error if it is canceled during execution #1287

Open
@cia-rana

Description

@cia-rana

Issue description

mysqlConn.ExecContext uses mysqlConn.watchCancel to decide if the ctx passed as an argument is canceled, so if the ctx is canceled before the decision, it returns an error. However, mysqlConn.ExecContext does not return an error even if the ctx is cancelled during or after mysqlConn.Exec execution, or during mysqlConn.finish execution in defer. Is this the intended behavior?

Configuration

Driver version (or git SHA):

Go version: 1.17.2

Server version: E.g. MySQL 5.7

Server OS: amazonlinux:latest(Docker Image)

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