[TYPO3-core] RFC: Fix sys_refindex problem when using multiplyDBfieldSize=2
Dmitry Dulepov
dmitry at typo3.org
Tue Nov 7 13:44:16 CET 2006
Martin Kutschker wrote:
> Michael Stucki schrieb:
>> Hi Martin,
>>
>>
>>> 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.
>>
>>
>> I tested this, and it works as expected. Just one note:
>>
>> | $match = array();
>>
>> I think you can remove this line, $match is set automatically by
>> preg_match.
>
> No, preg_match uses the existing array. It will NOT clear it! So always
> reset your match array when doing a loop.
Plus:
- uninitialized arrays give false warnings in IDEs
- it is much faster to look over the code when all variables are
initialized prior to use
--
Dmitry Dulepov
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)
More information about the TYPO3-team-core
mailing list