When you do LEFT JOIN ower several tables (in my case 7) and when (at least i think) one of them contains no rows at all, mysql gets: ERROR 2013: Lost connection to MySQL server during query and to mysql error log appears : mysqld process hanging, pid 7198 - killed 001207 19:03:31 mysqld restarted /usr/libexec/mysqld: ready for connections HERE is my sql query: select distinct tootaja.uid as tootid, broneering.uid as bronid, broneeritud_objekt.uid as bronobid, teenus.uid as teenid, teenusepakett.uid as tpakkid, SUM(teenus.hind) as thind, SUM (teenus_teenusepakett.hind) as tphind, teenus.ajakulu as tkulu, teenusepakett.ajakulu as tpkulu from tootaja left join broneering on tootaja.uid=broneering.tootaja_id left join broneeritud_objekt on broneering.uid=broneeritud_objekt.broneering_id left join teenus on broneeritud_objekt.teenus_id=teenus.uid left join teenusepakett on broneeritud_objekt.teenusepakett_id=teenusepakett.uid left join teenus_teenusepakett on teenusepakett.uid=teenus_teenusepakett.teenusepakett_id left join teenus_teenusepakett as ttpp on teenus.uid=ttpp.teenus_id where tootaja.uid=1 and broneering.uid=1 group by broneeritud_objekt.uid; AND WHERE all the tables contained at least 1 row ecxept one (teenusepakett) mysql> select count(*) from teenusepakett; +----------+ | count(*) | +----------+ | 0 | +----------+
1) Would it be possible for you to make a test script, like the ones to http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=19604 More data is needed, as we need to be able to reproduce the bug in order to fix (and verify a fix) for it. 2) Could you try the MySQL packages currently in Rawhide?
Do you have a testcase?
Created attachment 6412 [details] database dump for testing the left join crash. (Note the 2 left joins to one table)
Created attachment 6413 [details] SQL query that does the crash.
Thanks a lot - I can reproduce it. Will look into it.
This should be fixed in 3.23.29-0.1 and newer, coming soon to a Rawhide near you. For a few days, you can also pick it up at http://people.redhat.com/teg/db/