[MDEV-11084] Select statement with partition selection against MyISAM table opens all partitions Created: 2016-10-19 Updated: 2020-08-25 Resolved: 2018-01-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Partitioning, Storage Engine - MyISAM |
| Affects Version/s: | 10.1.18, 10.0, 10.1 |
| Fix Version/s: | 10.3.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Alexey Botchkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | myisam, partitioning, upstream | ||
| Issue Links: |
|
||||||||||||||||||||
| Sprint: | 10.1.19, 10.1.20, 10.2.4-1, 10.2.4-2, 10.1.22, 10.1.23, 10.3.1-1, 10.1.29, 10.1.30, 10.1.31 | ||||||||||||||||||||
| Description |
|
When a user uses partition selection in a SELECT query to only query a particular partition of a MyISAM table, many users would expect the server to only open the data files for that particular partition. In reality, the server opens all data files for the table. This bug is related to partition selection in SELECT statements, as defined here: http://dev.mysql.com/doc/refman/5.6/en/partitioning-selection.html Let's say that we create the following table:
And then we execute the following to ensure that the table's data files are closed:
And then we can confirm that the table's data files are not open:
And then let's say that we execute the following query:
Most users would expect that the server would only open the data files for partition p1. In reality, it opens all of them:
|
| Comments |
| Comment by Elena Stepanova [ 2016-10-19 ] |
|
Reproducible on MySQL 5.6, 5.7. |
| Comment by Alexey Botchkov [ 2017-06-01 ] |
|
Patch proposal: |
| Comment by Alexey Botchkov [ 2017-06-06 ] |
|
Updated patch. |
| Comment by Alexey Botchkov [ 2017-12-18 ] |
|
http://lists.askmonty.org/pipermail/commits/2017-December/011736.html |
| Comment by Alexey Botchkov [ 2018-01-29 ] |
|
The final patch. |