Bug #27079 | Crash while grouping empty ucs2 strings | ||
---|---|---|---|
Submitted: | 13 Mar 2007 12:16 | Modified: | 4 Apr 2007 5:38 |
Reporter: | [ name withheld ] | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Charsets | Severity: | S2 (Serious) |
Version: | 4.1.22/5.0/5.1BK | OS: | Linux (Linux) |
Assigned to: | Alexander Barkov | CPU Architecture: | Any |
Tags: | crash, ucs2, Unicode |
[13 Mar 2007 12:16]
[ name withheld ]
[13 Mar 2007 13:17]
MySQL Verification Team
Testing 4.1 source tree: /home/miguel/dbs/4.1/libexec/mysqld: ready for connections. Version: '4.1.23-debug' socket: '/tmp/mysql.sock' port: 3306 Source distribution [New Thread -1309127776 (LWP 10040)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1309127776 (LWP 10040)] my_uca_scanner_next_ucs2 (scanner=0xb1f835c4) at ctype-uca.c:6823 6823 scanner->page= (unsigned char)scanner->sbeg[0]; Current language: auto; currently c (gdb) bt full #0 my_uca_scanner_next_ucs2 (scanner=0xb1f835c4) at ctype-uca.c:6823 ucaw = (uint16 **) 0x86a7428 ucal = (uchar *) 0x86a7828 "\004\004\003\004\003\003\003\003" #1 0x084af545 in my_hash_sort_uca (cs=0x866b900, scanner_handler=0x866c7ac, s=0x0, slen=0, n1=0xb1f83654, n2=0xb1f83650) at ctype-uca.c:7171 s_res = 140949760 scanner = {wbeg = 0x868ebdc, sbeg = 0x0, send = 0xfffffffe <Address 0xfffffffe out of bounds>, uca_length = 0x86a7828 "\004\004\003\004\003\003\003\003", uca_weight = 0x86a7428, contractions = 0x0, implicit = {13876, 45560}, page = 0, code = 1, cs = 0xb1f83630} #2 0x084af8aa in my_hash_sort_ucs2_uca (cs=0x866b900, s=0x0, slen=0, n1=0xb1f83654, n2=0xb1f83650) at ctype-uca.c:8000 No locals.
[13 Mar 2007 13:38]
MySQL Verification Team
Thank you for the bug report. 5.0 and 5.1 also affected by this bug.
[26 Mar 2007 9:56]
Alexander Barkov
A simplified test demonstrating the same problem: mysql> CREATE TABLE `t1` ( -> `c1` text character set ucs2 collate ucs2_polish_ci NOT NULL -> ) ENGINE=MyISAM DEFAULT CHARSET=latin2; Query OK, 0 rows affected (0.01 sec) mysql> insert into t1 values (''),('a'); Query OK, 2 rows affected (0.00 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql> SELECT COUNT(*), c1 FROM t1 GROUP BY c1; ERROR 2013 (HY000): Lost connection to MySQL server during query
[27 Mar 2007 7:23]
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/22978
[29 Mar 2007 7:09]
Alexander Barkov
pushed into 5.0.38 pushed into 5.1.17
[31 Mar 2007 23:53]
Bugs System
Pushed into 5.0.40
[31 Mar 2007 23:55]
Bugs System
Pushed into 5.1.18-beta
[3 Apr 2007 22:35]
Paul DuBois
Noted in 5.0.40, 5.1.18 changelogs. GROUP BY on a ucs2 column caused a server crash when there was at least one empty string in the column. Will this be fixed in 4.1.x?
[4 Apr 2007 5:38]
Paul DuBois
No fix for 4.1.x. Closing report.