[TYPO3-core] RFC: Fix sys_refindex problem when using multiplyDBfieldSize=2
Martin Kutschker
martin.kutschker-n0spam at no5pam-blackbox.net
Sat Nov 4 16:03:53 CET 2006
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.
With this patch we may remove the '(199)' in the index of sys_refindex.
Masi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t3lib_install-multiply.diff
Type: text/x-diff
Size: 802 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20061104/cba7022e/attachment.bin
More information about the TYPO3-team-core
mailing list