Use simple exec

This commit is contained in:
2018-11-20 22:54:50 +01:00
parent fb382876ef
commit 57d2b30132
3 changed files with 17 additions and 165 deletions
+1 -2
View File
@@ -121,8 +121,7 @@ func (c *Conn) DisableChecksum() error {
// SetVar assigns a new value to the given variable.
func (c *Conn) SetVar(name, val string) error {
_, err := c.conn.Exec(fmt.Sprintf("SET %s=%q", name, val), nil)
return err
return c.conn.Exec(fmt.Sprintf("SET %s=%q", name, val))
}
// Close the connection.