Closed (duplicate)
Project:
Drupal core
Component:
database system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Feb 2005 at 17:29 UTC
Updated:
11 Dec 2005 at 14:39 UTC
The cache table is wrong. It stores the gzipped cached text as LONGTEXT. This breaks with new MySQL when the database charset is set to UTF-8.
It should be LONGBLOB instead.
CREATE TABLE cache (
cid varchar(255) NOT NULL default '',
data longblob,
expire int(11) NOT NULL default '0',
created int(11) NOT NULL default '0',
headers text,
PRIMARY KEY (cid),
KEY expire (expire)
)
Comments
Comment #1
killes@www.drop.org commentedWhat mysql version are you talking about? Drupal tries to be agnostic about the encodign settings of the database.
Comment #2
decafdennis commentedI've been getting blank pages lately, after they have been cached. I found out that only an A with a circumflex was saved to the cache table, instead of the gzipped page. Changing the data column type from LONGTEXT to LONGBLOB fixed this problem. MySQL appearently couldn't save the gzipped binary data to the longtext field.
I must say that this bug just came out of nothing. I updated Drupal from CVS today, and as far as I could see no changes were made to anything related to caching or the cache table.
I am using PHP 4.4.0 and MySQL 4.1.14. If you were wondering, I have not updated any of those lately.
That the data column should be a LONGBLOB seems logical to me, since it has to store binary data. But I still find it strange that it still worked yesterday...
Comment #3
Wesley Tanaka commentedhttp://drupal.org/node/40532
has a patch against CVS head which I believe also deals with the schema update
Comment #4
Wesley Tanaka commentedmarking as dupe of http://drupal.org/node/40532
since it looks like that patch might be accepted.