-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate Batch issue with MySQL and Connector J > 5.1.26
PostPosted: Tue Mar 25, 2014 11:59 am 
Newbie

Joined: Wed Jan 27, 2010 12:45 am
Posts: 9
It appears that the MySQL Connector has made some changes which may or may not be correct. They are however breaking batch inserts when When rewriteBatchedStatements=true

On code that works fine with Hibernate 4.1.6 and ConnectorJ 5.1.22 I get the following error when moving to ConnectorJ 5.1.29

Caused by: org.hibernate.jdbc.BatchedTooManyRowsAffectedException: Batch update returned unexpected row count from update [0]; actual row count: 53; expected: 1

It appears that the connector is now returning the actual number of inserted rows rather than a constant 1.

The Release notes for 5.1.27 show the following

Quote:
When rewriteBatchedStatements=true and useAffectedRows=true were set, executeBatch() did not return the number of affected rows as expected. (Bug #16442951, Bug #68562)


http://bugs.mysql.com/bug.php?id=68562
http://bugs.mysql.com/bug.php?id=71528

Has anyone else run into this? Turning off rewriteBatchedStatements is an option but that drops performance.


Top
 Profile  
 
 Post subject: Re: Hibernate Batch issue with MySQL and Connector J > 5.1.26
PostPosted: Tue May 20, 2014 5:35 pm 
Newbie

Joined: Tue May 20, 2014 5:31 pm
Posts: 1
+1

I'm seeing the same thing, from searching around I cant tell if they plan on fixing it in connectorJ or not... Issue is still present in 5.1.30


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

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.