[MDEV-21044] Wrong result when using a smaller size for sort buffer Created: 2019-11-13 Updated: 2019-11-19 Resolved: 2019-11-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.1, 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.1.44, 10.2.30, 10.3.21, 10.4.11 |
| Type: | Bug | Priority: | Major |
| Reporter: | Varun Gupta (Inactive) | Assignee: | Varun Gupta (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
DATASET
With smaller sort_buffer_size we get incorrect results, actual expected rows is 16 |
| Comments |
| Comment by Varun Gupta (Inactive) [ 2019-11-15 ] | |||||||||
|
Investigation (gdb) p param.max_keys_per_buffer
In the example this sets the param.max_keys_per_buffer to 0.
The problem with this is later this causes the merge buffers to not read anything as there is no key and one merge buffer is skipped and not written to the output file. Hence we get wrong results. | |||||||||
| Comment by Varun Gupta (Inactive) [ 2019-11-15 ] | |||||||||
|
Patch | |||||||||
| Comment by Sergei Petrunia [ 2019-11-17 ] | |||||||||
|
Ok to push. |