Quantcast
Channel: MySQL Forums - InnoDB
Viewing all articles
Browse latest Browse all 1954

Optimistic locking/Repeatable read (3 replies)

$
0
0
There doesn't appear to be a forum for asking questions like this.

We use repeatable read. I'd like to do optimistic locking, as in:

update foo
set version = version + 1, ...
where version = <original value> and ...;

This would be defeated if the value for version in the where clause is the one that was originally selected, even if it was updated in another transaction. Googling around, I see ambiguous statements about mysql's behavior. Some indicate that mysql will use the current committed valuer of version, but nothing is clear. Is it possible to to optimistic locking with repeatable read?

Viewing all articles
Browse latest Browse all 1954

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>