File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -603,8 +603,13 @@ func (rows *textRows) readRow(dest []driver.Value) error {
603603
604604 // EOF Packet
605605 if data [0 ] == iEOF && len (data ) == 5 {
606+ rows .mc = nil
606607 return io .EOF
607608 }
609+ if data [0 ] == iERR {
610+ rows .mc = nil
611+ return mc .handleErrorPacket (data )
612+ }
608613
609614 // RowSet Packet
610615 var n int
@@ -968,6 +973,7 @@ func (rows *binaryRows) readRow(dest []driver.Value) error {
968973
969974 // packet indicator [1 byte]
970975 if data [0 ] != iOK {
976+ rows .mc = nil
971977 // EOF Packet
972978 if data [0 ] == iEOF && len (data ) == 5 {
973979 return io .EOF
Original file line number Diff line number Diff line change @@ -72,10 +72,7 @@ func (rows *binaryRows) Next(dest []driver.Value) error {
7272 }
7373
7474 // Fetch next row from stream
75- if err := rows .readRow (dest ); err != io .EOF {
76- return err
77- }
78- rows .mc = nil
75+ return rows .readRow (dest )
7976 }
8077 return io .EOF
8178}
@@ -87,10 +84,7 @@ func (rows *textRows) Next(dest []driver.Value) error {
8784 }
8885
8986 // Fetch next row from stream
90- if err := rows .readRow (dest ); err != io .EOF {
91- return err
92- }
93- rows .mc = nil
87+ return rows .readRow (dest )
9488 }
9589 return io .EOF
9690}
You can’t perform that action at this time.
0 commit comments