soundcloud / lhm

Online MySQL schema migrations
BSD 3-Clause "New" or "Revised" License
1.83k stars 190 forks source link

lock_wait_timeout is readonly in older versions of SQL #120

Open betesh opened 9 years ago

betesh commented 9 years ago

See http://dev.mysql.com/doc/innodb/1.1/en/innodb-other-changes-innodb_lock_wait_timeout.html -- Before v5.5, you can't set this parameter without restarting the server.

Since Invoker#set_session_lock_wait_timeouts is not documented, I'm not sure what the consequences of skipping this step are, but I commented out this line--https://github.com/soundcloud/lhm/blob/58317e374dbf7f799ec592521307e8c4ae0d277b/lib/lhm/invoker.rb#L42--and it seems to be working on a DB table with ~1 million records. Maybe it's worth checking the Mysql version and skipping this step (and logging a warning?) if it's an older version. At the very least, please provide some documentation explaining the purpose of Invoker#set_session_lock_wait_timeouts.