diff options
author | bugreport%peshkin.net <> | 2005-08-27 08:11:30 +0200 |
---|---|---|
committer | bugreport%peshkin.net <> | 2005-08-27 08:11:30 +0200 |
commit | bc7607c1c4e31b9583a6a772c41567c1b1928e6d (patch) | |
tree | 3b370d740050b6bb2ec9013f374802585170f409 /contrib/gnatsparse | |
parent | d8a52b79b5b12e2e002614bc0aea343a9a535258 (diff) | |
download | bugzilla-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/gnatsparse')
-rwxr-xr-x | contrib/gnatsparse/gnatsparse.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/gnatsparse/gnatsparse.py b/contrib/gnatsparse/gnatsparse.py index 5f7cde713..b317b240d 100755 --- a/contrib/gnatsparse/gnatsparse.py +++ b/contrib/gnatsparse/gnatsparse.py @@ -451,7 +451,7 @@ class Bugzillabug(object): print >>outfile, " %s, %s, %s, %s);" % (id, who, when, text) for name, data, who in self.attachments: print >>outfile, "\ninsert into attachments (" - print >>outfile, " bug_id, filename, description, mimetype, ispatch, submitter_id, thedata) values (" + print >>outfile, " bug_id, filename, description, mimetype, ispatch, submitter_id) values (" ftype = None # It's *magic*! if name.endswith(".ii") == 1: @@ -463,7 +463,10 @@ class Bugzillabug(object): if ftype is None: ftype = "application/octet-stream" - print >>outfile, "%s,%s,%s, %s,0, %s,%s);" %(self.bug_id, SqlQuote(name), SqlQuote(name), SqlQuote (ftype), who, SqlQuote(zlib.compress(data))) + print >>outfile, "%s,%s,%s, %s,0, %s,%s);" %(self.bug_id, SqlQuote(name), SqlQuote(name), SqlQuote (ftype), who) + print >>outfile, "\ninsert into attach_data (" + print >>outfile, "\n(id, thedata) values (last_insert_id()," + print >>outfile, "%s);" % (SqlQuote(zlib.compress(data))) for newstate, oldstate, fieldid, changedby, changedwhen in self.bug_activity: print >>outfile, "\ninsert into bugs_activity (" print >>outfile, " bug_id, who, bug_when, fieldid, added, removed) values (" |