Skip to content

Commit 67c0581

Browse files
committed
more mc.strict flag checks
1 parent ca01562 commit 67c0581

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: driver.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ func handleAuthResult(mc *mysqlConn, oldCipher []byte) error {
176176
_, err = mc.readResultOK()
177177
}
178178

179-
if err == nil && mc.warningCount > 0 {
179+
if err == nil && mc.strict && mc.warningCount > 0 {
180180
return mc.getWarnings()
181181
}
182182
return err

Diff for: infile.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ func (mc *mysqlConn) handleInFileRequest(name string) (err error) {
175175
// read OK packet
176176
if err == nil {
177177
_, err = mc.readResultOK()
178-
if err == nil && mc.warningCount > 0 {
179-
return mc.getWarnings()
178+
if err == nil && mc.strict && mc.warningCount > 0 {
179+
err = mc.getWarnings()
180180
}
181181
return err
182182
}

0 commit comments

Comments
 (0)