Bug #68910
closedDatabase analyzer: crashes in a loop
0%
Description
Executing Database analyzer ("Compare current database with specification") ends in a loop (caused by the extension "ke_stats"). It is a Typo3 6.2 (initial installation was 6.0, then updated to 6.1)
There are two tasks (see also snapshots):- ALTER TABLE tx_kestats_cache DROP KEY whereclause_index;
- ALTER TABLE tx_kestats_cache ADD KEY whereclause_index (whereclause(260),orderby(20),groupby(20));
Performing (snapshot 1) the first works (it isn't displayed any more, snapshot 2), but after performing the second both tasks are displayed again (snapshot 3).
I performed it several times, it is always the same, it is an infinite loop.
Because of this I cannot finish the Upgrade Wizard.
content of the ext_tables.sql
# # Table structure for table 'tx_kestats_statdata' # CREATE TABLE tx_kestats_statdata ( uid int(11) NOT NULL auto_increment, pid int(11) DEFAULT '0' NOT NULL, tstamp int(11) DEFAULT '0' NOT NULL, crdate int(11) DEFAULT '0' NOT NULL, cruser_id int(11) DEFAULT '0' NOT NULL, type tinytext NOT NULL, category tinytext NOT NULL, element_uid int(11) DEFAULT '0' NOT NULL, element_pid int(11) DEFAULT '0' NOT NULL, element_title tinytext NOT NULL, element_language int(11) DEFAULT '0' NOT NULL, element_type int(11) DEFAULT '0' NOT NULL, counter int(11) DEFAULT '0' NOT NULL, year int(11) DEFAULT '0' NOT NULL, month int(11) DEFAULT '0' NOT NULL, parent_uid int(11) DEFAULT '0' NOT NULL, PRIMARY KEY (uid), KEY parent (pid), KEY index1 (type(20),category(20),element_title(20),year,month), KEY index2 (type(20),category(20),element_uid,element_language,element_type,year,month), KEY index3 (element_title(20)), KEY index4 (type(20),category(20),element_uid,element_pid,element_language,element_type,year,month), KEY index5 (type(20),tstamp) ); # # Table structure for table 'tx_kestats_cache' # CREATE TABLE tx_kestats_cache ( uid int(11) NOT NULL auto_increment, whereclause text NOT NULL, orderby text NOT NULL, groupby text NOT NULL, result longtext NOT NULL, PRIMARY KEY (uid), KEY whereclause_index (whereclause(260),orderby(20),groupby(20)) ); # # Table structure for table 'tx_kestats_queue' # CREATE TABLE tx_kestats_queue ( uid int(11) NOT NULL auto_increment, tstamp int(11) DEFAULT '0' NOT NULL, data text NOT NULL, generaldata text NOT NULL, PRIMARY KEY (uid) );
Files
Updated by Morton Jonuschat over 9 years ago
- Status changed from New to Rejected
This is not a TYPO3 bug, this is due to MySQL limits on InnoDB tables. On InnoDB tables a prefix of an index is limited to 767bytes. Given a TEXT column and a Unicode charset like "utf8_general_ci" which requires up to 3 bytes per character this results in the index prefix being reduced to 255 characters.
Thus the Install Tool is correct in trying to fix this as the requested length is 260 characters but the length being (silently) set by MySQL on create is 255. So the compare always fails.
The only way to this fix is by fixing the table definition in the extension to conform to MySQL limits by either reducing the prefix length of 260 or forcing a collation which requires less bytes per character.