Bug #32389 Character sets: crash if utf16 and regexp

Submitted: 14 Nov 2007 19:45 Modified: 6 Dec 2007 7:37
Reporter: Peter Gulutzan Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Charsets Severity:S3 (Non-critical)
Version:5.2.6-alpha-debug OS:Linux (SUSE 10 64-bit)
Assigned to: Assigned Account CPU Architecture:Any

[14 Nov 2007 19:45] Peter Gulutzan
Description:
I'm using the mysql-5.2-rpl team tree.

I create a table with a utf16 column.
I try to search the table using REGEXP.
Crash.

How to repeat:
drop table if exists utf16;
create table utf16 (utf16 varchar(1) character set utf16);
insert into utf16 values ('a');
select utf16 regexp 'ン' from utf16;

Example:

mysql> drop table if exists utf16;
Query OK, 0 rows affected (0.00 sec)

mysql> create table utf16 (utf16 varchar(1) character set utf16);
Query OK, 0 rows affected (0.01 sec)

mysql> insert into utf16 values ('a');
Query OK, 1 row affected (0.00 sec)

mysql> select utf16 regexp 'ン' from utf16;
ERROR 2013 (HY000): Lost connection to MySQL server during query
[23 Nov 2007 7:25] Alexander Barkov
Verified as described.

This bug should be fixed as soon as this bug fix is merged:
http://bugs.mysql.com/bug.php?id=32389

Waiting for merge, with intension to close this one as duplicate.
[29 Nov 2007 9:23] Alexander Barkov
There was a mistake in my previous comment.
This bug seems to be duplicate with:

Bug#31081 "server crash in regexp function"
[6 Dec 2007 7:37] Alexander Barkov
This bug was fixed by:

Bug#31081 "server crash in regexp function"
[6 Dec 2007 7:44] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/39376

ChangeSet@1.2699, 2007-12-06 11:42:19+04:00, bar@mysql.com +8 -0
  Bug#32389 [Dup] crash if utf16 and regexp
  Adding test coverage for REGEXP
  No code changes.
[5 Feb 2008 13:08] Bugs System
Pushed into 6.0.5-alpha

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.041 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.