Skip to content

Upgrading mysql2 0.4 to 0.5

Breaking0.4.10 → 0.5.7Breaking5Security1Deprecated1New16Changed10Fixed15Other13

Fetching 8 releases from GitHub…6 / 8
BreakingUpgrade verdict

5 breaking changes and a security fix.

  • Remove spec from gem.
  • Ruby 2.0 or higher required.
  • MySQL 5.5 or higher required.
  • For Rails 4.x please pin the gem to mysql2 '~> 0.4.0' to avoid the 0.5.x upgrade.
Top 5 of 7 that need code or config changes

Ruby requirement changed in 0.5.0: >= 0 → >= 2.0.0.

Breaking5
Remove spec from gem.
Ruby 2.0 or higher required.
MySQL 5.5 or higher required.
For Rails 4.x please pin the gem to mysql2 '~> 0.4.0' to avoid the 0.5.x upgrade.
For Rails 5.x the next point releases will enable both mysql2 0.4.x and 0.5.x, but until the next point release you may wish to pin the mysql2 version in your Gemfile.
Security1
Redacts password from query_options.
query_options
Deprecated1
Ruby 3.2 deprecates the double_heap option to GC.verify_compaction_references.
GC.verify_compaction_referencesdouble_heap

Generated by DepDelta from published Ruby source. Not mixed with prose notes.

  • removed: class LoadLibrary < Win32API.new('Kernel32', 'LoadLibrary', ['P'], 'I')
  • removed: const Util.TimeoutError
  • changed: constructor Error(_) → constructor Error(_, _ = …, _ = …, _ = …)
  • changed: method Statement.execute(*) → method Statement.execute(*, **)
  • added: const Error.CODES
  • added: const Util.TIMEOUT_ERROR_CLASS
  • added: const Util.TIMEOUT_ERROR_NEVER
  • added: method Client.find_default_ca_path()
  • added: method Client.parse_connect_attrs(_)
  • added: property Result.server_flags: reader
  • added: class ConnectionError < Error
  • added: class TimeoutError < Error