Codeception / module-db

DB module for Codeception

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot insert sql insert statement

sigma-z opened this issue · comments

This SQL use in dump:

CREATE TABLE `test` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `value` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

LOCK TABLES `test` WRITE;
/*!40000 ALTER TABLE `test` DISABLE KEYS */;
INSERT INTO `test` VALUES (122,'test','//*');
/*!40000 ALTER TABLE `test` ENABLE KEYS */;
UNLOCK TABLES;

will cause this error, but is valid SQL:
2020-01-27 131559

Either remove /* from value in test data,
or configure populator option to use mysql command line client for loading SQL files as documented at https://codeception.com/docs/modules/Db

@Naktibalda Thank you for your answer. I will try out using mysql command line client as alternative.