No need to get the exception variable

This commit is contained in:
Rafael Mendonça França 2015-09-01 00:44:07 -03:00
parent ce0bd6856d
commit d7b978d20a
1 changed files with 4 additions and 6 deletions

View File

@ -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.