O'Reilly logo
  • Peng Zhang thinks this is interesting:

For example, consider these two transactions running against the StockPrice table:


Cover of High Performance MySQL, 3rd Edition


Apparently, the locking process itself isn't atomic. It doesn't scan ahead which rows to lock at the beginning of a transaction, but locks more rows as the sql is running.