mysqlsocialengine

SocialEngine module installation: Query failed with error


I have created a simple SocialEngine module and created a package for its installation. In the installation process on the target system, I cannot install the module and when finalizing the installation, I get the following error:

Query failed with error: Mysqli prepare error: This command is not supported in the prepared statement protocol yet

I have two sql files in the settings directory as follows:

my.sql:

--
-- Table structure for table `engine4_restapi_foods`
--

DROP TABLE IF EXISTS `engine4_restapi_foods`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `engine4_restapi_foods` (
  `food_id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `creation_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`image_path` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`food_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `engine4_restapi_foods`
--

LOCK TABLES `engine4_restapi_foods` WRITE;
/*!40000 ALTER TABLE `engine4_restapi_foods` DISABLE KEYS */;
INSERT INTO `engine4_restapi_foods` VALUES (2,'Gheymeh','2018-06-20 16:01:58', 'public/gheymeh.png'),(3,'Ghormeh','2018-06-20 16:01:58', 'public/ghormeh.png'),(4,'Kebab','2018-06-20 16:09:23', 'public/kebab.png'),(5,'Chicken','2018-06-20 16:09:23', 'public/chicken.png');
/*!40000 ALTER TABLE `engine4_restapi_foods` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2018-06-30 16:44:45

my-install.sql:

INSERT IGNORE INTO `engine4_core_modules` (`name`, `title`, `description`, `version`, `enabled`, `type`) VALUES  ('restapi', 'REST API', 'This is a REST API for food', '4.0.0', 1, 'extra') ;

Solution

  • Try executing all the queries with prepared statement from anywhere Inside social engine, then you can catch the error ?