Browse Source

args assigned and not used (#575)

* args assigned and not used

* add to AUTHORS
astaxie 8 years ago
parent
commit
147bd02c2c
2 changed files with 1 additions and 2 deletions
  1. 1 0
      AUTHORS
  2. 0 2
      connection.go

+ 1 - 0
AUTHORS

@@ -13,6 +13,7 @@
 
 Aaron Hopkins <go-sql-driver at die.net>
 Arne Hormann <arnehormann at gmail.com>
+Asta Xie <xiemengjun at gmail.com>
 Carlos Nieto <jose.carlos at menteslibres.net>
 Chris Moos <chris at tech9computers.com>
 Daniel Nichter <nil at codenode.com>

+ 0 - 2
connection.go

@@ -272,7 +272,6 @@ func (mc *mysqlConn) Exec(query string, args []driver.Value) (driver.Result, err
 			return nil, err
 		}
 		query = prepared
-		args = nil
 	}
 	mc.affectedRows = 0
 	mc.insertId = 0
@@ -330,7 +329,6 @@ func (mc *mysqlConn) Query(query string, args []driver.Value) (driver.Rows, erro
 			return nil, err
 		}
 		query = prepared
-		args = nil
 	}
 	// Send command
 	err := mc.writeCommandPacketStr(comQuery, query)