Why is InnoDB not supporting the full text search index where it is supported in MyISAM?

My mysql script

DROP TABLE IF EXISTS `informationposting`;

CREATE TABLE `informationposting` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `StexId` varchar(9) DEFAULT NULL,
  `TargetContinent` int(11) DEFAULT NULL,
  `TargetCountry` int(11) DEFAULT NULL,
  `TargetCity` varchar(15) DEFAULT NULL,
  `InfoType` int(11) DEFAULT NULL,
  `WebsiteLink` varchar(30) DEFAULT NULL,
  `InfoPost` varchar(200) DEFAULT NULL,
  `PostingDate` datetime DEFAULT NULL,
  `ExpiryDate` datetime DEFAULT NULL,
  `Title` varchar(100) DEFAULT NULL,
  `NameOfOwner` varchar(45) DEFAULT NULL,
  `RegistrationTypeIdOfOwner` int(11) DEFAULT NULL,
  PRIMARY KEY (`Id`),
  KEY `FK_InformationUser_Id_idx` (`StexId`),
  FULLTEXT KEY `InfoPost` (`InfoPost`),
  FULLTEXT KEY `NameOfOwner` (`NameOfOwner`),
  FULLTEXT KEY `NameOfOwner_2` (`NameOfOwner`,`InfoPost`),
  CONSTRAINT `FK_InformationUser_Id` FOREIGN KEY (`StexId`) REFERENCES `userdetails` (`StexId`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;

this script shows the following error. Error code: 1214. The table type used does not support FULLTEXT indexes

My version of mySql is 5.6. When I change Engine to MyISAM, it works fine. Can anyone explain why MySQL behaves this way, I want to use the InnoDB engine.

+4
source share
1 answer

InnoDB 5.6 supports full-text index types. I just tested your CREATE TABLE statement on a test instance of MySQL 5.6.17 and it works great.

, 5.6.

mysql> SELECT VERSION();

, InnoDB , FTS_DOC_ID . , - , , , . , , , . , .

+4

Source: https://habr.com/ru/post/1542879/


All Articles