This commit brianmario/mysql2@82aa624 broke CI mysql2 tests.
Introduced in this Travis job first https://travis-ci.org/rails/rails/builds/9117770.
/cc @guilleiguaran @senny
Lock mysql2 version to 0.3.11 since 0.3.12 is failing right now. Check …
…#11457 for details
mysql2 0.3.12 starts to support :read_timeout / :write_timeout options.
Should we assign default value to read_timeout/write_timeout options to fix this ? For example:
12 config[:username] = 'root' if config[:username].nil?
14 config[:read_timeout] = 600 if config[:read_timeout].nil? ★
15 config[:write_timeout] = 60 if config[:write_timeout].nil? ★
17 if Mysql2::Client.const_defined? :FOUND_ROWS
18 config[:flags] = Mysql2::Client::FOUND_ROWS
This patch fixes this issue.
BTW: I don't think the above commit break CI mysql2 tests, but we are drowned in many warning message sea.
@kennyj yea the sea of warnings could cause travis to shut down the build.
@kennyj Nice! That works for both 3.11 and 3.12 mysql2 gems.
Question is what are good default values.
But I can't find any hint that this is required config parameter.
@simi I'm not sure about good values.
MySQL's connection timeout is 28800 seconds. It's so long.
According to googling, LVS(linux virtual server)'s default timeout is 900 seconds. So I wrote 600 (less than 900) seconds in the above fix.
@kennyj I'm getting deeper into mysql2. I think this is not proper solution.
@kennyj I found it. ^
@simi good :)
Use latest mysql2.