Bug #79993
closedToo long primary index on sys_refindex
100%
Description
Sometimes i get this error when i try to install TYPO3 8.6. My MySQL Server runs 5.6. The error appears randomly.
Database query failed!
Query: CREATE TABLE `sys_refindex` ( `hash` VARCHAR(32) DEFAULT '' NOT NULL, `tablename` VARCHAR(255) DEFAULT '' NOT NULL, `recuid` INT DEFAULT 0 NOT NULL, `field` VARCHAR(64) DEFAULT '' NOT NULL, `flexpointer` VARCHAR(255) DEFAULT '' NOT NULL, `softref_key` VARCHAR(30) DEFAULT '' NOT NULL, `softref_id` VARCHAR(40) DEFAULT '' NOT NULL, `sorting` INT DEFAULT 0 NOT NULL, `deleted` SMALLINT DEFAULT 0 NOT NULL, `workspace` INT DEFAULT 0 NOT NULL, `ref_table` VARCHAR(255) DEFAULT '' NOT NULL, `ref_uid` INT DEFAULT 0 NOT NULL, `ref_string` VARCHAR(1024) DEFAULT '' NOT NULL, INDEX `lookup_rec` (tablename, recuid), INDEX `lookup_uid` (ref_table, ref_uid), INDEX `lookup_string` (ref_string), PRIMARY KEY(hash) ) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB
Error: Specified key was too long; max key length is 767 bytes
Its seems there are related Bugs to this ( https://forge.typo3.org/issues/79628 )
As workaround i modified the typo/sysext/core/ext_tables.sql :
# # Table structure for table 'sys_refindex' # CREATE TABLE sys_refindex ( hash varchar(32) DEFAULT '' NOT NULL, tablename varchar(255) DEFAULT '' NOT NULL, recuid int(11) DEFAULT '0' NOT NULL, field varchar(64) DEFAULT '' NOT NULL, flexpointer varchar(255) DEFAULT '' NOT NULL, softref_key varchar(30) DEFAULT '' NOT NULL, softref_id varchar(40) DEFAULT '' NOT NULL, sorting int(11) DEFAULT '0' NOT NULL, deleted tinyint(1) DEFAULT '0' NOT NULL, workspace int(11) DEFAULT '0' NOT NULL, ref_table varchar(255) DEFAULT '' NOT NULL, ref_uid int(11) DEFAULT '0' NOT NULL, ref_string varchar(1024) DEFAULT '' NOT NULL, PRIMARY KEY (hash), KEY lookup_rec (tablename(100),recuid), KEY lookup_uid (ref_table,ref_uid), KEY lookup_string (ref_string(100)) );
Now it works. Beware i'm not that MySQL expert. Different solutions where recommended by the TYPO3 Commuity Slack Chat (Thanks to Christian Kuhn and Pierrick Caillon).
So somebody has to confirm the changes, if they make sense.
Files
Updated by Christian Kuhn over 7 years ago
- Target version set to 8 LTS
- Sprint Focus set to Stabilization Sprint
Updated by Gerrit Code Review over 7 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51828
Updated by Anonymous over 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 93f072a236afa9f94fbd4a305ad2a72a7c607f7f.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed