Fixed MariaDB issue
authorMarcel Werk <burntime@woltlab.com>
Sun, 29 May 2016 09:33:00 +0000 (11:33 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 29 May 2016 09:33:07 +0000 (11:33 +0200)
wcfsetup/install/files/lib/system/database/MySQLDatabase.class.php

index a02b761c337aae3bcfadbeefa438d06fcb4ae8f9..0ce66ef73ae9d41a099ef8a5bb69faa80a084fa3 100644 (file)
@@ -63,4 +63,18 @@ class MySQLDatabase extends Database {
                parent::setAttributes();
                $this->pdo->setAttribute(\PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
        }
+       
+       /**
+        * @inheritDoc
+        */
+       public function getVersion() {
+               try {
+                       $statement = $this->prepareStatement('SELECT VERSION()');
+                       $statement->execute();
+                       return $statement->fetchSingleColumn();
+               }
+               catch (\PDOException $e) {}
+               
+               return 'unknown';
+       }
 }