Bug 201988 - Queries using a column name multiple times in ORDER BY crash mysql
Queries using a column name multiple times in ORDER BY crash mysql
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: mysql (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Tom Lane
David Lawrence
Depends On: 278461
  Show dependency treegraph
Reported: 2006-08-10 04:17 EDT by Anchor Systems Managed Hosting
Modified: 2013-07-02 23:10 EDT (History)
3 users (show)

See Also:
Fixed In Version: RHSA-2008-0768
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-24 16:04:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2008:0768 normal SHIPPED_LIVE Moderate: mysql security, bug fix, and enhancement update 2008-07-24 13:12:22 EDT

  None (edit)
Description Anchor Systems Managed Hosting 2006-08-10 04:17:59 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
will crash.

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

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 Product and Program Management 2008-02-01 14:12:51 EST
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 16:04:07 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 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.


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