-
-
Notifications
You must be signed in to change notification settings - Fork 666
Comparing changes
Open a pull request
base repository: sidorares/node-mysql2
base: v3.18.2
head repository: sidorares/node-mysql2
compare: v3.19.0
- 16 commits
- 19 files changed
- 4 contributors
Commits on Feb 28, 2026
-
build(deps-dev): bump @types/node from 25.3.1 to 25.3.2 (#4136)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 25.3.1 to 25.3.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 25.3.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for b1d212b - Browse repository at this point
Copy the full SHA b1d212bView commit details -
1
Configuration menu - View commit details
-
Copy full SHA for 333ca03 - Browse repository at this point
Copy the full SHA 333ca03View commit details -
Configuration menu - View commit details
-
Copy full SHA for ff8ed8a - Browse repository at this point
Copy the full SHA ff8ed8aView commit details
Commits on Mar 2, 2026
-
fix: fix precision loss for large decimal values (#4135)
* fix(parser): prevent precision loss for numbers > 17 chars Add length-based bailout to parseFloat() to fix accumulated rounding errors from repeated *10 operations. For numbers longer than 17 characters, delegate to Number.parseFloat() which handles precision correctly. This fixes two critical issues: - DECIMAL(36,18) precision loss where 50000.000...0 parsed as 49999.999 - MAX_VALUE doubles corruption where last digits were incorrect The threshold of 17 is based on IEEE 754 double precision limits (~15-17 significant digits). Testing shows this affects only ~1% of typical MySQL data while preserving the fast path for 98%+ of cases. Add comprehensive test suite with 54 test cases covering both issues, edge cases, and regression tests. Closes #3690 Closes #2928 * test: add integration tests for issues #3690 and #2928 Add tests exercising parseFloat bailout paths to improve coverage: - DECIMAL(36,18) with many fractional digits (>17 chars) - DOUBLE with scientific notation values These integration tests ensure the bailout conditions are covered in real database query scenarios.
Configuration menu - View commit details
-
Copy full SHA for 099beea - Browse repository at this point
Copy the full SHA 099beeaView commit details -
build(deps-dev): bump @types/node from 25.3.2 to 25.3.3 in /website (#…
…4144) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 25.3.2 to 25.3.3. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 25.3.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1Configuration menu - View commit details
-
Copy full SHA for 5e9a7c2 - Browse repository at this point
Copy the full SHA 5e9a7c2View commit details -
build(deps): bump lucide-react from 0.575.0 to 0.576.0 in /website (#…
…4142) Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.575.0 to 0.576.0. - [Release notes](https://github.com/lucide-icons/lucide/releases) - [Commits](https://github.com/lucide-icons/lucide/commits/0.576.0/packages/lucide-react) --- updated-dependencies: - dependency-name: lucide-react dependency-version: 0.576.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for fb4e419 - Browse repository at this point
Copy the full SHA fb4e419View commit details -
build(deps): bump @easyops-cn/docusaurus-search-local in /website (#4143
) Bumps [@easyops-cn/docusaurus-search-local](https://github.com/easyops-cn/docusaurus-search-local/tree/HEAD/packages/docusaurus-search-local) from 0.55.0 to 0.55.1. - [Release notes](https://github.com/easyops-cn/docusaurus-search-local/releases) - [Commits](https://github.com/easyops-cn/docusaurus-search-local/commits/v0.55.1/packages/docusaurus-search-local) --- updated-dependencies: - dependency-name: "@easyops-cn/docusaurus-search-local" dependency-version: 0.55.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 15e012f - Browse repository at this point
Copy the full SHA 15e012fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 09b802c - Browse repository at this point
Copy the full SHA 09b802cView commit details -
Configuration menu - View commit details
-
Copy full SHA for c34bd6f - Browse repository at this point
Copy the full SHA c34bd6fView commit details -
build(deps-dev): bump @types/node from 25.3.2 to 25.3.3 (#4141)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 25.3.2 to 25.3.3. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 25.3.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 909eec3 - Browse repository at this point
Copy the full SHA 909eec3View commit details
Commits on Mar 3, 2026
-
feat: use server's preferred auth method to eliminate auth switch rou…
…ndtrip (#4140) * feat: use server's preferred auth method to eliminate auth switch roundtrip Optimizes authentication by using the server's advertised authentication method directly in the initial handshake response, eliminating unnecessary AuthSwitchRequest/Response packet exchanges. Before: Client always sends mysql_native_password, then switches when server requests caching_sha2_password (5-6 packets, extra roundtrip) After: Client detects server's preference and uses it directly (3-4 packets, no auth switch needed) Performance improvement: - 33% fewer packets during authentication phase - 15-25% faster connection establishment to MySQL 8.0+ servers - Significant benefit for connection pools Implementation: - Added smart auth method selection in sendCredentials() - Added calculateSha256Token() for caching_sha2_password support - Refactored to use shared getAuthPlugin() helper from auth_switch.js - Maintains 100% backward compatibility with fallback logic Tested against MySQL 5.7, 8.0, 8.1 with all standard auth methods. * fix: address code review feedback - Fix scramble length: ensure exactly 20 bytes (authPluginData2 can include trailing NUL) - Respect custom auth plugins: fallback to auth switch when user provides custom authPlugins or authSwitchHandler - Add type validation: validate authToken is Buffer and authPluginName is string - Improve backward compatibility by detecting and preserving custom auth plugin behavior * test: add unit tests for server auth method optimization - Add tests for SHA256 token calculation (10 tests) - Add tests for auth method selection logic (7 tests) - Add tests for HandshakeResponse type validation (8 tests) Tests verify: - Correct SHA256 token generation for caching_sha2_password - Auth method selection based on server capabilities and SSL - Type validation for authToken and authPluginName - Backward compatibility with legacy behavior - Edge cases (empty password, unicode, special characters) All tests pass (25/25) using poku test framework. * fix(tests): replace 'as any' with 'as unknown as' to satisfy no-explicit-any rule * refactor: reuse calculateToken from caching_sha2_password plugin Replace duplicate SHA256 token calculation in ClientHandshake with a call to the existing calculateToken function from the plugin. Benefits: - Eliminates code duplication (removed 17 lines) - Single source of truth for SHA256 token algorithm - Ensures consistency with plugin implementation - Reduces maintenance burden and drift risk The calculateToken function is now exported from caching_sha2_password.js for reuse during initial handshake optimization. All tests pass (25/25 unit tests). * fix: prevent prototype pollution in auth plugin lookup Address security concern raised by @wellwelwel: Use Object.create(null) for standardAuthPlugins to prevent server-controlled pluginName values (e.g., "toString", "__proto__", "constructor") from resolving to prototype properties. Implementation: - standardAuthPlugins now has null prototype (no inherited properties) - Custom plugins checked with hasOwnProperty for safety - Direct access to standardAuthPlugins is safe (no prototype chain) Security improvement: - Prevents potential prototype pollution attacks - Server cannot trick client into treating prototype methods as auth plugins - Cleaner than adding hasOwnProperty checks everywhere Added comprehensive security tests (5 tests, all passing) to verify: - standardAuthPlugins has null prototype - Prototype properties don't resolve as plugins - Valid plugins still work correctly - Custom plugins are prioritized properly Credit: @wellwelwel for the elegant solution suggestion --------- Co-authored-by: Weslley Araújo <46850407+wellwelwel@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for b57c671 - Browse repository at this point
Copy the full SHA b57c671View commit details -
Configuration menu - View commit details
-
Copy full SHA for 519c8e7 - Browse repository at this point
Copy the full SHA 519c8e7View commit details
Commits on Mar 5, 2026
-
Configuration menu - View commit details
-
Copy full SHA for b3af0d7 - Browse repository at this point
Copy the full SHA b3af0d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b59041 - Browse repository at this point
Copy the full SHA 0b59041View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ccc643 - Browse repository at this point
Copy the full SHA 6ccc643View commit details -
chore(master): release 3.19.0 (#4139)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for bb74a52 - Browse repository at this point
Copy the full SHA bb74a52View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v3.18.2...v3.19.0