Bug #65540 No support for CREATE INDEX IF NOT EXISTS

Submitted: 6 Jun 2012 17:43 Modified: 6 Jun 2012 18:55
Reporter: Stefan Arentz Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DDL Severity:S4 (Feature request)
Version:5.5 OS:Any
Assigned to: CPU Architecture:Any

[6 Jun 2012 17:43] Stefan Arentz
Description:
MySQL has support for CREATE TABLE IF NOT EXISTS but is lacking support for CREATE INDEX IF NOT EXISTS. These two go hand in hand and it would be very nice to have the latter form also supported.

How to repeat:
mysql> CREATE UNIQUE INDEX IF NOT EXISTS FOO ON USERS (USERNAME);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS FOO ON USERS (USERNAME)' at line 1
[6 Jun 2012 18:55] Sveta Smirnova
Thank you for the feature request.

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

Page generated in 0.040 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.