Bug #8927 | prepared statement with multiple left joins of same table hangs | ||
---|---|---|---|
Submitted: | 3 Mar 2005 16:36 | Modified: | 3 Jun 2005 11:31 |
Reporter: | Daniel Blumenthal | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S2 (Serious) |
Version: | 4.1.10 | OS: | Linux (Linux RH 8.0) |
Assigned to: | Timour Katchaounov | CPU Architecture: | Any |
[3 Mar 2005 16:36]
Daniel Blumenthal
[3 Mar 2005 16:51]
Daniel Blumenthal
I should mention - the reason the title of the bug indicates a hang bug is that with millions of lines of data, it would hang the machine and overrun disk space trying to prepare an answer.
[14 Mar 2005 11:46]
Hartmut Holzgraefe
Verified, the statement should look like this though: PREPARE pstmt FROM 'select w1.ID,w1.text,w2.ID,w2.text,wtp1.tupleID,wtp2.tupleID from word as w1 left join wordTuplePair as wtp1 on wtp1.wordID=w1.ID left join wordTuplePair as wtp2 on wtp2.tupleID=wtp1.tupleID left join word as w2 on w2.ID=wtp2.wordID where w1.text="a" and w2.languageID=2'; (note the different table aliases for the 2 last result columns)
[24 Mar 2005 5:09]
Jorge del Conde
verified using 4.1.11 from bk
[25 Apr 2005 16:27]
[ name withheld ]
I have a similar problem with 5.0.4beta, using a query where the subselect contains multiple left outer joins.
[3 Jun 2005 11:31]
Timour Katchaounov
I tried to reproduce this bug with 4.1.13 (debug and release) and 5.0.7 (debug) and everything worked. I am running on SuSe 9.3. Could you please re-verify and check if this is RH 8.0 specific ?
[21 Jul 2005 14:04]
Daniel Blumenthal
I have tested this on RH8 with 4.1.13, and it appears to work fine. I will test to see if it works in the more complex, actual code.