From bc7607c1c4e31b9583a6a772c41567c1b1928e6d Mon Sep 17 00:00:00 2001 From: "bugreport%peshkin.net" <> Date: Sat, 27 Aug 2005 06:11:30 +0000 Subject: Bug 305333: Move attachments.thedata to its own table Patch by Joel Peshkin r=lpsolit, a=justdave --- contrib/bug_email.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'contrib/bug_email.pl') diff --git a/contrib/bug_email.pl b/contrib/bug_email.pl index 1590387e6..98b8d157e 100755 --- a/contrib/bug_email.pl +++ b/contrib/bug_email.pl @@ -38,7 +38,7 @@ # # You need to work with bug_email.pl the MIME::Parser installed. # -# $Id: bug_email.pl,v 1.28 2005/07/08 02:31:43 mkanat%kerio.com Exp $ +# $Id: bug_email.pl,v 1.29 2005/08/26 23:11:32 bugreport%peshkin.net Exp $ ############################################################### # 02/12/2000 (SML) @@ -164,14 +164,16 @@ sub storeAttachments( $$ ) # Make SQL-String - my $sql = "insert into attachments (bug_id, creation_ts, description, mimetype, ispatch, filename, thedata, submitter_id) values ("; + my $sql = "insert into attachments (bug_id, creation_ts, description, mimetype, ispatch, filename, submitter_id) values ("; $sql .= "$bugid, now(), " . SqlQuote( $description ) . ", "; $sql .= SqlQuote( $mime ) . ", "; $sql .= "0, "; $sql .= SqlQuote( $decoded_file ) . ", "; - $sql .= SqlQuote( $data ) . ", "; $sql .= "$submitter_id );"; SendSQL( $sql ) unless( $test ); + $sql = "insert into attach_data (id, thedata) values (LAST_INSERT_ID(), "; + $sql .= SqlQuote( $data ) . ")"; + SendSQL( $sql ) unless( $test ); } return( $att_count ); -- cgit v1.2.3-24-g4f1b