[rt-users] dumpfile-to-rt-3.0 problem: parser: unterminated quoted string

Alexei Barantsev barancev at ispras.ru
Tue Jul 13 09:18:56 EDT 2004


Could anybody explain me how is it supposed to put binary attachments to the
DB?

Postgres schema defines the 'content' column of the 'attachments' table
having 'text' type, MySQL schema defines is as 'longtext'. Both these types
are character ones and don't allow arbitrary binary data. How is it possible
to put actual attachment content to such fields? Maybe there is a trick
here? Where can I read about it?

Regards,
-- 
Alexei Barantsev
UniTesK Product Line Manager, ISP RAS
mailto: barancev at ispras.ru
Phone : +7(095)912-5317(ext 4422)
Web   : http://unitesk.com/

  > -----Original Message-----
  > From: rt-users-bounces at lists.bestpractical.com 
  > [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf 
  > Of Alexei Barantsev
  > Sent: Tuesday, July 13, 2004 11:38 AM
  > To: rt-users at lists.bestpractical.com
  > Subject: [rt-users] dumpfile-to-rt-3.0 problem: parser: 
  > unterminated quotedstring
  > 
  > Hi,
  > 
  > Now, I've coped with the subject encoding problem, I've 
  > faced another one that was mentioned on the list several 
  > times but no solution still found.
  > 
  > Couldn't create attachment
  > $VAR1 = {
  >           'Subject' => '',
  >           'ContentType' => 'image/gif',
  >           'Filename' => 'configuration.gif',
  >           'Headers' => 'Content-Type: image/gif; 
  > name="configuration.gif"
  > Content-Disposition: inline; filename="configuration.gif"
  > Content-Transfer-Encoding: base64
  > ',
  >           'Creator' => '11',
  >           'Parent' => '1299',
  >           'Created' => '2002-09-13 14:49:07+00',
  >           'ContentEncoding' => 'base64',
  >           'id' => '1301',
  >           'TransactionId' => '1593'
  >         };
  > 
  > ERROR:  parser: unterminated quoted string at or near 
  > "'GIF89a¶Ў" at character 380
  > 
  > It seems that import utility attempts to put decoded from 
  > base64 binary stream (that is GIF image in my case) to the 
  > 'content' column of the 'attachments' table. To do that it 
  > creates invalid SQL query including this binary stream.
  > 
  > Syslog shows the following:
  > 
  > Jul 13 10:52:20 sever RT: DBD::Pg::st execute failed: 
  > ERROR:  parser:
  > unterminated quoted string at or near "'GIF89a¶^AЎ" at 
  > character 380 at 
  > /usr/lib/perl5/site_perl/5.8.3/DBIx/SearchBuilder/Handle.pm 
  > line 410.
  > (/usr/local/rt3/lib/RT.pm:247)
  > Jul 13 10:52:20 sever RT: RT::Handle=HASH(0x8e0ef90) 
  > couldn't execute the query 'INSERT INTO Attachments 
  > (Subject, ContentType, Filename, Headers, Creator, Parent, 
  > Created, ContentEncoding, Content, id, TransactionId) 
  > VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' at 
  > /usr/lib/perl5/site_perl/5.8.3/DBIx/SearchBuilder/Handle.pm 
  > line 417.
  > (/usr/local/rt3/lib/RT.pm:247)
  > Jul 13 10:52:20 sever RT: Died at
  > /home/barancev/tmp/rt2-to-rt3-1.23/dumpfile-to-rt-3.0 line 752.
  > (/usr/local/rt3/lib/RT.pm:254)
  > 
  > Regards,
  > --
  > Alexei Barantsev
  > UniTesK Product Line Manager, ISP RAS
  > mailto:  barancev at ispras.ru
  > Phone :  +7(095)912-5317(ext 4422)
  > 
  > 
  > 
  > _______________________________________________
  > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
  > 
  > Be sure to check out the RT wiki at http://wiki.bestpractical.com
  > 






More information about the rt-users mailing list