Search code examples
mysqlinnodb

Got error 66 "Object is remote" from storage engine InnoDB


I am running ALTER TABLE article_attachment CHANGE content content LONGBLOB NULL

on this table:

CREATE TABLE `article_attachment` (
 `id` bigint(20) NOT NULL AUTO_INCREMENT,
 `article_id` bigint(20) NOT NULL,
 `filename` varchar(250) DEFAULT NULL,
 `content_size` varchar(30) DEFAULT NULL,
 `content_type` text,
 `content_id` varchar(250) DEFAULT NULL,
 `content_alternative` varchar(50) DEFAULT NULL,
 `content` longblob NOT NULL,
 `create_time` datetime NOT NULL,
 `create_by` int(11) NOT NULL,
 `change_time` datetime NOT NULL,
 `change_by` int(11) NOT NULL,
 `disposition` varchar(15) DEFAULT NULL,
 PRIMARY KEY (`id`),
 KEY `article_attachment_article_id` (`article_id`),
 KEY `FK_article_attachment_create_by_id` (`create_by`),
 KEY `FK_article_attachment_change_by_id` (`change_by`)
) ENGINE=InnoDB AUTO_INCREMENT=34672 DEFAULT CHARSET=utf8

And get the error

Got error 66 "Object is remote" from storage engine InnoDB

Google returns almost nothing regarding the error.

I did increase max_allowed_packet to 999999488 but that did not help.

Update

I tried to change another column in the same table an there it tells me The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size. Increase the redo log size using innodb_log_file_size.

Maybe this is related...


Solution

  • Ok, I followed https://dba.stackexchange.com/a/1265/42097 and increased innodb_log_file_size in my.cnf mysqld section.

    Mysql ANALYSE of the table told me article_attachment.content max_length is 22942326. So I set innodb_log_file_size to 300000000.

    Now ALTER TABLE worked.