I have come across a flawed transaction counter in a mysql application that
I now support. I believe it is flawed because it does not use record
locking to deal with concurrency and was hoping someone could give me ideas
on how to correct.
The transaction counter works like this:
1) Web transaction starts.
2) Transaction queries counter value stored in mysql table.
3) Transaction increments counter in its own address space.
4) Transaction applies update to original counter with newly incremented
value.
5) Web transaction ends.
Since many of these transactions run concurrently (over 100 at the same
time), and steps 2, 3, and 4 are not atomic, they are probably stepping on
each other's results.
Any ideas are appreciated.
Kevin
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php