Skip to content

Commit 337227f

Browse files
committed
[ga-format-pr] Run ./format_repo.sh to fix formatting
1 parent ceb8331 commit 337227f

File tree

5 files changed

+17
-18
lines changed

5 files changed

+17
-18
lines changed

enginetest/queries/procedure_queries.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2833,13 +2833,13 @@ var ProcedureCreateInSubroutineTests = []ScriptTest{
28332833
Name: "table ddl statements in stored procedures",
28342834
Assertions: []ScriptTestAssertion{
28352835
{
2836-
Query: "create procedure create_proc() create table t (i int primary key, j int);",
2836+
Query: "create procedure create_proc() create table t (i int primary key, j int);",
28372837
Expected: []sql.Row{
28382838
{types.NewOkResult(0)},
28392839
},
28402840
},
28412841
{
2842-
Query: "call create_proc()",
2842+
Query: "call create_proc()",
28432843
Expected: []sql.Row{
28442844
{types.NewOkResult(0)},
28452845
},
@@ -2855,70 +2855,70 @@ var ProcedureCreateInSubroutineTests = []ScriptTest{
28552855
},
28562856
},
28572857
{
2858-
Query: "call create_proc()",
2858+
Query: "call create_proc()",
28592859
ExpectedErrStr: "table with name t already exists",
28602860
},
28612861

28622862
{
2863-
Query: "create procedure insert_proc() insert into t values (1, 1), (2, 2), (3, 3);",
2863+
Query: "create procedure insert_proc() insert into t values (1, 1), (2, 2), (3, 3);",
28642864
Expected: []sql.Row{
28652865
{types.NewOkResult(0)},
28662866
},
28672867
},
28682868
{
2869-
Query: "call insert_proc()",
2869+
Query: "call insert_proc()",
28702870
Expected: []sql.Row{
28712871
{types.NewOkResult(3)},
28722872
},
28732873
},
28742874
{
2875-
Query: "select * from t",
2875+
Query: "select * from t",
28762876
Expected: []sql.Row{
28772877
{1, 1},
28782878
{2, 2},
28792879
{3, 3},
28802880
},
28812881
},
28822882
{
2883-
Query: "call insert_proc()",
2883+
Query: "call insert_proc()",
28842884
ExpectedErrStr: "duplicate primary key given: [1]",
28852885
},
28862886

28872887
{
2888-
Query: "create procedure update_proc() update t set j = 999 where i > 1;",
2888+
Query: "create procedure update_proc() update t set j = 999 where i > 1;",
28892889
Expected: []sql.Row{
28902890
{types.NewOkResult(0)},
28912891
},
28922892
},
28932893
{
2894-
Query: "call update_proc()",
2894+
Query: "call update_proc()",
28952895
Expected: []sql.Row{
28962896
{types.OkResult{RowsAffected: 2, Info: plan.UpdateInfo{Matched: 2, Updated: 2}}},
28972897
},
28982898
},
28992899
{
2900-
Query: "select * from t",
2900+
Query: "select * from t",
29012901
Expected: []sql.Row{
29022902
{1, 1},
29032903
{2, 999},
29042904
{3, 999},
29052905
},
29062906
},
29072907
{
2908-
Query: "call update_proc()",
2908+
Query: "call update_proc()",
29092909
Expected: []sql.Row{
29102910
{types.OkResult{RowsAffected: 0, Info: plan.UpdateInfo{Matched: 2}}},
29112911
},
29122912
},
29132913

29142914
{
2915-
Query: "create procedure drop_proc() drop table t;",
2915+
Query: "create procedure drop_proc() drop table t;",
29162916
Expected: []sql.Row{
29172917
{types.NewOkResult(0)},
29182918
},
29192919
},
29202920
{
2921-
Query: "call drop_proc()",
2921+
Query: "call drop_proc()",
29222922
Expected: []sql.Row{
29232923
{types.NewOkResult(0)},
29242924
},
@@ -2928,7 +2928,7 @@ var ProcedureCreateInSubroutineTests = []ScriptTest{
29282928
Expected: []sql.Row{},
29292929
},
29302930
{
2931-
Query: "call drop_proc()",
2931+
Query: "call drop_proc()",
29322932
ExpectedErrStr: "Unknown table 't'",
29332933
},
29342934
},

sql/plan/procedure.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func NewProcedure(
126126
CreatedAt: createdAt,
127127
ModifiedAt: modifiedAt,
128128

129-
Ops: ops,
129+
Ops: ops,
130130
}
131131
}
132132

sql/procedures.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"fmt"
1919
"time"
2020

21-
"github.com/dolthub/vitess/go/vt/sqlparser"
21+
"github.com/dolthub/vitess/go/vt/sqlparser"
2222
)
2323

2424
// Interpreter is an interface that implements an interpreter. These are typically used for functions (which may be

sql/procedures/interpreter_stack.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func (iv *InterpreterVariable) ToAST() *ast.SQLVal {
9595
}
9696

9797
var astType ast.ValType
98-
var astVal []byte
98+
var astVal []byte
9999
if types.IsInteger(iv.Type) {
100100
intStr := fmt.Sprintf("%d", iv.Value)
101101
return ast.NewIntVal([]byte(intStr))

sql/rowexec/proc.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ func (b *BaseBuilder) buildCall(ctx *sql.Context, n *plan.Call, row sql.Row) (sq
211211
innerIter: rowIter.(sql.RowIter),
212212
}, nil
213213

214-
215214
// TODO: mirror plpgsql interpreter_logic.go Call()
216215
// TODO: instead of building, run the actual operations
217216
// This means call the runner.QueryWithBindings

0 commit comments

Comments
 (0)