[MCOL-1403] Trailing whitespace in CHAR/VARCHAR break string matches - Revisited Created: 2018-05-09 Updated: 2020-08-25 Resolved: 2018-05-22 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | None |
| Affects Version/s: | 1.1.4 |
| Fix Version/s: | 1.1.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Chris Calender (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Epic Link: | ColumnStore Compatibility Improvements | ||||||||||||||||
| Sprint: | 2018-10, 2018-11 | ||||||||||||||||
| Description |
|
This is a continuation of the following bug (which was fixed in 1.1.4): https://jira.mariadb.org/browse/MCOL-1246 However, the bug does not address some edge case comparisons. For instance, we've identified 2 cases where this is not working as expected: 1. This returns 0 results when the 'name' is "Majestic12 " (note trailing space):
2. This one, I'm not as sure if it is a bug or not, but was reported nonetheless. This query finds all rows in the table whether they end in space of not:
|
| Comments |
| Comment by Andrew Hutchings (Inactive) [ 2018-05-10 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ccalender I'm assuming in this case 'name' is a VARCHAR (not a CHAR)? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Chris Calender (Inactive) [ 2018-05-10 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
LinuxJedi Yes, exactly, this is a VARCHAR. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2018-05-10 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Test case: InnoDB:
ColumnStore:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2018-05-10 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Whitespace trim on filter was added in InfiniDB as their fix for something similar to | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2018-05-10 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Regression suite passes with patch. Pull request for engine and regression suite. For QA: See my comment with test case (same test case added to regression suite). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2018-05-22 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build verified: 1.1.5-1 source [root@localhost ~]# cat mariadb-columnstore-1.1.5-1-centos7.x86_64.bin.tar.gz.txt Merge pull request #112 from mariadb-corporation/davidhilldallas-patch-3 update to 1.1.5 /root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine Merge pull request #475 from drrtuy/ Reproduced the issues in 1.1.4-1 and verified fix. MariaDB [mytest]> insert into ws2 values (1, 'Majestic12 ', 'Majestic12 '); MariaDB [mytest]> select * from ws2 where lower(b) like 'majestic12 '; MariaDB [mytest]> select * from ws2 where lower(c) like 'majestic12 ';
-----
----- MariaDB [mytest]> select concat(b, '#') from ws2 where b like '% '; MariaDB [mytest]> select concat(c, '#') from ws2 where c like '% ';
----------------
---------------- |