npm mysql2 3.25.0
v3.25.0

one hour ago

3.25.0 (2026-11-29)

Features

  • always escape for the NO_BACKSLASH_ESCAPES SQL mode with the noBackslashEscapes option (#4718) (782afb9)
  • expand an object marked in placeholders (#4669) (f0feca2)
  • read named placeholders with SQL Escaper, following the SQL mode (#4719) (78884e2)
  • reject excess prepared-statement bind parameters (#4591) (9906f1e), closes #4589
  • require the columns expand() may expand (#4720) (539ac50)
  • ssl: forward ecdhCurve, sigalgs, secureOptions, pfx and crl to the secure context (#4711) (d96287a), closes #2394

Bug Fixes

  • bind a plain Uint8Array parameter as BLOB (#4676) (3df8fc4)
  • bind typed array and DataView parameters as the bytes they view (#4679) (8b62839)
  • config: check own properties in getSSLProfile and getCharsetNumber (#4694) (727c412)
  • consume the response after a LOCAL INFILE failure (#4661) (a7839ff)
  • decode MariaDB JSON in binary columns as UTF-8 (#4663) (25c88d2)
  • encode JSON objects with shadowed constructors (#4688) (da0f872)
  • escape values for the session's NO_BACKSLASH_ESCAPES SQL mode (#4684) (ef0dfa4)
  • honor per-query decimalNumbers and jsonStrings (#4675) (a1234e6)
  • keep a date or time's fraction digits under execute (#4677) (51bc44d)
  • keep manually prepared statements out of the execute() cache (#4715) (9635b34)
  • map hp8 to hproman8 and reject charsets without a matching encoder (#4704) (ef31454)
  • only announce client capabilities that the server supports (#4626) (f4f9714)
  • packets: trim server TIME fractions in linear time (#4716) (190870a)
  • parse 16 and 17 digit floats like parseFloat (#4687) (bd144d5)
  • parse the flags option without a backtracking regular expression (#4714) (ca2deb9)
  • pool-cluster: report query formatting errors instead of crashing (#4717) (12c933e)
  • reject bind parameters that have no encoding (#4690) (8e9cf2e)
  • release a LOCAL INFILE stream when its load ends (#4685) (f11f669)
  • resolve the connection typeCast before the parser cache key (#4681) (4cc59ff)
  • typeCast false under execute, a throwing typeCast, and static parser parity (#4683) (b39481f)

Performance Improvements

  • build date and time strings without arrays (#4682) (f2bdc77)
  • grow the prepared statement cache on demand (#4710) (186505d), closes #4708
  • skip Long for safe BIGINT strings and reuse binary typeCast fields (#4678) (caf5c5b)

Don't miss a new mysql2 release

NewReleases is sending notifications on new releases.