Re: Alternative to timestamp for Optimistic Concurrency for MySql ?

Re: Alternative to timestamp for Optimistic Concurrency for MySql ?

Old forum URL: forums.lhotka.net/forums/t/4949.aspx


tiago posted on Sunday, June 08, 2008

burmajam:

Hi there,

Here's information for MySql. From version 5.0.* there are triggers so you can do as Rocky said, but if you don't need high resolution (less then one second) you can use DateTime or TimeStamp field and treat it as other columns. Just pay attention what happens if you don't have application server or time synchronisation on clients, because of the problem with different clock settings.

 

"Timestamp" is a misnomer - it should be "Rowversion" as it starts at 0 (or 1?) and increments by 1 every time you update the row.

Copyright (c) Marimer LLC