[MDEV-19028] Addressing the contraction problem with Engine Independent statistics Created: 2019-03-23 Updated: 2021-03-19 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Varun Gupta (Inactive) | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Filing the contraction problem mentioned in Contraction problemAlso, the underlying code should be checked for contraction compatibility. The code copying to column_statistics.min_value should make sure not to break contractions in the middle, otherwise max_value can be very far from the actual maximum value. For example, consider this data in combination with Czech collation:
'ch' is a separate letter which is sorted between 'h' and 'i': 'ch' should not be broken into parts when copying to column_statistics.min_value: For column_statistics.max_value, the copying code will be even harder: it should replace 'ch' to the character which immediately follows 'ch' in the collation, which is 'i'. An example
The limit used is 2 bytes here, instead of 255, for simplicity. Notice, the original MIN and MAX values are 2 bytes ('aa') and 3 bytes ('aë') respectively
|