-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: MySQL mediumtext and long strings...
PostPosted: Wed Jun 09, 2010 5:33 am 
Newbie

Joined: Wed Jun 09, 2010 5:28 am
Posts: 1
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.