[TYPO3-core] RFC: #0012381: Bug: Change definition of DB table fields

Ernesto Baschny [cron IT] ernst at cron-it.de
Wed Oct 28 16:32:12 CET 2009


Francois Suter schrieb:

>> Problem:
>> The fields "serialized_task_object" & "serialized_executions" are
>> defined as "TEXT" this can be a problem with charset convertion from
>> database to your system.
>>
>> Solution:
>> It is a good practise to define such serialized fields as "BLOB"
>> because this is a binary field where no charset convertions are made on.
>>
>> So just, change the fields from "TEXT" to "BLOB".
> 
> There's has been a move in recent years to use TEXT fields throughout
> the TYPO3 core rather than BLOBs. If you look at all the cache tables,
> they use TEXT fields. So I would rather tend to leave the fields as is.
> 
> What do others think?

I think the patch of Michael sounds reasonable, as a serialized array is
indeed binary data and not text data. If one byte turns into two bytes
in a serialized array (when converting from latin-1 to utf8), the
serialized array is suddenly broken.

Stucki in 2006 initiated the movement of transitioning BLOBs to TEXTs
where the content is clearly "text" (e.g. cached HTML content). At that
phase it had to be clearly differenciated in which columns one expect
text and where binary data (serialized PHP) is stored: those are still
BLOBs (e.g. fe_session_data.content, fe_sessions.ses_data, fe_users.uc,
all "l18n_diffsource" fields, etc).

If I recall correctly the problem with BLOBs was DBAL and other DBs
(e.g. Oracle) support for it, especially when using a BLOB field in a
WHERE clause ("blobfield = 'text'"). Since we won't ever do this in a
serialized array, it should be no problem to change it.

So +1 on reading that change.

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list