Skip to content

Commit 8d6bdf7

Browse files
author
James Cor
committed
remove unused code/parameters
1 parent 58d51b3 commit 8d6bdf7

File tree

3 files changed

+4
-18
lines changed

3 files changed

+4
-18
lines changed

sql/analyzer/analyzer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ func (a *Analyzer) analyzeWithSelector(ctx *sql.Context, n sql.Node, scope *plan
518518
a.LogNode(n)
519519

520520
batches := a.Batches
521-
if b, ok := getBatchesForNode(n, batches); ok {
521+
if b, ok := getBatchesForNode(n); ok {
522522
batches = b
523523
}
524524

sql/analyzer/autocommit.go

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,4 @@ func addAutocommit(ctx *sql.Context, a *Analyzer, n sql.Node, scope *plan.Scope,
3131
return n, transform.SameTree, nil
3232
}
3333
return plan.NewTransactionCommittingNode(n), transform.NewTree, nil
34-
}
35-
36-
func hasShowWarningsNode(n sql.Node) bool {
37-
var ret bool
38-
transform.Inspect(n, func(n sql.Node) bool {
39-
if _, ok := n.(plan.ShowWarnings); ok {
40-
ret = true
41-
return false
42-
}
43-
44-
return true
45-
})
46-
47-
return ret
48-
}
34+
}

sql/analyzer/node_batches.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77

88
// getBatchesForNode returns a partial analyzer ruleset for simple node
99
// types that require little prior validation before execution.
10-
func getBatchesForNode(n sql.Node, orig []*Batch) ([]*Batch, bool) {
11-
switch n := n.(type) {
10+
func getBatchesForNode(node sql.Node) ([]*Batch, bool) {
11+
switch n := node.(type) {
1212
case *plan.Commit:
1313
return nil, true
1414
case *plan.StartTransaction:

0 commit comments

Comments
 (0)