i have a problem when run tow clients of my java application on the network, first client insert a record second client can see it when refreshing the resultset, now when 2nd client insert a new record the first client can’t see that record even after refreshing, when the first client close the application and re run it, record from the 2nd client show normally !!!!! so what happened ? how can i monitor both of them to trace my problem ? Note: when setting AutoCommit true after COMMIT, every thing just work fine. do i need any extra configuration on my.cnf ??
Share
The first client never commits its transaction, even though it only reads (select) it keeps the connection and the transaction open, and hence it will be in an “old transactional-state” when refreshing. Make sure client one gets a new resultset (don’t just refresh it) or even simpler – just set AutoCommit to true which you state works.
Edit:Took away my first answer which I now think it wrong. (I said 2nd client didn’t commit, I missread the question somewhat.)