[rt-users] Corrupt Attachments.. but wait
Eric Horne
rtlist at box11.org
Sun Sep 13 23:15:40 EDT 2009
I'm at RT 3.8.2, running on a Fedora core 10 system with perl 5.10.0 and
mysql 5.0.84.
Ok, ok, I know you all will pound me over the head with suggestions to
run UPGRADING.mysql and changing Attachments.Contents to a longblob and
setting default character sets to latin1. Maybe I am just not getting
something, and maybe I need to be pounded.. I searched and saw a bunch
of "you didn't run UPGRADING, go run it... thanks that fixed it"
messages... but... that ain't workin for me.
Some binary attachments are getting corrupt. Not PDFs. Not
PNGs/JPGs/GIFs. It seems only Office type documents are impacted (I
suspect all uncommon binary types). I ran UPGRADING.mysql until all it
did was create ALTER statements to set the default character set. And
yes, I applied the output to my database. without errors. Yes, each time
I made a change, I restarted RT3 and restarted the database to avoid
caching issues.
Interesting points:
1) UPGRADING makes a big deal about setting default character sets to
latin1 (and NOT to utf8), but then produces a bunch of ALTER statements
that set the default encoding to utf8... did I maybe do something wrong
there?
2) The MIME types in the database for the corrupted attachments are
text/plain. All others are as appropriate for the type (e.g. image/jpg,
etc).. could this be a clue?
3) Since I used the RPM to install RT3, I ran UPGRADING only after the
fact. Could this have caused issues?
Does anyone have any suggestions? Did I not look in the right place for
what I need? Thanks for the help!
Here is my create table line for attachments (I just now forced my
character_set_client to be latin1 and just noticed the default set below
is latin1; it has been utf8 all day... still, no Office document
attachments are getting through with readability intact).
| Attachments | CREATE TABLE `Attachments` (
`id` int(11) NOT NULL auto_increment,
`TransactionId` int(11) NOT NULL default '0',
`Parent` int(11) NOT NULL default '0',
`MessageId` varchar(160) default NULL,
`Subject` varchar(255) default NULL,
`Filename` varchar(255) default NULL,
`ContentType` varchar(80) default NULL,
`ContentEncoding` varchar(80) default NULL,
`Content` longblob,
`Headers` longtext,
`Creator` int(11) NOT NULL default '0',
`Created` datetime default NULL,
PRIMARY KEY (`id`),
KEY `Attachments2` (`TransactionId`),
KEY `Attachments3` (`Parent`,`TransactionId`)
) ENGINE=InnoDB AUTO_INCREMENT=7620 DEFAULT CHARSET=latin1 |
More information about the rt-users
mailing list