Skip to content

Golang cannot get err when query timeout #4449

@gengjun-git

Description

@gengjun-git

Describe the bug
Golang cannot get error when query timeout

To Reproduce
execute a long time used SQL using driver.Query(SQL) api.

rows, err := driver.Query(SQL)
if err != nil {
      //print err and return
}
for rows.Next() {
      //read rows
}

Expected behavior
err != nil but err == nil and rows.Next() return false

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