[TYPO3-core] RFC: Fix sys_refindex problem when using multiplyDBfieldSize=2

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Thu Nov 16 22:33:44 CET 2006


Martin Kutschker schrieb:
> Martin Kutschker schrieb:
>>
>> We need to limit the index column only wheb multiplyDBfieldSize is in 
>> effect. Maybe the SQL parsing could be changed so that it knows about 
>> field type changes (varchar => text), so any column that used to be a 
>> varchar (or char) and is converted to a text, must be written as 
>> colname(newlenght). As the so called prefix length can be up to 1000 
>> bytes the resulting 400 or 600 bytes or ok. A multiplyDBfieldSize of 
>> more than 3 makes no sense anyway and even the max. varchar lenght of 
>> 255 results only in 765 bytes.
>>
>> This solution does not need any truncated indices which is fine 
>> because it'll break on other RDBMS (without DBAL/ADOdb changes). But 
>> it will still work on Mysql 3.23 with multiplyDBfieldSize set.
> 
> Attached is a diff that does this. If a CHAR/VARCHAR becomes a TEXT, 
> then all occurences in index definitions are changed so that Mysql will 
> get a correct index prefix for that field.

Committed to trunk and TYPO3_4-0.

Masi



More information about the TYPO3-team-core mailing list