@@ -87,10 +87,7 @@ module.exports = (function() {
87
87
88
88
// Create a Connection Pool if set
89
89
if ( def . config . pool ) {
90
- adapter . pool = mysql . createPool ( _ . extend ( marshalConfig ( def . config ) , {
91
- connectionLimit : def . config . connectionLimit ,
92
- waitForConnections : def . config . waitForConnections
93
- } ) ) ;
90
+ adapter . pool = mysql . createPool ( def . config ) ;
94
91
}
95
92
96
93
return cb ( ) ;
@@ -544,7 +541,7 @@ module.exports = (function() {
544
541
545
542
// Use a new connection each time
546
543
if ( ! config . pool ) {
547
- var connection = mysql . createConnection ( marshalConfig ( config ) ) ;
544
+ var connection = mysql . createConnection ( config ) ;
548
545
connection . connect ( function ( err ) {
549
546
afterwards ( err , connection ) ;
550
547
} ) ;
@@ -602,27 +599,13 @@ module.exports = (function() {
602
599
console . error ( err ) ;
603
600
604
601
605
- connection = mysql . createConnection ( marshalConfig ( config ) ) ;
602
+ connection = mysql . createConnection ( config ) ;
606
603
connection . connect ( ) ;
607
604
// connection = mysql.createConnection(connection.config);
608
605
// handleDisconnect(connection);
609
606
// connection.connect();
610
607
} ) ;
611
608
}
612
609
613
- // Convert standard adapter config
614
- // into a custom configuration object for node-mysql
615
- function marshalConfig ( config ) {
616
- return {
617
- host : config . host ,
618
- port : config . port || 3306 ,
619
- socketPath : config . socketPath || null ,
620
- user : config . user ,
621
- password : config . password ,
622
- database : config . database ,
623
- timezone : config . timezone || 'Z'
624
- } ;
625
- }
626
-
627
610
return adapter ;
628
611
} ) ( ) ;
0 commit comments