Bug 163694 - Parser issue with subqueries involving unions
Parser issue with subqueries involving unions
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: mysql (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tom Lane
David Lawrence
http://bugs.mysql.com/bug.php?id=2435
:
Depends On:
Blocks: 156322
  Show dependency treegraph
 
Reported: 2005-07-20 09:57 EDT by Nick Stacey
Modified: 2013-07-02 23:06 EDT (History)
1 user (show)

See Also:
Fixed In Version: RHSA-2005-685
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-05 08:45:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nick Stacey 2005-07-20 09:57:29 EDT
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 13:00:33 EDT
mysql 4.1.12 will be in RHEL4 U2.
Comment 5 Red Hat Bugzilla 2005-10-05 08:45:17 EDT
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.