Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 1c0d3e10
authored
Dec 05, 2015
by
Mick Hansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(replication): mysql needs access to pool settings
1 parent
86ee3d5b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
lib/dialects/abstract/connection-manager.js
test/integration/replication.test.js
lib/dialects/abstract/connection-manager.js
View file @
1c0d3e1
...
...
@@ -13,7 +13,7 @@ var Pooling = require('generic-pool')
,
ConnectionManager
;
ConnectionManager
=
function
(
dialect
,
sequelize
)
{
var
config
=
sequelize
.
config
;
var
config
=
_
.
cloneDeep
(
sequelize
.
config
)
;
this
.
sequelize
=
sequelize
;
this
.
config
=
config
;
...
...
@@ -85,7 +85,7 @@ ConnectionManager.prototype.close = function () {
// If he does this, generic-pool will try to call connect before the dialect-specific connection manager has been correctly set up
ConnectionManager
.
prototype
.
initPools
=
function
()
{
var
self
=
this
,
config
=
_
.
cloneDeep
(
this
.
config
)
;
,
config
=
this
.
config
;
if
(
!
config
.
replication
)
{
this
.
pool
=
Pooling
.
Pool
({
...
...
@@ -119,7 +119,8 @@ ConnectionManager.prototype.initPools = function () {
port
:
config
.
port
,
username
:
config
.
username
,
password
:
config
.
password
,
database
:
config
.
database
database
:
config
.
database
,
pool
:
config
.
pool
});
// Apply defaults to each read config
...
...
@@ -129,7 +130,8 @@ ConnectionManager.prototype.initPools = function () {
port
:
self
.
config
.
port
,
username
:
self
.
config
.
username
,
password
:
self
.
config
.
password
,
database
:
self
.
config
.
database
database
:
self
.
config
.
database
,
pool
:
self
.
config
.
pool
});
});
...
...
test/integration/replication.test.js
View file @
1c0d3e1
...
...
@@ -14,7 +14,6 @@ describe(Support.getTestDialectTeaser('Replication'), function() {
beforeEach
(
function
()
{
this
.
sequelize
=
Support
.
getSequelizeInstance
(
null
,
null
,
null
,
{
replication
:
{
// Just need empty objects, sequelize will copy in defaults
write
:
Support
.
getConnectionOptions
(),
read
:
[
Support
.
getConnectionOptions
()]
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment