[MCOL-656] Error in LIKE behaviour Created: 2017-04-06 Updated: 2017-05-11 Resolved: 2017-05-11 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | PrimProc |
| Affects Version/s: | 1.0.8, 1.1.0 |
| Fix Version/s: | 1.0.9, 1.1.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Andrew Hutchings (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | community | ||
| Sprint: | 2017-10 |
| Description |
|
From mailing list:
And 2 query on columnstore:
And 2 query on MyIsam :
|
| Comments |
| Comment by Andrew Hutchings (Inactive) [ 2017-04-06 ] | ||||||||||||||||||||||||||
|
It is matching the wrong ones too...
| ||||||||||||||||||||||||||
| Comment by Pierre Coustilas [ 2017-04-06 ] | ||||||||||||||||||||||||||
|
interesting. I tested with a varchar (3) instead of varchar (2). The result is columnstore in correct :
| ||||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2017-05-09 ] | ||||||||||||||||||||||||||
|
Four pull requests open. Two on engine (develop and develop-1.0), two on regression suite (master and 1.0). The cause was essentially the LIKE was truncated to the length of the column when the column was a non-dictionary column (< 8 bytes). So for the original test case the LIKE on "%05%" became a LIKE on "%0" which matches 10 and 50. LIKE is now pushed through expression step instead of simple filter step which has an 8 byte limitation on non-dictionary CHAR/VARCHAR. | ||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2017-05-11 ] | ||||||||||||||||||||||||||
|
Build verified: 1.0.9-1 MariaDB [mytest]> SELECT count
----------
---------- MariaDB [mytest]> SELECT count
----------
---------- | ||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2017-05-11 ] | ||||||||||||||||||||||||||
|
Build verified: Github source 1.1.0-1 [root@localhost mariadb-columnstore-server]# git show Merge pull request #50 from mariadb-corporation/10.2-fixes 10.2 fixes [root@localhost mariadb-columnstore-server]# cd mariadb-columnstore-engine/ Merge pull request #182 from mariadb-corporation/ MariaDB [mytest]> CREATE TABLE `test_like` ( MariaDB [mytest]> INSERT INTO test_like VALUES ('05'),('5'),('50'),('10'); MariaDB [mytest]> SELECT * FROM test_like;
------
------ MariaDB [mytest]> SELECT count
----------
---------- MariaDB [mytest]>
----------
---------- |