aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-06-20 18:30:35 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-06-20 18:30:35 +0000
commiteb2e30ef249051713d8122a784d8fbfa378e7ae1 (patch)
treec6b8c3ed75d1e72ac2043c54ff77c817dfd25fe3 /activerecord/lib/active_record/connection_adapters
parente963354124d27bdae0420ae0614335d251be8d51 (diff)
downloadrails-eb2e30ef249051713d8122a784d8fbfa378e7ae1.tar.gz
rails-eb2e30ef249051713d8122a784d8fbfa378e7ae1.tar.bz2
rails-eb2e30ef249051713d8122a784d8fbfa378e7ae1.zip
MySQL: fix show_variable. Closes #8448.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7071 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rwxr-xr-xactiverecord/lib/active_record/connection_adapters/mysql_adapter.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
index 6ba973041b..7edf5b0f2d 100755
--- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
@@ -409,7 +409,8 @@ module ActiveRecord
# SHOW VARIABLES LIKE 'name'
def show_variable(name)
- select_value "SHOW VARIABLES LIKE '#{name}'"
+ variables = select_all("SHOW VARIABLES LIKE '#{name}'")
+ variables.first['Value'] unless variables.empty?
end
private