Skip to content

Commit 280dff6

Browse files
committed
avoid returning empty MySQLWarnings in odd edge case scenario
1 parent 2e00b5c commit 280dff6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

errors.go

+4
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ func (mc *mysqlConn) getWarnings() (err error) {
122122
warnings = append(warnings, warning)
123123

124124
case io.EOF:
125+
if len(warnings) == 0 {
126+
return nil
127+
}
128+
125129
return warnings
126130

127131
default:

0 commit comments

Comments
 (0)