Re: getting stale data (jdbc / innodb)
Posted by: Mark Matthews
Date: May 11, 2014 11:37AM

Hi Christian,

This is a common mistake. Innodb, by default uses REPEATABLE READ isolation level, which means, if you have one connection writing data (and committing that transaction), and another connection reading from the same table, the updated data will not be visible until after the reading connection has ended its transaction by committing or rolling back.

Because of your statement..."When I use a new connection, it works", I'm confident this is your problem, because those new connections start with a new repeatable read view that will include the updated data. Existing connections which have neither committed or rolled back since the data has been updated, will not.

-Mark

Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote


Subject
Written By
Posted
Re: getting stale data (jdbc / innodb)
May 11, 2014 11:37AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.