Skip to content

Commit fcf1b5b

Browse files
committed
Changed param name to camel case.
1 parent ccf66f6 commit fcf1b5b

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ Possible Parameters are:
111111
* `parseTime`: `parseTime=true` changes the output type of `DATE` and `DATETIME` values to `time.Time` instead of `[]byte` / `string`
112112
* `loc`: Sets the location for time.Time values (when using `parseTime=true`). The default is `UTC`. *"Local"* sets the system's location. See [time.LoadLocation](http://golang.org/pkg/time/#LoadLocation) for details.
113113
* `strict`: Enable strict mode. MySQL warnings are treated as errors.
114+
* `clientFoundRows`: `clientFoundRows=true` causes causes an UPDATE to return the number of matching rows instead of the number of rows changed.
114115

115116
All other parameters are interpreted as system variables:
116117
* `autocommit`: *"SET autocommit=`value`"*

connection.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func (mc *mysqlConn) handleParams() (err error) {
6363
}
6464

6565
// handled elsewhere
66-
case "timeout", "allowAllFiles", "loc":
66+
case "timeout", "allowAllFiles", "loc", "clientFoundRows":
6767
continue
6868

6969
// time.Time parsing
@@ -82,9 +82,7 @@ func (mc *mysqlConn) handleParams() (err error) {
8282
// Compression
8383
case "compress":
8484
err = errors.New("Compression not implemented yet")
85-
86-
case "CLIENT_FOUND_ROWS":
87-
85+
8886
// System Vars
8987
default:
9088
err = mc.exec("SET " + param + "=" + val + "")

packets.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func (mc *mysqlConn) writeAuthPacket() error {
215215
if mc.flags&clientLongFlag > 0 {
216216
clientFlags |= uint32(clientLongFlag)
217217
}
218-
if _, ok := mc.cfg.params["CLIENT_FOUND_ROWS"]; ok {
218+
if _, ok := mc.cfg.params["clientFoundRows"]; ok {
219219
clientFlags |= uint32(clientFoundRows)
220220
}
221221
// User Password

0 commit comments

Comments
 (0)