See below ----- Original Message ----- From: "Jeremy Smith" <[EMAIL PROTECTED]> To: "[EMAIL PROTECTED] Mysql. Com" <[EMAIL PROTECTED]> Sent: Sunday, May 09, 2004 9:31 PM Subject: Transaction question - no rollback needed?
> Does it make sense to use a transaction just for the row locking properties, > and then not needing to error check? > > I have a situation where I have seperate files that are being run very often > in realtime by many different users. One is calling a list of 12 football > players. The other is updating specific information about that player at a > given time. When the update takes place, occasionally the call for the 12 > players will only return 11 (presumably it is in the middle of an UPDATE). I don't understand why this would happen under any circumstance. Either your query should be blocked or it should read a snapshot of the data as it exists depending on your isolation level. I can't imagine a scenario where this would be good (desired) behavior by any RDBMS and it sounds like a problem. > So if I set autocommit = 0, begin work, perform the update, and then commit > will I in effect guarantee that the other read will wait until the update is > done before trying to find its 12 players? Yes and No. Using InnoDB, writers do not block readers, so they will still be able to read committed data, but they won't be able to update or delete it until your transaction commits. Lou > > I hope I didn't make that too confusing, and I appreciate any help that can > be offered. > > Thanks, > Jeremy > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]