Postgres/MySQL/MSSQL: Cancel in-flight SQL query if user cancels query in grafana (#43890)

This commit is contained in:
Victor Marin 2022-01-12 16:24:27 +02:00 committed by GitHub
parent f8b527b818
commit f881fd1637
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -258,7 +258,7 @@ func (e *DataSourceHandler) executeQuery(query backend.DataQuery, wg *sync.WaitG
defer session.Close()
db := session.DB()
rows, err := db.Query(interpolatedQuery)
rows, err := db.QueryContext(queryContext, interpolatedQuery)
if err != nil {
errAppendDebug("db query error", e.transformQueryError(err), interpolatedQuery)
return