fix showVariable (was previously returning the variable name, not its value)
authorChuck Hagenbuch <chuck@horde.org>
Tue, 23 Dec 2008 19:07:14 +0000 (14:07 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Tue, 23 Dec 2008 19:07:14 +0000 (14:07 -0500)
framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php

index 42db43d..0236600 100644 (file)
@@ -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');
+        }
     }
 
     /**