Reputation: 3890
I am using JDBC.My test application inserts some data into MySQL,then query it via the same connection.I have four computers,one is MySQL server,three are UBuntu Desktops.In one UBuntu Desktop,my test application run into this problem,but I don't find this problem in other UBuntu Desktops. Also,If I create a new connection to query data after inserting,I can find the data.The version of mysql-connector-java library is 5.1.17.I tried 5.1.18,but the problem still exists.
Upvotes: 1
Views: 2037
Reputation:
The default isolation level for MySQL is "REAPEATABLE READ", that means if you are not using autocommit in your query tool, you will not see committed data from other transactions unlesse you end your own transaction by issuing a COMMIT or ROLLBACK.
The fact that you can see the data after creating a new connection also points into that direction.
So you have two options
Upvotes: 4