@@ -495,7 +495,7 @@ func (h *Handler) doQuery(
495495 r , err = resultForEmptyIter (sqlCtx , rowIter , resultFields )
496496 } else if analyzer .FlagIsSet (qFlags , sql .QFlagMax1Row ) {
497497 r , err = resultForMax1RowIter (sqlCtx , schema , rowIter , resultFields , buf )
498- } else if vr , ok := rowIter .(sql.ValueRowIter ); ok && vr .CanSupport (sqlCtx ) {
498+ } else if vr , ok := rowIter .(sql.ValueRowIter ); ok && vr .IsValueRowIter (sqlCtx ) {
499499 r , processedAtLeastOneBatch , err = h .resultForValueRowIter (sqlCtx , c , schema , vr , resultFields , buf , callback , more )
500500 } else {
501501 r , processedAtLeastOneBatch , err = h .resultForDefaultIter (sqlCtx , c , schema , rowIter , callback , resultFields , more , buf )
@@ -702,10 +702,7 @@ func (h *Handler) resultForDefaultIter(ctx *sql.Context, c *mysql.Conn, schema s
702702 defer wg .Done ()
703703 for {
704704 if r == nil {
705- r = & sqltypes.Result {
706- Rows : make ([][]sqltypes.Value , 0 , rowsBatch ),
707- Fields : resultFields ,
708- }
705+ r = & sqltypes.Result {Fields : resultFields }
709706 }
710707 if r .RowsAffected == rowsBatch {
711708 if err := resetCallback (r , more ); err != nil {
@@ -1203,13 +1200,13 @@ func RowValueToSQLValues(ctx *sql.Context, sch sql.Schema, row sql.ValueRow, buf
12031200 continue
12041201 }
12051202 if buf == nil {
1206- outVals [i ], err = valType .ToSQLValue (ctx , row [i ], nil )
1203+ outVals [i ], err = valType .SQLValue (ctx , row [i ], nil )
12071204 if err != nil {
12081205 return nil , err
12091206 }
12101207 continue
12111208 }
1212- outVals [i ], err = valType .ToSQLValue (ctx , row [i ], buf .Get ())
1209+ outVals [i ], err = valType .SQLValue (ctx , row [i ], buf .Get ())
12131210 if err != nil {
12141211 return nil , err
12151212 }
0 commit comments