Skip to content

Commit 50001bd

Browse files
authored
Merge pull request #3093 from dolthub/aaron/bump-go-1.24.0
go.mod: Bump to Go 1.24.0.
2 parents 9ed5730 + 359f666 commit 50001bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+80
-100
lines changed

enginetest/memory_engine_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ func TestSingleQuery(t *testing.T) {
156156
Expected: []sql.Row{{-1}},
157157
}
158158

159-
fmt.Sprintf("%v", test)
160159
harness := enginetest.NewMemoryHarness("", 1, testNumPartitions, true, nil)
161160
// harness.UseServer()
162161
harness.Setup(setup.MydbData, setup.NiltableData)
@@ -186,7 +185,6 @@ func TestSingleQueryPrepared(t *testing.T) {
186185
},
187186
}
188187

189-
fmt.Sprintf("%v", test)
190188
harness := enginetest.NewMemoryHarness("", 1, testNumPartitions, false, nil)
191189
harness.Setup(setup.KeylessSetup...)
192190
engine, err := harness.NewEngine(t)

enginetest/server_engine_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ func TestServerPreparedStatements(t *testing.T) {
368368
require.True(t, ok)
369369
})
370370
}
371-
for _, stmt := range append(commonTeardown) {
371+
for _, stmt := range commonTeardown {
372372
_, err := conn.Exec(stmt)
373373
require.NoError(t, err)
374374
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ require (
4242
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect
4343
)
4444

45-
go 1.23.3
45+
go 1.24.0

memory/persisted_session_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
)
2828

2929
func newPersistedSqlContext() *sql.Context {
30-
ctx, _ := context.WithCancel(context.TODO())
30+
ctx := context.Background()
3131
pro := NewDBProvider()
3232
sess := sql.NewBaseSession()
3333

processlist.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ package sqle
1717
import (
1818
"context"
1919
"errors"
20-
"fmt"
2120
"sync"
2221
"time"
2322

@@ -387,7 +386,7 @@ func getLongQueryTime() float64 {
387386
}
388387
longQueryTime, ok := longQueryTimeValue.(float64)
389388
if !ok {
390-
logrus.Errorf(fmt.Sprintf("unexpected type for value of long_query_time system variable: %T", longQueryTimeValue))
389+
logrus.Errorf("unexpected type for value of long_query_time system variable: %T", longQueryTimeValue)
391390
return 0
392391
}
393392
return longQueryTime

sql/analyzer/analyzer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ func (a *Analyzer) LogDiff(prev, next sql.Node) {
369369
panic(err)
370370
}
371371
if len(diff) > 0 {
372-
a.Log(diff)
372+
a.Log("%s", diff)
373373
} else {
374374
a.Log("nodes are different, but no textual diff found (implement better DebugString?)")
375375
}

sql/analyzer/indexed_joins.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ func replanJoin(ctx *sql.Context, n *plan.JoinNode, a *Analyzer, scope *plan.Sco
217217
}
218218

219219
if a.Verbose && a.Debug {
220-
a.Log(m.String())
220+
a.Log("%s", m.String())
221221
}
222222
if scope != nil {
223223
scope.JoinTrees = append(scope.JoinTrees, m.String())
@@ -489,7 +489,6 @@ func convertSemiToInnerJoin(m *memo.Memo) error {
489489
}
490490
if srcNode == nil {
491491
break
492-
return fmt.Errorf("table for column not found: %d", colId)
493492
}
494493

495494
sch := srcNode.Schema()

sql/errors.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ package sql
1717
import (
1818
"fmt"
1919
"io"
20-
"strings"
2120

2221
"github.com/dolthub/vitess/go/mysql"
2322
"gopkg.in/src-d/go-errors.v1"
@@ -1021,8 +1020,7 @@ func CastSQLError(err error) *mysql.SQLError {
10211020
code = mysql.ERUnknownError
10221021
}
10231022

1024-
// This uses the given error as a format string, so we have to escape any percentage signs else they'll show up as "%!(MISSING)"
1025-
return mysql.NewSQLError(code, sqlState, strings.Replace(err.Error(), `%`, `%%`, -1))
1023+
return mysql.NewSQLError(code, sqlState, "%s", err.Error())
10261024
}
10271025

10281026
// UnwrapError removes any wrapping errors (e.g. WrappedInsertError) around the specified error and

sql/expression/convert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ func (c *Convert) DebugString() string {
240240
children = append(children, fmt.Sprintf("typeScale: %v", c.typeScale))
241241
}
242242

243-
children = append(children, fmt.Sprintf(sql.DebugString(c.Child)))
243+
children = append(children, sql.DebugString(c.Child))
244244

245245
_ = pr.WriteChildren(children...)
246246
return pr.String()

sql/expression/function/days.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func (t *ToDays) Eval(ctx *sql.Context, row sql.Row) (interface{}, error) {
9494

9595
date, _, err = types.Date.Convert(ctx, date)
9696
if err != nil {
97-
ctx.Warn(1292, err.Error())
97+
ctx.Warn(1292, "%s", err.Error())
9898
return nil, nil
9999
}
100100
d := date.(time.Time)
@@ -215,7 +215,7 @@ func (f *FromDays) Eval(ctx *sql.Context, row sql.Row) (interface{}, error) {
215215

216216
d, _, err = types.Int64.Convert(ctx, d)
217217
if err != nil {
218-
ctx.Warn(1292, err.Error())
218+
ctx.Warn(1292, "%s", err.Error())
219219
return "0000-00-00", nil
220220
}
221221

@@ -299,7 +299,7 @@ func (f *LastDay) Eval(ctx *sql.Context, row sql.Row) (interface{}, error) {
299299

300300
date, _, err = types.Date.Convert(ctx, date)
301301
if err != nil {
302-
ctx.Warn(1292, err.Error())
302+
ctx.Warn(1292, "%s", err.Error())
303303
return nil, nil
304304
}
305305

0 commit comments

Comments
 (0)