Huge attachments
Sean McAfee
etzwane at schwag.org
Sat Mar 20 00:22:21 UTC 2004
Has anyone else ever grappled with the issue of adding huge attachments to a
Bugzilla installation based on a pre-v4 version of the MySQL server, which
has a packet size limited to 16MB?
The only workaround I've been able to come up with doesn't work, due to an
apparent server bug:
mysql> insert into attachments (thedata) values (repeat("*", 14000000));
Query OK, 1 row affected (1.24 sec)
mysql> select last_insert_id();
+------------------+
| last_insert_id() |
+------------------+
| 4183 |
+------------------+
1 row in set (0.00 sec)
mysql> select length(thedata) from attachments where attach_id = 4183;
+-----------------+
| length(thedata) |
+-----------------+
| 14000000 |
+-----------------+
1 row in set (0.11 sec)
mysql> update attachments set thedata = concat(thedata, repeat("*", 14000000)) where attach_id = 4183;
Query OK, 1 row affected (1.30 sec)
Rows matched: 1 Changed: 1 Warnings: 1
mysql> select length(thedata) from attachments where attach_id = 4183;
+-----------------+
| length(thedata) |
+-----------------+
| 0 |
+-----------------+
1 row in set (0.00 sec)
Not only is the thedata column not updated correctly, the original data is
lost. Looks like a pretty serious bug to me.
--Sean
More information about the developers
mailing list