'Error when I adding FULLTEXT INDEX "SQL Error (1062): Duplicate entry '' for key '*UNKNOWN*'"
I have specific error when I'd like to add FULLTEXT INDEX to column street. My code is below.
ALTER TABLE offer_private_14 ADD FULLTEXT INDEX idx_street (street);
Error is:
"SQL Error (1062): Duplicate entry '' for key 'UNKNOWN'".
My structure table is:
CREATE `offer_private_14` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(200) NOT NULL,
`description` text NOT NULL,
`street` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
FULLTEXT KEY `idx_title` (`title`),
FULLTEXT KEY `idx_description` (`description`),
) ENGINE=InnoDB AUTO_INCREMENT=7952290 DEFAULT CHARSET=utf8;
Error is when I have records in table. When I haven't records in table I can add FULLTEXT INDEX. I don't know why. In some table I can't delete all my records to add FULLTEXT INDEX.
I can't deal with this...
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|