Hello Christian,
On 2013-09-26 20:22, Christian A. Pradelli wrote:
I have te same error when upgrading from 1.23 to 1.24:
"ERROR 1071 (42000) at line 11: Specified key was too long; max key
length is 3072 bytes"
The problem is in the line:
create unique index `entry` on retention_rule
(`domain`,`from`,`to`,`subject`,`_size`,`size`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`);
I comment out this line to run the script, but I still need to do this
change.
What could be the problem?
the problem is the too wide columns for the update. I recommend you to
dump the contents of the retention_rule table, then drop it,
then create it, finally load its contents back:
mysqldump -u piler -p -B piler -t retention_rule > r.sql
drop table retention_rule;
create table if not exists `retention_rule` (
`id` bigint unsigned not null auto_increment,
`domain` varchar(128) default null,
`from` char(128) default null,
`to` char(255) default null,
`subject` char(255) default null,
`_size` char(2) default null,
`size` int default 0,
`attachment_type` char(128) default null,
`_attachment_size` char(2) default null,
`attachment_size` int default 0,
`spam` tinyint(1) default -1,
`days` int default 0,
primary key (`id`),
unique
(`domain`,`from`,`to`,`subject`,`_size`,`size`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`)
) ENGINE=InnoDB;
mysql -u piler -p piler < r.sql
If your retention_rule table is empty, then just simply
drop it, then create it. If you are ready, then do the same
with the archiving_rule table.
Sorry for the confusion.
Janos