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

(cherry picked from commit f881fd1637)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2022-01-12 15:43:21 +01:00
committed by GitHub
parent 59c2ffec0b
commit 5bd12321ca
+1 -1
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