I have a table (well there are a bunch of them) with an index that contains a comma
....
FULLTEXT KEY `description` (`description`),
FULLTEXT KEY `description,title` (`description`,`title`), -- <-- HERE
FULLTEXT KEY `content` (`content`),
FULLTEXT KEY `content,title` (`content`,`title`)
) ENGINE=MyISAM AUTO_INCREMENT=150296 DEFAULT CHARSET=utf8
I am moving to InnoDB + sphinx so want to drop all the FULLTEXT indexes and these are proving to be a problem.
Quotes:
DROP INDEX 'content,title' ON `table`
ALTER TABLE `table` DROP INDEX 'content,title'
Backticks:
DROP INDEX content,title
ON table
ALTER TABLE table
DROP INDEX content,title
Escaped:
ALTER TABLE articles
DROP INDEX description\,title
Various forms of escaping, also tried using LIKE with wild chars.
Actual error: Can't DROP 'description,title'; check that column/key exists
@CodeBird
SELECT * FROM information_schema.STATISTICS WHERE TABLE_NAME='articles' AND TABLE_SCHEMA='test' AND INDEX_NAME LIKE 'descri%'\G
*************************** 1. row ***************************
TABLE_CATALOG: NULL
TABLE_SCHEMA: test
TABLE_NAME: articles
NON_UNIQUE: 1
INDEX_SCHEMA: test
INDEX_NAME: description,title
SEQ_IN_INDEX: 1
COLUMN_NAME: description
COLLATION: NULL
CARDINALITY: NULL
SUB_PART: NULL
PACKED: NULL
NULLABLE: YES
INDEX_TYPE: FULLTEXT
COMMENT:
*************************** 2. row ***************************
TABLE_CATALOG: NULL
TABLE_SCHEMA: test
TABLE_NAME: articles
NON_UNIQUE: 1
INDEX_SCHEMA: test
INDEX_NAME: description,title
SEQ_IN_INDEX: 2
COLUMN_NAME: title
COLLATION: NULL
CARDINALITY: NULL
SUB_PART: NULL
PACKED: NULL
NULLABLE: YES
INDEX_TYPE: FULLTEXT
COMMENT:
2 rows in set (0.00 sec)
Having root access you should be able to update your index name in information_schema then try dropping them:
UPDATE information_schema.STATISTICS SET INDEX_NAME='to_be_dropped'
WHERE TABLE_NAME='articles' AND TABLE_SCHEMA='test'
AND INDEX_NAME LIKE 'descri%'