Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3.9, 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL)
-
None
-
Windows Plateform
Description
MariaDB [(none)]> use test;
|
Database changed
|
|
MariaDB [test]> create table like_test(name varchar(20) character set 'utf8' collate 'utf8_unicode_ci');
|
Query OK, 0 rows affected (0.012 sec)
|
|
MariaDB [test]> insert into like_test values('radio! test');
|
Query OK, 1 row affected (0.003 sec)
|
|
MariaDB [test]> select * from like_test where name like '%!!%' escape '!';
|
Empty set (0.002 sec) -- this is wrong!
|
|
MariaDB [test]> ALTER TABLE like_test CHANGE COLUMN name name VARCHAR(20) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';
|
Query OK, 1 row affected (0.032 sec)
|
Records: 1 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> select * from like_test where name like '%!!%' escape '!';
|
+-------------+
|
| name |
|
+-------------+
|
| radio! test |
|
+-------------+
|
1 row in set (0.001 sec)
|
I still get empty set when I alter the collation of the field "name" to utf8_unicode_520_ci, utf8mb4_unicode_ci, utf8mb4_unicode_520_ci. But all work fine on utf8_general_ci, utf8mb4_general_ci.
Pls forgive me for my bad english.
Attachments
Issue Links
- is duplicated by
-
MDEV-13335 UTF8 escape wildcard LIKE match has different behavior in different collations
- Closed
- links to