0

I have a database running on localhost and the content of this DB is updated by an app (using Hibernate, for the record). In this order:

  • In Workbench I run a SELECT * to check to DB content
  • I add a row in a table through the app
  • I run the same SELECT in Workbench

The result is the same as the first query. Actually if I hit the button "Commit the current transaction", running the request again will show the new row. Why is it necessary to commit the Workbench session to see results committed by an external app ?

Is there a way to auto-refresh the table rows in Workbench?

Thanks for the help.

1

This has nothing to do with MySQL Workbench. If you have an open transaction then no other client than that which owns that transaction can see changes made until everything is committed. I recommend to read a bit about database transactions.

0

As mentioned by Mike Lischke this is indeed a matter of transaction. Actually MySQL Workbench opens one transaction per connection unless the autocommit mode is toggled. The little button that toggles the autocommit mode is surrounded by a light blue square when deactivated, that made me believe that it was activated. -> Solution: activate the autocommit mode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.