Socket
Socket
Sign inDemoInstall

mysql2

Package Overview
Dependencies
Maintainers
3
Versions
184
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mysql2 - npm Package Compare versions

Comparing version 1.0.0-rc.10 to 1.0.0-rc.11

8

Changelog.md

@@ -0,1 +1,9 @@

1.0.0-rc-11 ( 14/08/2016 )
- pool: support namedPlaceholder flag in `pool.query`
and `pool.execute` helpers #369
- pool: do not emit error on query command if callback #372
was passed
- pool: propagate connection time error back
to .getConnection() #372
1.0.0-rc-10 ( 09/08/2016 )

@@ -2,0 +10,0 @@ - ssl: do not use deprecated tls.createSecurePair

1

lib/commands/client_handshake.js

@@ -78,2 +78,3 @@ var util = require('util');

this.on('error', function (e) {
connection._fatalError = e;
connection._protocolError = e;

@@ -80,0 +81,0 @@ });

@@ -111,2 +111,5 @@ var net = require('net');

});
handshakeCommand.on('error', function(err) {
connection._notifyError(err);
});
this.addCommand(handshakeCommand);

@@ -113,0 +116,0 @@ }

13

lib/pool_connection.js

@@ -16,4 +16,9 @@ var mysql = require('../index.js');

// and we will be notified of disconnects.
this.on('end', this._removeFromPool);
this.on('error', this._removeFromPool);
var connection = this;
this.on('end', function(err) {
this._removeFromPool();
});
this.on('error', function(err) {
this._removeFromPool();
});
}

@@ -42,7 +47,7 @@

PoolConnection.prototype.destroy = function () {
this._removeFromPool(this);
this._removeFromPool();
return Connection.prototype.destroy.apply(this, arguments);
};
PoolConnection.prototype._removeFromPool = function (connection) {
PoolConnection.prototype._removeFromPool = function () {
if (!this._pool || this._pool._closed) {

@@ -49,0 +54,0 @@ return;

@@ -129,9 +129,10 @@ var mysql = require('../index.js');

var cmdQuery = Connection.createQuery(sql, values, cb, this.config.connectionConfig);
cmdQuery.namedPlaceholders = this.config.namedPlaceholders;
cmdQuery.namedPlaceholders = this.config.connectionConfig.namedPlaceholders;
this.getConnection(function (err, conn) {
if (err) {
cmdQuery.emit('error', err);
if (typeof cmdQuery.onResult === 'function') {
cmdQuery.onResult(err);
} else {
cmdQuery.emit('error', err);
}

@@ -149,9 +150,4 @@ return;

Pool.prototype.execute = function (sql, values, cb) {
if (typeof values === 'function') {
cb = values;
values = null;
}
var useNamedPlaceholders = this.config.connectionConfig.namedPlaceholders;
var useNamedPlaceholders = this.config.namedPlaceholders;
this.getConnection(function (err, conn) {

@@ -158,0 +154,0 @@ if (err) {

{
"name": "mysql2",
"version": "1.0.0-rc.10",
"version": "1.0.0-rc.11",
"description": "fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc