https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8012
Bug ID: 8012
Summary: DecodeShortURLs short_url_cache DB schema VARCHAR(256)
too large
Product: Spamassassin
Version: 4.0.0
Hardware: PC
OS: Windows 10
Status: NEW
Severity: normal
Priority: P2
Component: Plugins
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: Undefined
When trying to use the default DB schema on 10.1.48-MariaDB-0+deb9u2:
MariaDB [test]> CREATE TABLE `short_url_cache`
-> ( `short_url` VARCHAR(256) NOT NULL,
-> `decoded_url` VARCHAR(512) NOT NULL,
-> `hits` INT NOT NULL DEFAULT 1,
-> `created` INT(11) NOT NULL,
-> `modified` INT(11) NOT NULL,
-> PRIMARY KEY (`short_url`)
-> ) ENGINE = InnoDB;
ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes
Changing the `short_url` VARCHAR(256) to VARCHAR(255) fixes it:
MariaDB [test]> CREATE TABLE `short_url_cache`
-> ( `short_url` VARCHAR(255) NOT NULL,
-> `decoded_url` VARCHAR(512) NOT NULL,
-> `hits` INT NOT NULL DEFAULT 1,
-> `created` INT(11) NOT NULL,
-> `modified` INT(11) NOT NULL,
-> PRIMARY KEY (`short_url`)
-> ) ENGINE = InnoDB;
Query OK, 0 rows affected (0.06 sec)
--
You are receiving this mail because:
You are the assignee for the bug.