Bug #7745 | Blob field set to null when updating BLOB larger than max_allowed_packet | ||
---|---|---|---|
Submitted: | 8 Jan 2005 16:36 | Modified: | 20 Apr 2005 9:22 |
Reporter: | Michael Barker | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 4.1.8 | OS: | Linux (Linux (2.6)) |
Assigned to: | Jani Tolonen | CPU Architecture: | Any |
[8 Jan 2005 16:36]
Michael Barker
[8 Jan 2005 16:55]
Mark Matthews
This is an issue with the _server_, if server-side prepared statments are being used (and in this case they are). The _server_ is the component truncating/setting the BLOB to null. Therefore, that's why I'm changing the category to 'MySQL Server', as it needs to be analyzed by someone on the server team.
[20 Apr 2005 9:22]
Jani Tolonen
max_allowed_packet is the maximum size of a 'communication packet' per query, settable by the user (admin). A larger value is considered as a wrong packet and will be handled accordingly. It does not make any difference whether the value is being concatenated into a field, or updated, or inserted in any other way; if the result exceeds max_allowed_packet, it is considered an error. Internally the server needs to handle the value as whole and by setting 'max_allowed_packet' admin has 'told' MySQL server not to handle larger values than that. The rule of thumb is to set the max_allowed_packet always to at least the size of the largest column in a table in the database, preferrably a bit larger.