projects
/
web.mtrack
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d9de01
)
inc/DBSchema/mysql.php
author
Alan Knowles
<alan@akbkhome.com>
Thu, 27 Jan 2011 15:11:51 +0000
(23:11 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Thu, 27 Jan 2011 15:11:51 +0000
(23:11 +0800)
inc/DBSchema/mysql.php
patch
|
blob
|
history
diff --git
a/inc/DBSchema/mysql.php
b/inc/DBSchema/mysql.php
index
b2c8205
..
cae572e
100644
(file)
--- a/
inc/DBSchema/mysql.php
+++ b/
inc/DBSchema/mysql.php
@@
-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;
}