Bug #3942 EXPLAIN returns incorect table name
| Submitted: | 31 May 2004 19:12 | Modified: | 1 Jun 2004 16:46 |
|---|---|---|---|
| Reporter: | [ name withheld ] | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 4.0.18 | OS: | Linux (Linux 2.4.2x) |
| Assigned to: | CPU Architecture: | Any |
[31 May 2004 19:12]
[ name withheld ]
[31 May 2004 21:25]
[ name withheld ]
seems like that old key name isn't changend when key name is changing. This causes sometimes confution for beginer user.
[1 Jun 2004 16:46]
Matthew Lord
What you are noticing is that when you do not provide a name for the index a default index name is used. That default comes from the column name, if there is already an index with that name is appends _2 and so on. You are seeing the index name in the explain output not the column name. Issue a show keys from table\G and you will see the column the index is on. To avoid any confusion it's always best to name your indexes but then again you may want to change the name of the index if changing the name of the column. Currently you would have to drop the index and re-create it. If you do both alterations in one alter table statement you will not incur additional alter time.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.058 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.