Bug #18132 MySQL shutdowns after executing a query several times
Submitted: 10 Mar 2006 13:05 Modified: 22 Mar 2006 13:32
Reporter: Dinko Ostric Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.18 OS:Windows (Windows XP, Windows Server 2003)
Assigned to: CPU Architecture:Any

[10 Mar 2006 13:05] Dinko Ostric
Description:
After executing a querry the MySQL srever shutdowns leaving to trace of what happened (in Windows you get the usual message: '...this program has performed an illegal operation and needs to shut down....'). The problem happends after executing one identical querry for more than 200 times. The querry must be a little bit more complex, selecting more than one table. The biggest table has 25000 rows. 

How to repeat:
Structure of the querry:

SELECT x1, x2, x3, x4, x5, x6, x7, x8, x9, x10 as 'xx', sum(x11), 'xxx' as 'XXX', 'a' as 'A', 'b' as 'B'
from a, b, c
WHERE xx=yy 
and yy=zz
and V BETWEEN v1 and v2
and qq <= qq1
and qq = 40 
and p1=p2
group by 1,2,3,4,5,6,7,8
order by 1,2,3,4,5,6,7,8

Of course, this is not the only querry width wich you can get the error, any similar - a little bit complex querry does the same error (no matter witch tables you are selecting)!

Suggested fix:
We descowered that the problem has something to do with the querry cache. If we add an additional field to the select statement like now(), and perform after each querry FLUSH QUERRY CACHE, the problem does not happen. If you do not add this field the querry sometimes runs once, then displays results, and mysql shuts down (performing an "illegal operation").
[10 Mar 2006 13:11] MySQL Verification Team
Thank you for the bug report.

Could you please provide the dump file with table definition and
insert data for to try to test on our side. You can upload the file
zipped at:

ftp://ftp.mysql.com:/pub/mysql/upload

using a file name like bug18132.zip

Thanks in advance.
[22 Mar 2006 13:31] Dinko Ostric
After upgrading to MySQL 5.0.19 the problem has disapeared.
[22 Mar 2006 13:32] Dinko Ostric
The problem disapeared after upgrading MySQL to the new version 5.0.19.