Product: Red Hat Linux
Classification: Retired
Component: mysql (Show other bugs)
i386 Linux
high Severity medium
: ---
: ---
Assigned To: Patrick Macdonald
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2000-12-07 12:09 EST by Martin Pedak
Modified: 2007-03-26 23:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-12-14 13:41:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
database dump for testing the left join crash. (Note the 2 left joins to one table) (5.09 KB, text/plain)
2000-12-14 13:18 EST, Martin Pedak
no flags Details
SQL query that does the crash. (804 bytes, text/plain)
2000-12-14 13:19 EST, Martin Pedak
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2000:133 normal SHIPPED_LIVE Updated mysql packages available for Red Hat Linux 7 2000-12-19 00:00:00 EST

  None (edit)
Description Martin Pedak 2000-12-07 12:09:15 EST
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 
mysql> select count(*) from teenusepakett;
| count(*) |
|        0 |
Comment 1 Trond Eivind Glomsrxd 2000-12-07 15:16:56 EST
1) Would it be possible for you to make a test script, like the ones to
   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?
Comment 2 Trond Eivind Glomsrxd 2000-12-14 12:11:49 EST
Do you have a testcase?
Comment 3 Martin Pedak 2000-12-14 13:18:09 EST
Created attachment 6412 [details]
database dump for testing the left join crash. (Note the 2 left joins to one table)
Comment 4 Martin Pedak 2000-12-14 13:19:44 EST
Created attachment 6413 [details]
SQL query that does the crash.
Comment 5 Trond Eivind Glomsrxd 2000-12-14 13:40:56 EST
Thanks a lot - I can reproduce it. Will look into it.
Comment 6 Trond Eivind Glomsrxd 2000-12-18 16:32:16 EST
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/

Note You need to log in before you can comment on or make changes to this bug.