Red Hat Bugzilla – Bug 201988
Queries using a column name multiple times in ORDER BY crash mysql
Last modified: 2013-07-02 23:10:41 EDT
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
Version-Release number of selected component (if applicable):
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;
The query should return without MySQL segfaulting.
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 "?".
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.