From 22ce86081d00248fc748eecddde511756ba42f0b Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Tue, 23 Dec 2008 14:07:14 -0500 Subject: [PATCH] fix showVariable (was previously returning the variable name, not its value) --- framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php b/framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php index 42db43d0b..023660093 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php +++ b/framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php @@ -316,7 +316,12 @@ class Horde_Db_Adapter_Mysql_Schema extends Horde_Db_Adapter_Abstract_Schema */ public function showVariable($name) { - return $this->selectValue('SHOW VARIABLES LIKE '.$this->quoteString($name)); + $value = $this->selectOne('SHOW VARIABLES LIKE '.$this->quoteString($name)); + if ($value[0] == $name) { + return $value[1]; + } else { + throw new Horde_Db_Exception($name . ' is not a recognized variable'); + } } /** -- 2.11.0