Bug #16587 incorrect key for column based on "select * from <source>" tabulation
Submitted: 17 Jan 2006 22:34 Modified: 18 Feb 2006 12:41
Reporter: Joel Whipple Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:5.0 OS:Windows (Win Xp SP2)
Assigned to: MySQL Verification Team CPU Architecture:Any

[17 Jan 2006 22:34] Joel Whipple
Description:
Going to the next line in query command, before selecting source, it will make another row (usually second) be the primary key, which is incorrect, as cnum is the default primary key in my case. 

So typing Select * From customers on first line will show cnum as the primary key, which is correct;

But doing Select *
from customers

Will display cname as primary key in the query, which is incorrect.

How to repeat:
Select *
from customers

cnum	cname	city	rating	snum
2001	Hoffman	London	100	1001
2002	Giovanni	Rome	200	1003
2003	Liu	San Jose	200	1002
2004	Grass	Berlin	300	1002
2006	Clemens	London	100	1001
2007	Pereira	Rome	100	1004
2008	Cisneros	San Jose	300	1007
[17 Jan 2006 22:35] Joel Whipple
(updated title)
[18 Jan 2006 12:41] MySQL Verification Team
Could you please provide a dump with table create statement and inserts in
the sample you provided?

Thanks in advance.
[1 Feb 2006 13:59] raul anguiano
we had the same trouble but a little worst because just beside the key field is a field filled with 0 and before the keyfield was changed to this column we made a delete query to remove all records that the st field was = 2 but all records in the table was deleted, more than one millon records deleted from the table, the good thing is i a have a backup of the database so i can fix the problem but this is a serious bug!!.

 idres  flag    date             st 
   1      0      2005-01-01    1
   2      0      2005-01-01    2
   3      0      2005-01-01    1
   4      0      2005-01-01    1
[19 Feb 2006 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".