Столкнулся с такой ошибкой:
OperationalError: (1118, 'Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.')
В интернете почитал варианты решения. Сделал:
innodb_file_format = Barracuda
innodb_file_per_table = ON
Перезапустил сервер
mysql> show global variables like 'innodb_file%';
+--------------------------+-----------+
| Variable_name | Value |
+--------------------------+-----------+
| innodb_file_format | Barracuda |
| innodb_file_format_check | ON |
| innodb_file_format_max | Barracuda |
| innodb_file_per_table | ON |
+--------------------------+-----------+
Делаю:
mysql> ALTER TABLE market_offer ROW_FORMAT=DYNAMIC;
В итоге отваливается с ошибкой:
ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
Подскажите, как можно её решить?
Структура таблицы:
CREATE TABLE `market_offer` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`company_id` int(11) DEFAULT NULL,
`rubrica_id` int(11) DEFAULT NULL,
`category_id` int(11) unsigned DEFAULT NULL,
`artno` varchar(50) DEFAULT NULL,
`pub_date` datetime NOT NULL,
`keyword` varchar(100) NOT NULL,
`slug` varchar(100) NOT NULL DEFAULT '',
`title` varchar(300) NOT NULL,
`tizer` text NOT NULL,
`quantity` smallint(5) unsigned NOT NULL DEFAULT '0',
`unit` char(3) NOT NULL DEFAULT 'PCE',
`price` decimal(13,2) NOT NULL,
`currency` char(3) NOT NULL DEFAULT 'RUR',
`picture` varchar(100) NOT NULL,
`pictureurl` varchar(500) NOT NULL,
`url` varchar(500) NOT NULL,
`text` text NOT NULL,
`info` longtext NOT NULL,
`lastmodified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`is_active` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `rubrica_id` (`rubrica_id`),
KEY `company_id` (`company_id`),
KEY `user_id` (`user_id`),
KEY `category_id` (`category_id`),
KEY `category_pubdate` (`category_id`,`pub_date`),
KEY `rubrica_title` (`rubrica_id`,`title`(255)),
KEY `market_offer_e01be369` (`is_active`),
KEY `lastmodified` (`lastmodified`),
KEY `market_offer_c4ebad10` (`lastmodified`),
KEY `picture` (`picture`),
CONSTRAINT `market_offer_ibfk_8` FOREIGN KEY (`category_id`) REFERENCES `market_category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `user_id_refs_id_3cfc06ff` FOREIGN KEY (`user_id`) REFERENCES `users_user` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14943895749 DEFAULT CHARSET=utf8