File tree 2 files changed +8
-8
lines changed
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 {
603
603
604
604
// EOF Packet
605
605
if data [0 ] == iEOF && len (data ) == 5 {
606
+ rows .mc = nil
606
607
return io .EOF
607
608
}
609
+ if data [0 ] == iERR {
610
+ rows .mc = nil
611
+ return mc .handleErrorPacket (data )
612
+ }
608
613
609
614
// RowSet Packet
610
615
var n int
@@ -968,6 +973,7 @@ func (rows *binaryRows) readRow(dest []driver.Value) error {
968
973
969
974
// packet indicator [1 byte]
970
975
if data [0 ] != iOK {
976
+ rows .mc = nil
971
977
// EOF Packet
972
978
if data [0 ] == iEOF && len (data ) == 5 {
973
979
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 {
72
72
}
73
73
74
74
// 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 )
79
76
}
80
77
return io .EOF
81
78
}
@@ -87,10 +84,7 @@ func (rows *textRows) Next(dest []driver.Value) error {
87
84
}
88
85
89
86
// 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 )
94
88
}
95
89
return io .EOF
96
90
}
You can’t perform that action at this time.
0 commit comments