Bug #63603 | Like clause in char and varchar data-type fields return no-results | ||
---|---|---|---|
Submitted: | 5 Dec 2011 14:14 | Modified: | 16 Feb 2012 17:35 |
Reporter: | Marco Sperandio | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S1 (Critical) |
Version: | 7.1.17 - 7.1.18 | OS: | Linux |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | like clause no-result, mysql-cluster 7.1.17 - 7.1.18 like clause |
[5 Dec 2011 14:14]
Marco Sperandio
[7 Dec 2011 17:05]
Marco Sperandio
Dear tech support, I forgot to say that I used this systems for my cluster architecture: RHEL 5.4 for SQL nodes RHEL 5.6 for Data nodes I have installed this RPMs: rhel5.x86_64 Thank You in advance Best regards Marco Sperandio
[12 Dec 2011 5:14]
Xindong Su
I meet the same bug. I found that if the charset of the table is something other than utf8, by using convert function the like clause can work. But if the charset of the table is utf8 then the like clause doesn't work. Example: mysql> CREATE TABLE `test`.`gbktest` ( `UserAccount` CHAR(4) DEFAULT NULL, `UserName` CHAR(10) DEFAULT NULL ) ENGINE=NDBCLUSTER DEFAULT CHARSET=gbk; mysql> CREATE TABLE `test`.`utf8test` ( `UserAccount` CHAR(4) DEFAULT NULL, `UserName` CHAR(10) DEFAULT NULL ) ENGINE=NDBCLUSTER DEFAULT CHARSET=utf8; mysql> insert into `gbktest`(`UserAccount`,`UserName`) values ('0000','aaaa'),('1111','bbbb'); mysql> insert into `utf8test`(`UserAccount`,`UserName`) values ('1111','aaaa'),('0000','bbbb'); mysql> SELECT * FROM gbktest WHERE username LIKE "%a%"; Empty set (0.09 sec) mysql> SELECT * FROM gbktest WHERE username LIKE convert("%a%" using utf8); +-------------+----------+ | UserAccount | UserName | +-------------+----------+ | 1111 | aaaa | +-------------+----------+ 1 row in set (0.06 sec) mysql> SELECT * FROM utf8test WHERE username LIKE "%a%"; Empty set (0.06 sec) mysql> SELECT * FROM utf8test WHERE username LIKE convert("%a%" using utf8); Empty set (0.08 sec)
[27 Dec 2011 8:49]
Marco Sperandio
Dear tech support, The problem still persist in MySQL Cluster 7.1.18
[16 Feb 2012 11:49]
Claudio Nanni
Just to make this clear, is it happening on all OS's? I see a report for Sun Solaris and one(this) for Linux.
[16 Feb 2012 12:04]
Marco Sperandio
Hello, I don't know if the bug is present on other operating systems, I use MySQL Cluster only on linux systems. P.S. The bug is still present in 7.1.19, released on 30/01/2012 regards
[16 Feb 2012 17:35]
Jonas Oreland
Hi, This is a duplicate of http://bugs.mysql.com/bug.php?id=64039. This bug is fixed in upcoming 7.1.20 and 7.2.5. Closing this as duplicate /Jonas