subselect bug in amd64 compiled version

Bug #84209 reported by Patrik Wallström
4
Affects Status Importance Assigned to Milestone
mysql-dfsg-5.0 (Ubuntu)
Fix Released
Undecided
Unassigned
Dapper
Invalid
Medium
Unassigned

Bug Description

Binary package hint: mysql-server-5.0

I just got hit by this bug using the amd64 version of mysql-server-5.0 in Dapper. The bug fits the description in this upstream bug report:
http://bugs.mysql.com/bug.php?id=24056

The bug is not present in the x86 version in the same package.

Tags: dapper
description: updated
Revision history for this message
Mathias Gug (mathiaz) wrote :

Thanks taking the time to report this bug and helping to make Ubuntu better. However, I am closing it because the bug has been fixed in the latest development version of Ubuntu - the Gutsy Gibbon.

Changed in mysql-dfsg-5.0:
status: New → Fix Released
Revision history for this message
Mathias Gug (mathiaz) wrote :

Confirmed by upstream. Fixed in 5.0.32.

Changed in mysql-dfsg-5.0:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

The patch looks sane: http://lists.mysql.com/commits/15001

This looks quite serious to me, and we should consider it for the dapper point release.

Changed in mysql-dfsg-5.0:
assignee: nobody → mathiaz
Revision history for this message
Mathias Gug (mathiaz) wrote :

I've looked at the patch. However, it doesn't apply as the code related to the subquery optimization is not in dapper.

Can you confirm that the testcase described in the upstream bug report (subselect.test) fails on dapper 64 bits ?

Changed in mysql-dfsg-5.0:
status: Triaged → Incomplete
Revision history for this message
Patrik Wallström (pawal) wrote : Re: [Bug 84209] Re: subselect bug in amd64 compiled version

On Tue, 24 Jul 2007, Mathias Gug wrote:

> I've looked at the patch. However, it doesn't apply as the code related
> to the subquery optimization is not in dapper.
>
> Can you confirm that the testcase described in the upstream bug report
> (subselect.test) fails on dapper 64 bits ?

I don't really understand what you mean. I used the MySQL from Dapper,
works fine in x86 and fails on amd64. Don't know about the actual code
or patch, but the patch is very likely referring to the exact problem
I had. (I rewrote my own code since so I won't be affected.)

--
patrik_wallstrom->foodfight-><email address hidden>->+46-733173956

Revision history for this message
Mathias Gug (mathiaz) wrote :

On Tue, Jul 24, 2007 at 07:41:48PM -0000, Patrik Wallström wrote:
> I don't really understand what you mean. I used the MySQL from Dapper,
> works fine in x86 and fails on amd64.
Can you provide a specific test case ?

Revision history for this message
Patrik Wallström (pawal) wrote :

On Tue, 24 Jul 2007, Mathias Gug wrote:

> On Tue, Jul 24, 2007 at 07:41:48PM -0000, Patrik Wallström wrote:
> > I don't really understand what you mean. I used the MySQL from Dapper,
> > works fine in x86 and fails on amd64.
> Can you provide a specific test case ?

Here is the diff that fixed our problem:

 SELECT DOMAINS.*
 FROM DOMAINS
-WHERE DATE_ADD(REGDATE, INTERVAL 5 DAY) < NOW()
-AND '".$welcome_desc."' NOT IN (
-SELECT VALUE FROM DOMAIN_LOG
-WHERE DOMAIN_LOG.DOMAIN_ID=DOMAINS.DOMAIN_ID AND
-LOGDATE > DOMAINS.REGDATE
-)
+LEFT JOIN DOMAIN_LOG
+ ON (DOMAIN_LOG.DOMAIN_ID=DOMAINS.DOMAIN_ID AND
+ DOMAIN_LOG.VALUE='".$welcome_desc." AND
+ LOGDATE > DOMAINS.REGDATE')
+WHERE
+DATE_ADD(REGDATE, INTERVAL 5 DAY) < NOW() AND
+DOMAIN_LOG.VALUE IS NULL
 AND STATE = ".DOMAIN_ACTIVE."

It would take a lot of effort to strip out the tables and generate
test data for you, but let me know if you really need it. I may not be
able to reach my people right now since everybody is on vacation in
Sweden. But you might be able figure out the relevant schema by
looking at the above SQL statements.

--
patrik_wallstrom->foodfight-><email address hidden>->+46-733173956

Revision history for this message
Mathias Gug (mathiaz) wrote :

Thanks for your answer.

I've tried to reproduce a test case, but I haven't succeeded. I'm missing the data under which the crash occurs. I've attached test.sql that is a stub for a testcase. Can you have a look at it and come up with the right INSERT commands to get the server crash ?

Also, the mysql bug you've mentioned depends on code that has been introduced in release 5.0.32 of mysql. The version of mysql in dapper is based on 5.0.22. So I'm not sure that you've hit the same bug. Could it be bug 8804 (http://bugs.mysql.com/bug.php?id=8804) ?

Thank you,

Revision history for this message
Martin Pitt (pitti) wrote :

Needs more investigation, let's drop that for dapper.2.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

In investigating another issue, I came across this bug. The patch for http://lists.mysql.com/commits/15001 is dependent upon the patches for http://bugs.mysql.com/bug.php?id=8804. 8804 does not apply cleanly and probably requires at least one additional patch that needs to be identified. Based on the comments in 8804, the patch for http://bugs.mysql.com/bug.php?id=23485 is likely also desirable.

I am not actively working on this bug and am simply passing along what I found in my research.

Mathias Gug (mathiaz)
Changed in mysql-dfsg-5.0:
assignee: mathiaz → nobody
Revision history for this message
JC Hulce (soaringsky) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The version of Ubuntu you're reporting this issue on is in End of Life status, and newer versions have fixed this issue. You can learn more about this at https://wiki.ubuntu.com/Releases

Changed in mysql-dfsg-5.0 (Ubuntu Dapper):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.