Skip to content

Pool event 'connection' does not match documentation. #599

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rla opened this issue Sep 30, 2013 · 1 comment · Fixed by #601
Closed

Pool event 'connection' does not match documentation. #599

rla opened this issue Sep 30, 2013 · 1 comment · Fixed by #601

Comments

@rla
Copy link

rla commented Sep 30, 2013

Code (master) emits connection only, not with error argument:
https://github.com/felixge/node-mysql/blob/master/lib/Pool.js#L51

Readme gives example with error argument:
https://github.com/felixge/node-mysql#pooling-connections

pool.on('connection', function(err, connection) {
  connection.query('SET SESSION auto_increment_increment=1')
});
@dougwilson
Copy link
Member

The behavior you are seeing in the code is correct, it is the documentation that is incorrect and needs to be changed.

@felixge felixge closed this as completed in a3b824d Oct 2, 2013
felixge added a commit that referenced this issue Oct 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants