[TYPO3-core] RFC: Fix sys_refindex problem when using multiplyDBfieldSize=2
Martin Kutschker
martin.kutschker-n0spam at no5pam-blackbox.net
Sat Nov 4 14:29:57 CET 2006
Martin Kutschker schrieb:
> Dmitry Dulepov schrieb:
>> Hi!
>>
>> Martin Kutschker wrote:
>>> Maybe we should simply drop multiplyDBfieldSize and require a DB with
>>> proper UTF8 support.
>>
>> This is typo3 requirement change: drop of mysql 3.23 (which I am +1),
>> however it will break several my old sites (which I am -1000)...
>
> Hm, a more complicated fix is [...]
Yet another proposal in case we don't want to support truncated columns
in indices on a general level. And IMHO there is no real reason to do so.
So here I go again.
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.
Masi
More information about the TYPO3-team-core
mailing list