Handlersocket off by one error in IN() requests
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.1 |
Won't Fix
|
Low
|
Unassigned | |||
5.5 |
Triaged
|
Low
|
Unassigned | |||
5.6 |
Triaged
|
Low
|
Unassigned | |||
5.7 |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Using Percona server 5.5.13-
handlersocket_
handlersocket_
handlersocket_port = 2678
handlersocket_
handlersocket_
handlersocket_
handlersocket_
# defaults, 262144 is 256k
handlersocket_
handlersocket_
# Set to non 0 if connection pooling/persistent connections are used
handlersocket_
handlersocket_
There seems to be an odd off by one error when using the IN() syntax (which otherwise seems to work):
"2 > 1 0 5 0 @ 0 4 10 20 30 40"
[Index Id 2 / PRIMARY(id) > 0 / limit 0,5 / id IN(10,20,30,40)]
As an example, the result set here would be user id and user name:
11 / usera, 21 / userb, 31 / userc, 41 / userd
So, it's actually returning the next ID for each in the set (the usernames are correct for the returned 11/21/31/41 ids) rather then the requested IDs. I've been manually fixing this by iterating over my request and decrementing each ID in the IN() section by one.
The second part of this is when using a FILTER argument. The off by one error also seems to show up in the other direction (so I iterate over and increment instead of decrement each element)
If you need any further info or debugging, please let me know. Thanks!
Changed in percona-server: | |
importance: | Undecided → High |
tags: | added: handlersocket |
I echoed this bug on upstream here: https:/ /github. com/DeNADev/ HandlerSocket- Plugin- for-MySQL/ issues/ 70
There was a reply regarding a pull request, which makes me believe I just may have gotten IN() support removed? Which would be unfortunate, as I do rely on it (after applying the workaround)