Sorry I got carried away in my former response.

When I tried this,
ALTER IGNORE TABLE tbl_name DROP INDEX seems to fail if the index does not 
exist.

The DROP INDEX statement is part of a larger script, what I want is for the script to conue to execute if this index does not exist.

e.g.

ALTER IGNORE TABLE table_name DROP INDEX index_name;
ALTER IGNORE TABLE table_name ADD INDEX UNIQUE  index_name(column_1,column_2);


Thanks - Ada



Rob Wultsch wrote:
On Nov 29, 2007 4:34 AM, Adam Lipscombe <[EMAIL PROTECTED]> wrote:
Folks


How can one conditionally drop an index in MySQL?

Googling shows that the "drop index" does not support an "if exists" qualifier 
- apparently a bug
has been raised but as far as I know its not fixed yet.

Does anyone know of a work-around?

TIA - Adam


Sent my first response late at night and not the community... And the
response  also sucked.
DROP INDEX is mapped to ALTER TABLE tbl_name
 DROP INDEX.
ALTER IGNORE TABLE tbl_name
 DROP INDEX ought to be functionally equivalent to IF EXISTS. What is your goal?



--
Adam Lipscombe

T: 01872 575083
M: 07957 548686
E: [EMAIL PROTECTED]

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to