Bug #31806 mysql lost connection problem when using union and from
Submitted: 24 Oct 2007 4:01 Modified: 24 Nov 2007 7:07
Reporter: Martin Tilsted Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.32-Debian_7etch1-log and 5.0.27 OS:Any
Assigned to: CPU Architecture:Any

[24 Oct 2007 4:01] Martin Tilsted
Description:
When doing the following queries(The one in the 'the how to repeat' field) the mysql client looses the connection to the server (And mysql.log says it crashed).

How to repeat:
To repeat use this sql: (Tested (Not working) on 5.0.27 and 5.0.32-Debian_7etch1-log) 

CREATE TABLE leagueMatch (
	dbuMatchId int not null,
	homeTeam int not null,
	awayTeam int not null,
	numGoalsHomeTeam int,
	numGoalsAwayTeam int,
	matchStart datetime not null,
	key(matchStart),
primary key(dbuMatchId)
);

select sum(t1.numGoalsHomeTeam) from ((select numGoalsHomeTeam from leagueMatch where homeTeam=139 and matchStart < now() union (select numGoalsAwayTeam from leagueMatch where awayTeam=139 and matchStart < now()) order by matchStart desc limit 5) as t1);
[24 Oct 2007 7:07] Sveta Smirnova
Thank you for the report.

But version 5.0.32 is old. Additionally with current version SELECT query fails with sybtax error. Please try with current version 5.0.45 and if you can repeat described behaviour provide valid SELECT query.
[25 Nov 2007 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".