Преглед изворни кода

Remove false "ResultNoRows" errors

Issue #16
Julien Schmidt пре 13 година
родитељ
комит
ba48cfd877
1 измењених фајлова са 1 додато и 5 уклоњено
  1. 1 5
      connection.go

+ 1 - 5
connection.go

@@ -2,7 +2,7 @@
 //
 // Copyright 2012 Julien Schmidt. All rights reserved.
 // http://www.julienschmidt.com
-// 
+//
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this file,
 // You can obtain one at http://mozilla.org/MPL/2.0/.
@@ -205,10 +205,6 @@ func (mc *mysqlConn) Exec(query string, args []driver.Value) (driver.Result, err
 		return nil, e
 	}
 
-	if mc.affectedRows == 0 && mc.insertId == 0 {
-		return driver.ResultNoRows, e
-	}
-
 	return &mysqlResult{
 			affectedRows: int64(mc.affectedRows),
 			insertId:     int64(mc.insertId)},