File tree 2 files changed +18
-1
lines changed 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,9 @@ common.createConnection = function(config) {
31
31
32
32
common . createPool = function ( config ) {
33
33
config = mergeTestConfig ( config ) ;
34
- config . createConnection = common . createConnection ;
34
+ if ( ! config . createConnection ) {
35
+ config . createConnection = common . createConnection ;
36
+ }
35
37
return Mysql . createPool ( config ) ;
36
38
} ;
37
39
Original file line number Diff line number Diff line change
1
+ var common = require ( '../../common' ) ;
2
+ var assert = require ( 'assert' ) ;
3
+ var Connection = require ( common . lib + '/Connection' ) ;
4
+ var pool = common . createPool ( {
5
+ createConnection : function ( ) {
6
+ var connection = common . createConnection ( )
7
+ connection . query ( 'SET SESSION sql_mode="STRICT_ALL_TABLES"' )
8
+ return connection
9
+ }
10
+ } ) ;
11
+
12
+ pool . getConnection ( function ( err , connection ) {
13
+ if ( err ) throw err ;
14
+ pool . end ( )
15
+ } ) ;
You can’t perform that action at this time.
0 commit comments