Skip to content

Commit ac17187

Browse files
author
James Cor
committed
tidy
1 parent 4e4c21f commit ac17187

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

enginetest/enginetests.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5834,7 +5834,6 @@ func TestTypesOverWire(t *testing.T, harness ClientHarness, sessionBuilder serve
58345834
require.NoError(t, err)
58355835
expectedRowSet := script.Results[queryIdx]
58365836
expectedRowIdx := 0
5837-
buf := sql.NewByteBuffer(1000)
58385837
var engineRow sql.Row
58395838
for engineRow, err = engineIter.Next(ctx); err == nil; engineRow, err = engineIter.Next(ctx) {
58405839
if !assert.True(t, r.Next()) {
@@ -5852,7 +5851,7 @@ func TestTypesOverWire(t *testing.T, harness ClientHarness, sessionBuilder serve
58525851
break
58535852
}
58545853
expectedEngineRow := make([]*string, len(engineRow))
5855-
row, err := server.RowToSQL(ctx, sch, engineRow, nil, buf)
5854+
row, _, err := server.RowToSQL(ctx, sch, engineRow, nil, nil)
58565855
if !assert.NoError(t, err) {
58575856
break
58585857
}

server/handler.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,6 +1261,7 @@ func getMaxTypeCapacity(ctx *sql.Context, typ sql.Type) (res int) {
12611261
case sqltypes.Bit:
12621262
res = int(typ.MaxTextResponseByteLength(ctx))
12631263
default:
1264+
// TODO: StringType can use backing array depending on the type of
12641265
// These types do not use sql.ByteBuffer
12651266
res = 0
12661267
}

sql/types/sql_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func BenchmarkNumI64SQL(b *testing.B) {
2424
func BenchmarkVarchar10SQL(b *testing.B) {
2525
var res sqltypes.Value
2626
t := MustCreateStringWithDefaults(sqltypes.VarChar, 10)
27-
buf := sql.NewByteBuffer(1000)
27+
buf := sql.NewByteBuffer()
2828
ctx := sql.NewEmptyContext()
2929
for i := 0; i < b.N; i++ {
3030
res, _ = t.SQL(ctx, buf.Get(), "char")

0 commit comments

Comments
 (0)