summaryrefslogtreecommitdiffstats
path: root/contrib/bug_email.pl
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2005-08-27 08:11:30 +0200
committerbugreport%peshkin.net <>2005-08-27 08:11:30 +0200
commitbc7607c1c4e31b9583a6a772c41567c1b1928e6d (patch)
tree3b370d740050b6bb2ec9013f374802585170f409 /contrib/bug_email.pl
parentd8a52b79b5b12e2e002614bc0aea343a9a535258 (diff)
downloadbugzilla-bc7607c1c4e31b9583a6a772c41567c1b1928e6d.tar.gz
bugzilla-bc7607c1c4e31b9583a6a772c41567c1b1928e6d.tar.xz
Bug 305333: Move attachments.thedata to its own table
Patch by Joel Peshkin <bugreport@peshkin.net> r=lpsolit, a=justdave
Diffstat (limited to 'contrib/bug_email.pl')
-rwxr-xr-xcontrib/bug_email.pl8
1 files changed, 5 insertions, 3 deletions
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 );