Pool should be 1 for sqlite3 unless WAL is enabled

This commit is contained in:
Tim Griesser 2015-04-22 11:45:12 -04:00
parent f4a6b4afa4
commit 2bc85cb7a5
2 changed files with 9 additions and 2 deletions

View File

@ -142,7 +142,7 @@ assign(Client.prototype, {
initializePool: function(config) {
this.connectionSettings = cloneDeep(config.connection)
if (this.pool) this.destroy()
this.pool = new this.Pool(assign(this.poolDefaults(config.pool), config.pool))
this.pool = new this.Pool(assign(this.poolDefaults(config.pool || {}), config.pool))
this.pool.on('error', function(err) {
helpers.error('Pool2 - ' + err)
})

View File

@ -127,7 +127,14 @@ assign(Client_SQLite3.prototype, {
default:
return response;
}
}
},
poolDefaults: function(config) {
return assign(Client.prototype.poolDefaults.call(this, config), {
min: 1,
max: 1
})
}
})