Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.0.8, 1.1.0
-
2017-10
Description
From mailing list:
CREATE TABLE `test_like` (
|
`dep` varchar(2) DEFAULT NULL
|
) ENGINE=Columnstore DEFAULT CHARSET=utf8
|
|
CREATE TABLE `test_like_my` (
|
`dep` varchar(2) DEFAULT NULL
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8
|
|
INSERT INTO test_like VALUES ('05'),('5'),('50'),('10');
|
INSERT INTO test_like_my VALUES ('05'),('5'),('50'),('10');
|
|
SELECT * FROM test_like;
|
+------+
|
| dep |
|
+------+
|
| 05 |
|
| 5 |
|
| 50 |
|
| 10 |
|
+------+
|
|
|
SELECT * FROM test_like_my;
|
+------+
|
| dep |
|
+------+
|
| 05 |
|
| 5 |
|
| 50 |
|
| 10 |
|
+------+
|
And 2 query on columnstore:
SELECT count(*) FROM test_like WHERE ( dep LIKE "05%" ) ;
|
+----------+
|
| count(*) |
|
+----------+
|
| 1 |
|
+----------+
|
SELECT count(*) FROM test_like WHERE ( dep LIKE "%05%" ) ;
|
+----------+
|
| count(*) |
|
+----------+
|
| 2 |
|
+----------+
|
And 2 query on MyIsam :
SELECT count(*) FROM test_like_my WHERE ( dep LIKE "05%" ) ;
|
+----------+
|
| count(*) |
|
+----------+
|
| 1 |
|
+----------+
|
SELECT count(*) FROM test_like_my WHERE ( dep LIKE "%05%" ) ;
|
+----------+
|
| count(*) |
|
+----------+
|
| 1 |
|
+----------+
|