[MCOL-4498] LIKE is not collation aware Created: 2021-01-15 Updated: 2021-04-02 Resolved: 2021-04-02 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | ExeMgr, PrimProc |
| Affects Version/s: | None |
| Fix Version/s: | 5.6.1 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Alexander Barkov | Assignee: | Roman |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Sprint: | 2021-2, 2021-3, 2021-4, 2021-5 | ||||||||||||||||||||||||||||||||||||
| Description |
|
Notice, it returns only one row ignoring the fact that the collations is utf8_general_ci, which is case insensitive. It should return two rows like MyISAM does:
|
| Comments |
| Comment by Alexander Barkov [ 2021-03-04 ] | ||||||||||||||||||
|
Hello dleeyh, When doing QA for this task can you please check if the change affects performance? In MariaDB Server, the code from the collation library behind the LIKE operator is about twice faster than RLIKE:
As this change in ColumnStore replaces the regex based LIKE implementation to the MariaDB collation library implementation, I also expect near 2 times performance improvement. It would be nice to verify this. Thank you! | ||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-03-23 ] | ||||||||||||||||||
|
Build tested: 5.6.1 (Drone #1915) The issue has been fixed.
Still need to check performance | ||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-03-23 ] | ||||||||||||||||||
|
| ||||||||||||||||||
| Comment by Alexander Barkov [ 2021-03-24 ] | ||||||||||||||||||
|
Sorry, I must have not been precise enough about benchmarking.
The tests that you pasted in the last comment with queries like this:
do not involve ColumnStore at all. They are run on the server side completely and don't demonstrate how the patch affected LIKE performance in ColumnStore. I gave them only to show that in MariaDB, LIKE is faster than RLIKE. Therefore, in ColumnStore new LIKE implementation will hopefully be also faster than the old regex based one. | ||||||||||||||||||
| Comment by Alexander Barkov [ 2021-03-29 ] | ||||||||||||||||||
|
drrtuy, benchmarks showed a good performance improvement. Please continue with the review. Thanks. | ||||||||||||||||||
| Comment by Roman [ 2021-04-02 ] | ||||||||||||||||||
|
Closing b/c dleeyh had tested the patch. |