diff options
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/vendor/mysql.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/vendor/mysql.rb b/activerecord/lib/active_record/vendor/mysql.rb index 84f5d2533c..39ceb607b0 100644 --- a/activerecord/lib/active_record/vendor/mysql.rb +++ b/activerecord/lib/active_record/vendor/mysql.rb @@ -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() |