Suspicious assignment to a by-value method receiver
Open
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
https://github.com/pingcap/tidb/blob/a3bafcdffb1008d224fe06af717e231c82b8f6b1/executor/aggfuncs/func_group_concat.go#L304-L311
The assignment `h.err = err` (line 309) has no effect outside the method because the method has a by-value receiver.
Either the receiver must be changed to be by reference or the assignment removed.
(found by [revive](https://github.com/mgechev/revive) while testing it on tidb code base)
Contributor guide
Assessment
This issue has not been assessed yet.