diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-07-08 19:22:37 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-07-08 19:22:37 +0000 |
commit | 2c8ebe468477e75e4808ffc9fa5aa28112aa9ec6 (patch) | |
tree | e110c89f62c48479e78c54088576480ab3d81867 /activerecord/lib/active_record/connection_adapters | |
parent | 34df31455a896c5f244cb433721dbab4306b1fb9 (diff) | |
download | rails-2c8ebe468477e75e4808ffc9fa5aa28112aa9ec6.tar.gz rails-2c8ebe468477e75e4808ffc9fa5aa28112aa9ec6.tar.bz2 rails-2c8ebe468477e75e4808ffc9fa5aa28112aa9ec6.zip |
Added better error message for "packets out of order" #1630 [courtenay]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1774 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rwxr-xr-x | activerecord/lib/active_record/connection_adapters/mysql_adapter.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb index 017e1ba5a5..71329705b7 100755 --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb @@ -129,6 +129,8 @@ module ActiveRecord @logger.info "Retrying invalid statement with reopened connection" log(sql, name) { @connection.query(sql) } end + elsif exception.message.split(":").first =~ /Packets out of order/ + raise ActiveRecord::StatementInvalid, "'Packets out of order' error was received from the database. Please update your mysql bindings (gem update mysql) and read http://dev.mysql.com/doc/mysql/en/password-hashing.html for more information." else raise end |