Bug #1160 order of columns selected in select statement changes number of rows returned

Submitted: 28 Aug 2003 11:59 Modified: 10 Sep 2003 1:13
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.0.12 OS:Linux (redhat 7.3)
Assigned to: CPU Architecture:Any

[28 Aug 2003 11:59] [ name withheld ]
Description:
the order of the columns in the select statement changes the number of records returned.

select pools.ID, pools.NAME, types.NAME, DATE_FORMAT(types.SDATE, $LDF), cats.NAME, cats.SUB1, types.MULTISDATE from types, cats, pools where types.MULTISDATE IS NOT NULL and types.CATID=cats.ID and pools.TYP
ESID=types.ID

returns 1 record

select pools.ID, pools.NAME, types.MULTISDATE, types.NAME, DATE_FORMAT(types.SDATE, $LDF), cats.NAME, cats.SUB1 from types, cats, pools where types.MULTISDATE IS NOT NULL and types.CATID=cats.ID and pools.TYP
ESID=types.ID

returns 2 records

repair was run on all three tables and the same result

How to repeat:
see above in description
[28 Aug 2003 12:20] [ name withheld ]
Not a bug. False alarm. I was opening another statement handle elsewhere in the program and it was mucking up the results.
[28 Aug 2003 12:21] Indrek Siitan
Could you provide us with the schema and data of the tables involved
(types, cats, pools)? You can dump both with "mysqldump --opt". If
the resulting data zipped is under 500kb, you can upload it to the 
"Files" section of this bug, otherwise you can e-mail it to me at
tfr@mysql.com.

Thanks.
[28 Aug 2003 13:43] [ name withheld ]
Thank you for your prompt response.

There was no bug however. It was a false alarm.

The was a program error which caused it to appear that there was a bug (while in a while loop fetching results, I called a function which opened another  statement, execute and fetch).

Thank you.
[10 Sep 2003 1:13] Lenz Grimmer
OK, thanks for the update. Closed.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.