[MDEV-31955] Make optimizer handle LCASE(varchar_col)=... Created: 2023-08-18 Updated: 2023-12-22 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Fix Version/s: | 11.5 |
| Type: | Task | Priority: | Minor |
| Reporter: | Sergei Golubchik | Assignee: | Oleg Smirnov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | optimizer-feature | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
extend |
| Comments |
| Comment by Oleg Smirnov [ 2023-09-11 ] | |
|
The attached lcase-discrepancies.sql shows characters for which the condition
is not fulfilled. That means it is not possible to remove LCASE() for strings containing those characters. | |
| Comment by Oleg Smirnov [ 2023-09-12 ] | |
|
bar suggested looking into the UCA 1400 collation. The attached script uca_1400_ucase.sql shows there are discrepancies in UCASE() comparisons while there are none for LCASE(). Another suggestion is having a constraint
on the target column. The optimizer might check if there is such a constraint and apply the optimization. So the users willing this optimization applied must first add the constraints for target columns. | |
| Comment by Oleg Smirnov [ 2023-09-13 ] | |
|
One more complication: it is not enough for UCA 1400 to run one-character checks as they are in the script. Two- or three-character combinations may produce different weights for a single character depending on its position, so additional checks are required. |