sql: make sure queries do not have fill-params (#81576)

pull/81808/head
Gábor Farkas 1 year ago committed by GitHub
parent 202eecccbc
commit 8175b31e16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      pkg/tsdb/sqleng/sql_engine.go

@ -175,6 +175,13 @@ func (e *DataSourceHandler) QueryData(ctx context.Context, req *backend.QueryDat
if err != nil {
return nil, fmt.Errorf("error unmarshal query json: %w", err)
}
// the fill-params are only stored inside this function, during query-interpolation. we do not support
// sending them in "from the outside"
if queryjson.Fill || queryjson.FillInterval != 0.0 || queryjson.FillMode != "" || queryjson.FillValue != 0.0 {
return nil, fmt.Errorf("query fill-parameters not supported")
}
if queryjson.RawSql == "" {
continue
}

Loading…
Cancel
Save