Comparing version 3.11.1 to 3.11.2
@@ -25,3 +25,3 @@ // This file was modified by Oracle on June 1, 2021. | ||
const SqlString = require('sqlstring'); | ||
const LRU = require('lru-cache').default; | ||
const { createLRU } = require('lru.min'); | ||
@@ -79,5 +79,5 @@ const PacketParser = require('./packet_parser.js'); | ||
this._paused_packets = new Queue(); | ||
this._statements = new LRU({ | ||
this._statements = createLRU({ | ||
max: this.config.maxPreparedStatements, | ||
dispose: function(statement) { | ||
onEviction: function(_, statement) { | ||
statement.close(); | ||
@@ -416,3 +416,3 @@ } | ||
} | ||
get fatalError() { | ||
@@ -419,0 +419,0 @@ return this._fatalError; |
'use strict'; | ||
const LRU = require('lru-cache').default; | ||
const { createLRU } = require('lru.min'); | ||
let parserCache = new LRU({ | ||
const parserCache = createLRU({ | ||
max: 15000, | ||
@@ -54,3 +54,3 @@ }); | ||
function setMaxCache(max) { | ||
parserCache = new LRU({ max }); | ||
parserCache.resize(max); | ||
} | ||
@@ -57,0 +57,0 @@ |
'use strict'; | ||
const Iconv = require('iconv-lite'); | ||
const LRU = require('lru-cache').default; | ||
const { createLRU } = require('lru.min'); | ||
const decoderCache = new LRU({ | ||
const decoderCache = createLRU({ | ||
max: 500, | ||
@@ -8,0 +8,0 @@ }); |
{ | ||
"name": "mysql2", | ||
"version": "3.11.1", | ||
"version": "3.11.2", | ||
"description": "fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS", | ||
@@ -66,3 +66,3 @@ "main": "index.js", | ||
"long": "^5.2.1", | ||
"lru-cache": "^8.0.0", | ||
"lru.min": "^1.0.0", | ||
"named-placeholders": "^1.1.3", | ||
@@ -69,0 +69,0 @@ "seq-queue": "^0.0.5", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
502937
+ Addedlru.min@^1.0.0
+ Addedlru.min@1.1.0(transitive)
- Removedlru-cache@^8.0.0
- Removedlru-cache@8.0.5(transitive)