diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-09-01 00:44:07 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-09-01 00:44:07 -0300 |
commit | d7b978d20a7c588986f1a93bc8191fbc01d2a3c5 (patch) | |
tree | 45e98e5c4904b2da3c567ea3e95c76737d111f17 | |
parent | ce0bd6856d955d350cb45b0ab40a4216549c4d41 (diff) | |
download | rails-d7b978d20a7c588986f1a93bc8191fbc01d2a3c5.tar.gz rails-d7b978d20a7c588986f1a93bc8191fbc01d2a3c5.tar.bz2 rails-d7b978d20a7c588986f1a93bc8191fbc01d2a3c5.zip |
No need to get the exception variable
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb index c086111d41..7b47539596 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb @@ -727,12 +727,10 @@ module ActiveRecord # SHOW VARIABLES LIKE 'name' def show_variable(name) - begin - variables = select_all("select @@#{name} as 'Value'", 'SCHEMA') - variables.first['Value'] unless variables.empty? - rescue ActiveRecord::StatementInvalid => _e - nil - end + variables = select_all("select @@#{name} as 'Value'", 'SCHEMA') + variables.first['Value'] unless variables.empty? + rescue ActiveRecord::StatementInvalid + nil end # Returns a table's primary key and belonging sequence. |