2

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...

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
Mat
  • 89
  • 1
  • 1
  • 7

0 Answers0