Project

General

Profile

Actions

Bug #17480

closed

TABLE sys_refindex definition not compatible with mysql < 4.1.2

Added by Alban Cousinie about 17 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2007-07-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The following table definition fails when creating Typo3 tables on old mysql versions which don't support more than 255 characters in key indexes :

CREATE TABLE sys_refindex (
hash varchar(64) NOT NULL default '',
tablename varchar(80) NOT NULL default '',
recuid int(11) NOT NULL default '0',
field varchar(80) NOT NULL default '',
flexpointer text NOT NULL,
softref_key varchar(60) NOT NULL default '',
softref_id varchar(80) NOT NULL default '',
sorting int(11) NOT NULL default '0',
deleted tinyint(1) NOT NULL default '0',
ref_table varchar(80) NOT NULL default '',
ref_uid int(11) NOT NULL default '0',
ref_string text NOT NULL,
PRIMARY KEY (hash),
KEY lookup_rec (tablename,recuid),
KEY lookup_uid (ref_table,ref_uid),
KEY lookup_string (ref_table,ref_string(400))
);

The last line should be replaced by :
KEY lookup_string (ref_table,ref_string(255))
and the table definition gets accepted by mysql, at least on my server (version 3.23.58)

BLOB and TEXT columns can be indexed, but only by using an index prefix
length. That is, only a leading part of uniform length of a BLOB or
TEXT can be used for the index. In MySQL 4.1.2, the prefix can be up to
1000 characters; in earlier versions, the limit is 255 characters.

Read this page for more information:
http://dev.mysql.com/doc/mysql/en/indexes.html

(issue imported from #M5987)


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #15005: No install is possible, if in the Install-Tool multiplyDBfieldSize is set to "2"ClosedKarsten Dambekalns2005-10-04

Actions
Actions

Also available in: Atom PDF