Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 4 product line. The current stable release is 4.9. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 201988

Summary: Queries using a column name multiple times in ORDER BY crash mysql
Product: Red Hat Enterprise Linux 4 Reporter: Anchor Systems Managed Hosting <managed>
Component: mysqlAssignee: Tom Lane <tgl>
Status: CLOSED ERRATA QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: byte, hhorak, tao
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
URL: http://bugs.mysql.com/bug.php?id=20287
Whiteboard:
Fixed In Version: RHSA-2008-0768 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-24 20:04:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 278461    
Bug Blocks:    

Description Anchor Systems Managed Hosting 2006-08-10 08:17:59 UTC
Description of problem:

The problem has been logged here: http://bugs.mysql.com/bug.php?id=20287
In essence if you double up a table name in a query's ORDER BY section, mysql
will crash.

Version-Release number of selected component (if applicable):
4.1.20-1.RHEL4.1

How reproducible:
Every time using an appropriate query.

Steps to Reproduce:
1. Generate a query that uses a particular table name twice (or more times) in
the ORDER BY section, such as the following:

SELECT DISTINCT memberId ,lastName ,firstName ,email
,emailConfirm ,registered ,lastContacted ,stateId
,postcode ,lastAttended ,ccRemember ,ccName ,ccType
,ccSecurity ,ccNumber ,ccExpiry ,address1 ,address2
,suburb ,phone ,fax ,phoneOther ,mobile ,bounced
,bouncedDate ,donotsend ,comments ,interestEventTypeId FROM
tblDiscoverMassageMembers ORDER BY
firstName,lastName,lastName,firstName LIMIT 20;
  
Actual results:
MySQL segfaults

Expected results:
The query should return without MySQL segfaulting.

Comment 2 RHEL Program Management 2008-02-01 19:12:51 UTC
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".

Comment 8 errata-xmlrpc 2008-07-24 20:04:07 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 therefore 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-2008-0768.html