Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mysql

Package Overview
Dependencies
Maintainers
9
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mysql - npm Package Compare versions

Comparing version 2.5.1 to 2.5.2

4

Changes.md

@@ -7,2 +7,6 @@ # Changes

## v2.5.2 (2014-10-10)
* Fix receiving large text fields #922
## v2.5.1 (2014-09-22)

@@ -9,0 +13,0 @@

37

lib/protocol/Parser.js

@@ -101,21 +101,32 @@ var MAX_PACKET_LENGTH = Math.pow(2, 24) - 1;

Parser.prototype.append = function(newBuffer) {
// If resume() is called, we don't pass a buffer to write()
if (!newBuffer) {
Parser.prototype.append = function append(chunk) {
if (!chunk || chunk.length === 0) {
return;
}
var oldBuffer = this._buffer;
var bytesRemaining = this._bytesRemaining();
var newLength = bytesRemaining + newBuffer.length;
var buffer = chunk;
var sliceEnd = this._buffer.length;
var sliceStart = this._packetOffset === null
? this._offset
: this._packetOffset;
var sliceLength = sliceEnd - sliceStart;
var combinedBuffer = (this._offset > newLength)
? oldBuffer.slice(0, newLength)
: new Buffer(newLength);
if (sliceLength !== 0) {
// Create a new Buffer
buffer = new Buffer(sliceLength + chunk.length);
oldBuffer.copy(combinedBuffer, 0, this._offset);
newBuffer.copy(combinedBuffer, bytesRemaining);
// Copy data
this._buffer.copy(buffer, 0, sliceStart, sliceEnd);
chunk.copy(buffer, sliceLength);
}
this._buffer = combinedBuffer;
this._offset = 0;
// Adjust data-tracking pointers
this._buffer = buffer;
this._offset = this._offset - sliceStart;
this._packetEnd = this._packetEnd !== null
? this._packetEnd - sliceStart
: null;
this._packetOffset = this._packetOffset !== null
? this._packetOffset - sliceStart
: null;
};

@@ -122,0 +133,0 @@

{
"name": "mysql",
"description": "A node.js driver for mysql. It is written in JavaScript, does not require compiling, and is 100% MIT licensed.",
"version": "2.5.1",
"version": "2.5.2",
"license": "MIT",

@@ -6,0 +6,0 @@ "author": "Felix Geisendörfer <felix@debuggable.com> (http://debuggable.com/)",

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