Bug 163694 - Parser issue with subqueries involving unions
Summary: Parser issue with subqueries involving unions
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: mysql
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Tom Lane
QA Contact: David Lawrence
URL: http://bugs.mysql.com/bug.php?id=2435
Whiteboard:
Depends On:
Blocks: 156322
TreeView+ depends on / blocked
 
Reported: 2005-07-20 13:57 UTC by Nick Stacey
Modified: 2013-07-03 03:06 UTC (History)
1 user (show)

Fixed In Version: RHSA-2005-685
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-05 12:45:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2005:685 0 qe-ready SHIPPED_LIVE Low: mysql security update 2005-10-05 04:00:00 UTC

Description Nick Stacey 2005-07-20 13:57:29 UTC
Description of problem:

There is a known issue with the supported version of mysql 4.1.10a. The parser 
mis-reads a query that has a union inside a subquery. This has been fixed in 
mysql 4.1.11. More information is contained on the official mysql site. 
http://bugs.mysql.com/bug.php?id=2435

Version-Release number of selected component (if applicable):

4.1.10a

How reproducible:

Every time.

Steps to Reproduce:

1. Feed the following query into mysql - 
CREATE TABLE t1 (a int not null, b char (10) not null); 
INSERT INTO t1 VALUES(1,'a'),(2,'b'),(3,'c'),(3,'c'); 
SELECT * FROM ((SELECT * FROM t1 LIMIT 1) UNION (SELECT * FROM t1 LIMIT 1)) a; 
  
Actual results:

Error - #1248 - Every derived table must have its own alias 

Expected results:

+---+---+
| a | b |
+---+---+
| 1 | a |
+---+---+
1 row in set (0.01 sec)

Additional info:

Comment 4 Tom Lane 2005-07-28 17:00:33 UTC
mysql 4.1.12 will be in RHEL4 U2.

Comment 5 Red Hat Bugzilla 2005-10-05 12:45:17 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-685.html



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