On Tue, 2006-06-06 at 23:13 -0700, Joshua Colson wrote:
> > My question: I still have all the emails from which those image
> > attachments were culled. Does anyone have a suggestion for how to
> > reinsert the uncorrupted images into the database in place of the
> > useless blobs currently residing there? (I'm no DBA at the best of
> > times, and I've never needed to work with non-textual data in mysql
> > before; I'm feeling a bit lost...)
>
> RT does not store attachments as BLOBs. All binary attachments are
> converted to base64 encoding before insertion into the database.
[...]
Interesting. Before I'd read your message, I tried the
following:
mysql> update Attachments set Content=LOAD_FILE('/tmp/Outlook.jpg') where
id=323;
...which seems to have achieved the desired results at least as
far as that particular attachment is concerned. (I.e. it now displays
correctly in the ticket.) I noticed (belatedly) that the type for
Attachments.Content is "longtext" -- does mysql have an autoconversion
feature for binary data that happens to DTRT? Or is RT robust enough to
handle the fact that the DB object is not base64? I don't see any errors
in the RT log pertaining to this...
Thanks for the SQL, by the way -- since I had less than 10
images in the system, I was going to go the BFMI route for finding the
relevant attachment numbers, but your way is much more elegant.
(BFMI == "Brute force, massive ignorance" :-)
--
/Ole Craig
Security Engineer
303-381-3802 (main support hotline)
303-381-3824 (my direct line)
303-381-3801 (fax)
www.stillsecure.com
. . .
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
We're hiring! Come hack Perl for Best Practical:
http://bestpractical.com/about/jobs.html