spanner: disable recursive queries (#102032)
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
|||||||
_ "github.com/lib/pq"
|
_ "github.com/lib/pq"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
"xorm.io/core"
|
"xorm.io/core"
|
||||||
|
|
||||||
"xorm.io/xorm"
|
"xorm.io/xorm"
|
||||||
|
|
||||||
"github.com/grafana/grafana/pkg/bus"
|
"github.com/grafana/grafana/pkg/bus"
|
||||||
@@ -372,6 +373,11 @@ func (ss *SQLStore) RecursiveQueriesAreSupported() (bool, error) {
|
|||||||
return *ss.recursiveQueriesAreSupported, nil
|
return *ss.recursiveQueriesAreSupported, nil
|
||||||
}
|
}
|
||||||
recursiveQueriesAreSupported := func() (bool, error) {
|
recursiveQueriesAreSupported := func() (bool, error) {
|
||||||
|
if ss.GetDBType() == migrator.Spanner {
|
||||||
|
// no need to try...
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
|
|
||||||
var result []int
|
var result []int
|
||||||
if err := ss.WithDbSession(context.Background(), func(sess *DBSession) error {
|
if err := ss.WithDbSession(context.Background(), func(sess *DBSession) error {
|
||||||
recQry := `WITH RECURSIVE cte (n) AS
|
recQry := `WITH RECURSIVE cte (n) AS
|
||||||
|
|||||||
Reference in New Issue
Block a user