Fixed "connection lost" issue with the bundled Ruby/MySQL driver (would kill the app after 8 hours of inactivity) #2163, #428 [kajism@yahoo.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2182 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
8aa63a78b8
commit
04594cfadb
|
@ -1,5 +1,7 @@
|
|||
*SVN*
|
||||
|
||||
* Fixed "connection lost" issue with the bundled Ruby/MySQL driver (would kill the app after 8 hours of inactivity) #2163, #428 [kajism@yahoo.com]
|
||||
|
||||
* Fixed comparison of Active Record objects so two new objects are not equal #2099 [deberg]
|
||||
|
||||
* Fixed that the SQL Server adapter would sometimes return DBI::Timestamp objects instead of Time #2127 [Tom Ward]
|
||||
|
|
|
@ -1022,6 +1022,9 @@ class Mysql
|
|||
end
|
||||
@sock.sync = true
|
||||
buf.join
|
||||
rescue
|
||||
errno = Error::CR_SERVER_LOST
|
||||
raise Error::new(errno, Error::err(errno))
|
||||
end
|
||||
|
||||
def write(data)
|
||||
|
@ -1039,6 +1042,9 @@ class Mysql
|
|||
@pkt_nr = @pkt_nr + 1 & 0xff
|
||||
@sock.sync = true
|
||||
@sock.flush
|
||||
rescue
|
||||
errno = Error::CR_SERVER_LOST
|
||||
raise Error::new(errno, Error::err(errno))
|
||||
end
|
||||
|
||||
def close()
|
||||
|
|
Loading…
Reference in New Issue