mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
No need to get the exception variable
This commit is contained in:
parent
ce0bd6856d
commit
d7b978d20a
1 changed files with 4 additions and 6 deletions
|
@ -727,12 +727,10 @@ module ActiveRecord
|
||||||
|
|
||||||
# SHOW VARIABLES LIKE 'name'
|
# SHOW VARIABLES LIKE 'name'
|
||||||
def show_variable(name)
|
def show_variable(name)
|
||||||
begin
|
variables = select_all("select @@#{name} as 'Value'", 'SCHEMA')
|
||||||
variables = select_all("select @@#{name} as 'Value'", 'SCHEMA')
|
variables.first['Value'] unless variables.empty?
|
||||||
variables.first['Value'] unless variables.empty?
|
rescue ActiveRecord::StatementInvalid
|
||||||
rescue ActiveRecord::StatementInvalid => _e
|
nil
|
||||||
nil
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns a table's primary key and belonging sequence.
|
# Returns a table's primary key and belonging sequence.
|
||||||
|
|
Loading…
Reference in a new issue