MySQL Workbench session does not see updates to the database

一世执手 提交于 2019-11-30 20:22:43

This is an old question, but still I have the same bug. OP mentionned a bug opened on MySQL Workbench in another thread (http://bugs.mysql.com/bug.php?id=69800).

According to doc (https://dev.mysql.com/doc/refman/5.7/en/innodb-transaction-isolation-levels.html#isolevel_repeatable-read), Default Isolation Level is REPEATABLE-READ.

This mean that a snapshot of the database is made on the FIRST read of the transaction. Every other read of this transaction will show you the data of the snapshot.

So you need to end the transaction (commit or roll-back) to get a new snapshot on the next read.

My colleagues who set MySQL Workbench on AutoCommit don't see the repeatable-read behaviour. We figured out it's because after each SELECT, the transaction is closed and a new snapshot is created.

So, as the bug is still not corrected, a workaround would be :

  • switch to autocommit for new snapshots to be automatically created
  • or commit/rollback after each SELECT to create a new snapshot
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!