Project

General

Profile

Actions

Bug #68910

closed

Database analyzer: crashes in a loop

Added by Sven Röhrauer almost 9 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Must have
Category:
Install Tool
Target version:
-
Start date:
2015-08-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

database-analyzer-loop-01.png (18.7 KB) database-analyzer-loop-01.png first step Sven Röhrauer, 2015-08-10 18:29
database-analyzer-loop-02.png (13.2 KB) database-analyzer-loop-02.png second step Sven Röhrauer, 2015-08-10 18:29
database-analyzer-loop-03.png (17.7 KB) database-analyzer-loop-03.png after second step Sven Röhrauer, 2015-08-10 18:29
Actions #1

Updated by Morton Jonuschat almost 9 years ago

  • Assignee set to Morton Jonuschat
Actions #2

Updated by Morton Jonuschat over 8 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.

Actions

Also available in: Atom PDF