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

mysql2

Package Overview
Dependencies
Maintainers
3
Versions
191
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 3.11.5-canary.d5a76e6c to 3.11.5

12

lib/packets/packet.js

@@ -12,3 +12,3 @@ // This file was modified by Oracle on June 1, 2021.

const StringParser = require('../parsers/string.js');
const Types = require('../constants/types.js');
const INVALID_DATE = new Date(NaN);

@@ -296,3 +296,3 @@

}
let str = this.readDateTimeString(6, 'T');
let str = this.readDateTimeString(6, 'T', null);
if (str.length === 10) {

@@ -304,3 +304,3 @@ str += 'T00:00:00';

readDateTimeString(decimals, timeSep) {
readDateTimeString(decimals, timeSep, columnType) {
const length = this.readInt8();

@@ -330,2 +330,4 @@ let y = 0;

].join(':')}`;
} else if (columnType === Types.DATETIME) {
str += ' 00:00:00';
}

@@ -432,3 +434,3 @@ if (length > 10) {

encoding,
this.offset - len,
this.offset - len,
this.offset

@@ -923,3 +925,3 @@ );

static MockBuffer() {
const noop = function () {};
const noop = function () { };
const res = Buffer.alloc(0);

@@ -926,0 +928,0 @@ for (const op in NativeBuffer.prototype) {

@@ -45,3 +45,3 @@ 'use strict';

if (helpers.typeMatch(field.columnType, dateStrings, Types)) {
return `packet.readDateTimeString(${parseInt(field.decimals, 10)});`;
return `packet.readDateTimeString(${parseInt(field.decimals, 10)}, ${null}, ${field.columnType});`;
}

@@ -60,3 +60,3 @@ return `packet.readDateTime(${helpers.srcEscape(timezone)});`;

case Types.VECTOR:
return 'packet.parseVector()';
return 'packet.parseVector()';
case Types.JSON:

@@ -63,0 +63,0 @@ // Since for JSON columns mysql always returns charset 63 (BINARY),

{
"name": "mysql2",
"version": "3.11.5-canary.d5a76e6c",
"version": "3.11.5",
"description": "fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS",
"main": "index.js",
"typings": "typings/mysql/index",
"type": "commonjs",
"scripts": {

@@ -13,5 +14,5 @@ "lint": "npm run lint:docs && npm run lint:code",

"lint:tests": "npx prettier --check ./test",
"test": "poku --debug --include=\"test/esm,test/unit,test/integration\"",
"test:bun": "poku --debug --platform=\"bun\" --include=\"test/esm,test/unit,test/integration\"",
"test:deno": "deno run --allow-read --allow-env --allow-run npm:poku --debug --platform=\"deno\" --deno-allow=\"read,env,net,sys\" --deno-cjs=\".js,.cjs\" --include=\"test/esm,test/unit,test/integration\"",
"test": "poku -d test/esm test/unit test/integration",
"test:bun": "poku -d --bun test/esm test/unit test/integration",
"test:deno": "deno run --allow-read --allow-env --allow-run npm:poku -d --deno --denoAllow=\"read,env,net,sys\" test/esm test/unit test/integration",
"test:tsc-build": "cd \"test/tsc-build\" && npx tsc -p \"tsconfig.json\"",

@@ -18,0 +19,0 @@ "coverage-test": "c8 npm run test",

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