Bug #64354 LIKE function does not work in MySQL Cluster 7.2.4 for UTF8 char/varchar fields
Submitted: 16 Feb 2012 15:45 Modified: 16 Feb 2012 17:33
Reporter: Sourav Gupta Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:7.2.4 GA OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: like, MySQL Cluster, utf8

[16 Feb 2012 15:45] Sourav Gupta
Description:
LIKE function is not working in MySQL Cluster 7.2.4 on columns with CHAR/VARCHAR type with CHARSET as utf8. This bug is also present in version 7.1.19 (Bug #64039) <http://bugs.mysql.com/bug.php?id=64039>.

This being a serious functional bug can we get a fix/patch be made available for this as a temporary solution?

How to repeat:
Please follow the steps described below:

mysql> create table tbl1 (col1 int(10), col2 char(50), col3 varchar(50)) engine ndbcluster default charset utf8;
Query OK, 0 rows affected (0.15 sec)

mysql> show create table tbl1;
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                                                    |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tbl1  | CREATE TABLE `tbl1` (
  `col1` int(10) DEFAULT NULL,
  `col2` char(50) DEFAULT NULL,
  `col3` varchar(50) DEFAULT NULL
) ENGINE=ndbcluster DEFAULT CHARSET=utf8 |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> insert into tbl1 values(1, 'aaa-one', 'bbb-one');
Query OK, 1 row affected (0.00 sec)

mysql> insert into tbl1 values(2, 'aaa-two', 'bbb-two');
Query OK, 1 row affected (0.00 sec)

mysql> select * from tbl1;
+------+---------+---------+
| col1 | col2    | col3    |
+------+---------+---------+
|    1 | aaa-one | bbb-one |
|    2 | aaa-two | bbb-two |
+------+---------+---------+
2 rows in set (0.00 sec)

mysql> select * from tbl1 where col1 like 'aa%';
Empty set (0.00 sec)

mysql> select * from tbl1 where col2 like 'bb%';
Empty set (0.00 sec)

mysql> select * from tbl1;
+------+---------+---------+
| col1 | col2    | col3    |
+------+---------+---------+
|    2 | aaa-two | bbb-two |
|    1 | aaa-one | bbb-one |
+------+---------+---------+
2 rows in set (0.00 sec)

mysql>
[16 Feb 2012 17:33] 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.
I.e this bug did not make the 7.2.4 cut-off date.

Closing this as duplicate

There is a patch attached to bug#64039

/Jonas
[20 Feb 2012 12:09] Sourav Gupta
Hi Jonas,

Thank you for your response.

Do you have any idea of when 7.1.20 or 7.2.4 will be available? Just a rough idea should be sufficient as I understand that you may not know the exact date.

Sourav.