Debugging MySQL lock errors in Ruby on Rails

To achieve data consistency MySQL applies a set of quite complex rules for locking. It is possible that more rows get locked than one might expect. Especially when there is a lack of relevant database indexes.For example the following Rails code performs an update that locks the whole table if the name field does not have an index.
Debugging MySQL lock errors in Ruby on Rails #ruby #rubydeveloper #rubyonrails #errors #mysql https://rubyonrails.ba/single/debugging-mysql-lock-errors-in-ruby-on-rails

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles