Using MySQL Connector/Python I have a loop that keeps checking a value for a change every 2 seconds. Without all the meat, here is the loop (the print is there for testing purp
The default isolation level of InnoDB is REPEATABLE READ. This means that subsequent consistent SELECT
statements will read the same snapshot established by the first within a transaction. Though you're opening and closing cursors, you're probably doing that inside a transaction and so you're reading the established snapshot over and over again. Either ROLLBACK
or COMMIT
to end the current transaction so that you can read values committed after the snapshot was taken.