From eb2e30ef249051713d8122a784d8fbfa378e7ae1 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 20 Jun 2007 18:30:35 +0000 Subject: MySQL: fix show_variable. Closes #8448. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7071 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/connection_adapters/mysql_adapter.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activerecord/lib/active_record') 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 -- cgit v1.2.3