fixes #146, text column for data in items table isn't appropiate, default column datatype size isn't enough

I'm reopening issue #146.

>> EricWVGG opened this issue 2 years ago:

On a few cached feeds, I'm getting the following error:

A PHP Error was encountered
Severity: Notice
Message: unserialize() [function.unserialize]: Error at offset 5558 of 65535 bytes
Filename: Cache/MySQL.php
Line Number: 296

I haven't found a pattern to this issue yet. It has happened on these feeds:
http://threeminds.organic.com/atom.xml
http://secretforts.blogspot.com/feeds/posts/default?alt=rss

The problem continues to exist when I wipe the cache tables, and run the feeds twice more.

>>rapid2k1 commented 6 days ago

I have been able to reproduce and fix this two problems.

From serialize command documentation:

"Note that this is a binary string which may include null bytes, and needs to be stored and handled as such. For example, serialize() output should generally be stored in a BLOB field in a database, rather than a CHAR or TEXT field."

Serialize output was stored in a TEXT column.

Also, the limit size of the TEXT column was reached (Message: unserialize() [function.unserialize]: Error at offset 5558 of 65535 bytes). Limit size is 65535 bytes, so serialize output was truncated, and unserialize couldn't recover it, throwing a warning.

I have changed the column type to MEDIUMBLOB, so a 16Mb rss item could be stored. This should be enough for everyone (tm) :)