From 7d73ed3512e647a6e5af6b10d66fb7659f9312b1 Mon Sep 17 00:00:00 2001 From: Roland Teichert Date: Wed, 16 Oct 2024 14:50:31 +0200 Subject: [PATCH] Parse mysql bigint as js bigint take2 --- lib/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common.js b/lib/common.js index 45ab864..4c18e60 100644 --- a/lib/common.js +++ b/lib/common.js @@ -50,7 +50,7 @@ const parseUInt64 = (exports.parseUInt64 = function (parser) { if (high >>> 21) { // using bigint here - return bigInt(TWO_TO_POWER_THIRTY_TWO).multiply(high).add(low); + return BigInt(high) * BigInt(TWO_TO_POWER_THIRTY_TWO) + BigInt(low); } return high * Math.pow(2, 32) + low;