We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbc9769 commit 352c368Copy full SHA for 352c368
sql/plan/common.go
@@ -100,6 +100,22 @@ func NodeRepresentsSelect(s sql.Node) bool {
100
if s == nil {
101
return false
102
}
103
+
104
+ // Special case for calling procedures that call other procedures.
105
+ switch node := s.(type) {
106
+ case *Call:
107
+ return NodeRepresentsSelect(node.Procedure)
108
+ case *Procedure:
109
+ return NodeRepresentsSelect(node.Body)
110
+ case *Block:
111
+ for _, stmt := range node.statements {
112
+ if NodeRepresentsSelect(stmt) {
113
+ return true
114
+ }
115
116
+ return false
117
118
119
isSelect := false
120
// All SELECT statements, including those that do not specify a table (using "dual"), have a TableNode.
121
transform.Inspect(s, func(node sql.Node) bool {
0 commit comments