inc/DBSchema/mysql.php
authorAlan Knowles <alan@akbkhome.com>
Thu, 27 Jan 2011 15:11:51 +0000 (23:11 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 27 Jan 2011 15:11:51 +0000 (23:11 +0800)
inc/DBSchema/mysql.php

index b2c8205..cae572e 100644 (file)
@@ -18,9 +18,15 @@ class MTrackDBSchema_mysql extends MTrackDBSchema_Generic
             return $ret;
         }
         parse_str(str_replace(array(";",":"), "&", $this->db->dsn), $dsn);
-        print_r($this->db->dsn);
-        print_r($dsn);
-        $this->db->query("CREATE DATABASE {$dsn['dbname']}");
+        
+        try {
+            $this->db->query("CREATE DATABASE {$dsn['dbname']}");
+        } catch (Exception $e) {
+            // technically this should not get here..
+            // as pdo's dsn design is borked..
+        }
+         
+         
         // assume we need to create database..
         return null;
     }