Skip to content

Commit 5a79bc7

Browse files
author
James Cor
committed
git push
1 parent 0bae8b3 commit 5a79bc7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

server/handler.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -949,12 +949,12 @@ func RowToSQL(ctx *sql.Context, sch sql.Schema, row sql.Row, projs []sql.Express
949949

950950
outVals := make([]sqltypes.Value, len(sch))
951951
var err error
952-
var buf []byte = make([]byte, 256)
952+
var newBuf = make([]byte, 256)
953953
if br, ok := row.(sql.BytesRow); ok {
954954
if len(projs) == 0 {
955955
for i, col := range sch {
956-
val, err := br.GetBytes(i, col.Type, buf[:0])
957-
buf = buf[len(val):]
956+
val, err := br.GetBytes(i, col.Type, newBuf[:0])
957+
newBuf = newBuf[len(val):]
958958
if err != nil {
959959
return nil, err
960960
}
@@ -971,8 +971,8 @@ func RowToSQL(ctx *sql.Context, sch sql.Schema, row sql.Row, projs []sql.Express
971971
e := projs[i]
972972
switch e := e.(type) {
973973
case *expression.GetField:
974-
val, err := br.GetBytes(e.Index(), col.Type, buf[:0])
975-
buf = buf[len(val):]
974+
val, err := br.GetBytes(e.Index(), col.Type, newBuf[:0])
975+
newBuf = newBuf[len(val):]
976976
if err != nil {
977977
return nil, err
978978
}

sql/planbuilder/priv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func (b *Builder) buildAuthenticatedUser(user ast.AccountWithAuth) plan.Authenti
163163
} else if user.Auth1.Plugin == string(mysql.CachingSha2Password) {
164164
authUser.Auth1 = plan.NewCachingSha2PasswordAuthentication(user.Auth1.Password)
165165
} else if len(user.Auth1.Plugin) > 0 {
166-
authUser.Auth1 = plan.NewOtherAuthentication(user.Auth1.Password, user.Auth1.Plugin)
166+
authUser.Auth1 = plan.NewOtherAuthentication(user.Auth1.Password, user.Auth1.Plugin, user.Auth1.Identity)
167167
} else {
168168
// We default to using the password, even if it's empty
169169
authUser.Auth1 = plan.NewDefaultAuthentication(user.Auth1.Password)

sql/rowexec/show.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ func (b *BaseBuilder) buildDescribeQuery(ctx *sql.Context, n *plan.DescribeQuery
7878
formatString := sql.Describe(n.Child, n.Format)
7979
for _, l := range strings.Split(formatString, "\n") {
8080
if strings.TrimSpace(l) != "" {
81-
rows = append(rows, sql.NewRow(l))
81+
rows = append(rows, sql.NewUntypedRow(l))
8282
}
8383
}
8484
return sql.RowsToRowIter(rows...), nil
8585
}
8686

8787
ctx.Warn(0, "EXPLAIN Output is currently a placeholder; use EXPLAIN PLAN for old behavior")
88-
dummyRow := sql.Row{
88+
dummyRow := sql.UntypedSqlRow{
8989
1, // id
9090
"SELECT", // select_type
9191
"NULL", // table

0 commit comments

Comments
 (0)