Bug #45948 MySQL crashes with select statement (thai character in where clause)
Submitted: 4 Jul 2009 18:06 Modified: 8 Jul 2009 5:23
Reporter: Chaiyaporn Suratemekul Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Charsets Severity:S1 (Critical)
Version:5.1.3x / 5.4.x OS:Any
Assigned to: CPU Architecture:Any

[4 Jul 2009 18:06] Chaiyaporn Suratemekul
MySQL Server above 5.1.30 crash with error message

Version: '5.1.34'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)
090705  1:53:10 - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 572353 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0xaf20240
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x9102c3b8 thread_stack 0x30000
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0xaf70330 = select hn as code,concat(pname,' ',fname,'  ',lname) as ptname,fathername,mathername,admit from patient where (fname_soundex like 'ป%') or (fname like 'ป%') order by fname,lname  limit 100
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
090705 01:53:10 mysqld_safe Number of processes running now: 0
090705 01:53:10 mysqld_safe mysqld restarted

How to repeat:
This error occur only when table has data more than 40,000 rows and contain Thai character in column  in where clause.

I've populate sample table structure and data that can download from

after restore table (patient) into mysql and run this query

select hn ,concat(pname,' ',fname,'  ',lname) as patient_name  from patient where (fname_soundex like 'ป%') or (fname like 'ป%') order by fname,lname  limit 100;

server will crash.

(This error not occur in MySQL 5.1.30 and below)
[4 Jul 2009 18:14] Chaiyaporn Suratemekul
I've upload file to ftp.mysql.com filename bug-data-45948.zip
[6 Jul 2009 5:37] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior. Please provide output of SHOW VARIABLES LIKE 'char%' and SHOW VARIABLES LIKE 'coll%'
[6 Jul 2009 9:48] Sveta Smirnova
Most likely duplicate of bug #44810
[8 Jul 2009 5:23] Chaiyaporn Suratemekul
This bug has been solved in MySQL 5.1.36