View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025762 | mantisbt | attachments | public | 2019-05-15 19:38 | 2019-07-04 03:04 |
Reporter | TomekAP | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 2.21.0 | ||||
Summary | 0025762: wrong filesize value in {bug_file} table | ||||
Description | filesize column of {bug_file} table stores size of the attachment in bytes. The field is Integer, so it stores values up to 2147483647. | ||||
Tags | schema | ||||
Not questioning the existence of a bug, but I would challenge the need to have attachments that big... |
|
@TomekAP how did you succeed to upload such big attachments? In case you store the attachments in database you have to increase also MySQL setting You might get other problems because of it (e.g. out of memory, bad performance caused by swapping), at least if there are multiple users uploading at the same time and/or your server does not have a lot of real memory. |
|
@atrol If server is on LAN it is quite easy. Upload_max_filesize and post_max_size are set to 3GB. |
|
I think there are two ways of handling it. Make this column bigint (can be unsigned), or (only for some period of time) leave it int, but unsigned.. |
|
@TomekAP it's clear how to handle it, but it can't be handled as a minor 2.x version upgrade, as database schema changes are needed for it. I would be good to get some feedback for 0025762:0062072 |
|
I thought, I have written it already. We store there database backups, sometimes with attachments. |
|
There is another possibility, If size is greater than max signed int, than we store in table size as max signed int, but while retrieving the attachment if size in DB is equal to max signed int, than real size will be calculated by size of a file on a disk. |
|