Howdy folks,
I've got the following property:
Code:
@Column(length = 16777215)
private String value;
And a MySQL InnoDB table (UTF8) with a MEDIUMTEXT field containing said value.
When I insert a value of 16777215 characters, MySQL bites my head off, telling me I'm exceeding the max package size.
Quote:
Packet for query is too large (16777394 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.; nested exception is com.mysql.jdbc.PacketTooBigException: Packet for query is too large (16777394 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.
Now, I could obviously chance the max_allowed_packet value on the MySQL server, but that's a very ugly hack. Why isn't the transfer being split up or streamed, which I assume happens with BLOBs anyway?
Any suggestions on how to fix this without fucking with MySQL?