pcasey wrote:
...
...
On the back end I have a mySQL table where the 'data' column is a longblob (maximum length on the DB of 4294967295).
When I save attachments with "small" data chunks, it works fine.
When I try to save anything with a large (> 1M) data[] though, I get this error from the mysql driver:
Packet for query is too large (3223606 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.
Am I going to have to manually "chunk" my data in order to make it work on mySQL? Or is there some sort of workaround inside of Hibernate I can use to make it handle really big byte[]'s without throwing a curveball to mysql?
When I read your error message, it sounds quite clear to me what you need to do.
"You can change this value on the server by setting the max_allowed_packet variable."
This isn't an issue with Hibernate. It's a MySQL issue.