Permalink
Browse files

Fixed ignored connection errors for mysql alpha 2.0 driver

  • Loading branch information...
1 parent ce018cb commit 24cb27609468718da561bb37349b2efcdb3e5ab9 @andrzejpolis andrzejpolis committed Jul 18, 2013
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/drivers/mysql.js
View
@@ -96,16 +96,19 @@ var MySqlDriver = Driver.extend({
var db;
if (typeof(mysql.createConnection) === 'undefined') {
db = new mysql.createClient(opts);
+ conn = new MySqlConnection(this, db, true, opts);
+ callback(null, conn);
} else {
db = new mysql.createConnection(opts);
db.connect(function(err) {
if (err) {
- console.log(err);
+ callback(err);
+ } else {
+ conn = new MySqlConnection(this, db, true, opts);
+ callback(null, conn);
}
});
}
- conn = new MySqlConnection(this, db, true, opts);
- callback(null, conn);
}
},

0 comments on commit 24cb276

Please sign in to comment.