v1.9.2
v1.9.2 is a re-release of v1.9.1 due to a release process issue; no changes were made to the content.
Full Changelog: https://github.com/go-sql-driver/mysql/compare/v1.9.1...v1.9.2
v1.9.1
- add Charset() option by @methane in https://github.com/go-sql-driver/mysql/pull/1679
- Fix FormatDSN missing ConnectionAttributes by @bogcon in https://github.com/go-sql-driver/mysql/pull/1619
- go.mod: fix go version format by @methane in https://github.com/go-sql-driver/mysql/pull/1682
- release v1.9.1 by @methane in https://github.com/go-sql-driver/mysql/pull/1683
- @bogcon made their first contribution in https://github.com/go-sql-driver/mysql/pull/1619
Full Changelog: https://github.com/go-sql-driver/mysql/compare/v1.9.0...v1.9.1
v1.9.0
- Implement zlib compression. (#1487)
- Supported Go version is updated to Go 1.21+. (#1639)
- Add support for VECTOR type introduced in MySQL 9.0. (#1609)
- Config object can have custom dial function. (#1527)
- Fix auth errors when username/password are too long. (#1625)
- Check if MySQL supports CLIENT_CONNECT_ATTRS before sending client attributes. (#1640)
- Fix auth switch request handling. (#1666)
- Add "filename:line" prefix to log in go-mysql. Custom loggers now show it. (#1589)
- Improve error handling. It reduces the "busy buffer" errors. (#1595, #1601, #1641)
- Use
strconv.Atoi
to parse max_allowed_packet. (#1661) rejectReadOnly
option now handles ER_READ_ONLY_MODE (1290) error too. (#1660)
Full Changelog: https://github.com/go-sql-driver/mysql/compare/v1.8.1...v1.9.0
- @dbussink made their first contribution in https://github.com/go-sql-driver/mysql/pull/1609
- @yokonao made their first contribution in https://github.com/go-sql-driver/mysql/pull/1615
- @pengbanban made their first contribution in https://github.com/go-sql-driver/mysql/pull/1620
- @aaronjheng made their first contribution in https://github.com/go-sql-driver/mysql/pull/1527
- @kratkyzobak made their first contribution in https://github.com/go-sql-driver/mysql/pull/1625
- @raffertyyu made their first contribution in https://github.com/go-sql-driver/mysql/pull/1640
- @minhquang4334 made their first contribution in https://github.com/go-sql-driver/mysql/pull/1647
- @joe-mann made their first contribution in https://github.com/go-sql-driver/mysql/pull/1487
- @arturmelanchyk made their first contribution in https://github.com/go-sql-driver/mysql/pull/1653
- @kolbe made their first contribution in https://github.com/go-sql-driver/mysql/pull/1660
- @bdollma-te made their first contribution in https://github.com/go-sql-driver/mysql/pull/1667
v1.8.1
Bugfixes:
Full Changelog: https://github.com/go-sql-driver/mysql/compare/v1.8.0...v1.8.1
v1.8.0
-
Use
SET NAMES charset COLLATE collation
. by @methane in https://github.com/go-sql-driver/mysql/pull/1437- Older go-mysql-driver used
collation_id
in the handshake packet. But it caused collation mismatch in some situation. - If you don't specify charset nor collation, go-mysql-driver sends
SET NAMES utf8mb4
for new connection. This uses server's default collation for utf8mb4. - If you specify charset, go-mysql-driver sends
SET NAMES <charset>
. This uses the server's default collation for<charset>
. - If you specify collation and/or charset, go-mysql-driver sends
SET NAMES charset COLLATE collation
.
- Older go-mysql-driver used
-
PathEscape dbname in DSN. by @methane in https://github.com/go-sql-driver/mysql/pull/1432
- This is backward incompatible in rare case. Check your DSN.
-
Drop Go 1.13-17 support by @methane in https://github.com/go-sql-driver/mysql/pull/1420
- Use Go 1.18+
-
Parse numbers on text protocol too by @methane in https://github.com/go-sql-driver/mysql/pull/1452
- When text protocol is used, go-mysql-driver passed bare
[]byte
to database/sql for avoid unnecessary allocation and conversion. - If user specified
*any
toScan()
, database/sql passed the[]byte
into the target variabe. - This confused users because most user doesn't know when text/binary protocol used.
- go-mysql-driver 1.8 converts integer/float values into int64/double even in text protocol. This doesn't increase allocation compared to
[]byte
and conversion cost is negilible.
- When text protocol is used, go-mysql-driver passed bare
-
New options start using the Functional Option Pattern to avoid increasing technical debt in the Config object. Future version may introduce Functional Option for existing options, but not for now.
- Make TimeTruncate functional option by @methane in https://github.com/go-sql-driver/mysql/pull/1552
- Add BeforeConnect callback to configuration object by @ItalyPaleAle in https://github.com/go-sql-driver/mysql/pull/1469
-
Adding DeregisterDialContext to prevent memory leaks with dialers we don't need anymore by @jypelle in https://github.com/go-sql-driver/mysql/pull/1422
-
Make logger configurable per connection by @frozenbonito in https://github.com/go-sql-driver/mysql/pull/1408
-
Fix ColumnType.DatabaseTypeName for mediumint unsigned by @evanelias in https://github.com/go-sql-driver/mysql/pull/1428
-
Add connection attributes by @Daemonxiao in https://github.com/go-sql-driver/mysql/pull/1389
-
Stop
ColumnTypeScanType()
from returningsql.RawBytes
by @methane in https://github.com/go-sql-driver/mysql/pull/1424 -
Exec() now provides access to status of multiple statements. by @mherr-google in https://github.com/go-sql-driver/mysql/pull/1309
-
Allow to change (or disable) the default driver name for registration by @dolmen in https://github.com/go-sql-driver/mysql/pull/1499
-
Add default connection attribute '_server_host' by @oblitorum in https://github.com/go-sql-driver/mysql/pull/1506
-
QueryUnescape DSN ConnectionAttribute value by @zhangyangyu in https://github.com/go-sql-driver/mysql/pull/1470
-
Add client_ed25519 authentication by @Gusted in https://github.com/go-sql-driver/mysql/pull/1518
-
Reduced allocation on connection.go by @EPuncker in https://github.com/go-sql-driver/mysql/pull/1421
-
Avoid panic in TestRowsColumnTypes by @wayyoungboy in https://github.com/go-sql-driver/mysql/pull/1426
-
Add benchmark to receive massive rows. by @methane in https://github.com/go-sql-driver/mysql/pull/1415
-
README: Update multistatement by @methane in https://github.com/go-sql-driver/mysql/pull/1431
-
all: replace ioutil pkg to new package by @uji in https://github.com/go-sql-driver/mysql/pull/1438
-
chore: code optimization by @testwill in https://github.com/go-sql-driver/mysql/pull/1439
-
Reduce map lookup in ColumnTypeDatabaseTypeName. by @methane in https://github.com/go-sql-driver/mysql/pull/1436
-
doc: add link to NewConnector from FormatDSN by @dolmen in https://github.com/go-sql-driver/mysql/pull/1442
-
Add fuzz test for ParseDSN / FormatDSN roundtrip by @dolmen in https://github.com/go-sql-driver/mysql/pull/1444
-
TestDSNReformat: add more roundtrip checks by @dolmen in https://github.com/go-sql-driver/mysql/pull/1443
-
tcp: handle errors returned by SetKeepAlive by @achille-roussel in https://github.com/go-sql-driver/mysql/pull/1448
-
use staticcheck by @methane in https://github.com/go-sql-driver/mysql/pull/1449
-
Add Daemonxiao to AUTHORS by @Daemonxiao in https://github.com/go-sql-driver/mysql/pull/1459
-
Update link about
LOAD DATA LOCAL
in README.md by @i7a7467 in https://github.com/go-sql-driver/mysql/pull/1468 -
Update README.md by @Netzer7 in https://github.com/go-sql-driver/mysql/pull/1464
-
add Go 1.21 and MySQL 8.1 to the build matrix by @shogo82148 in https://github.com/go-sql-driver/mysql/pull/1472
-
Improve DSN docstsrings by @golddranks in https://github.com/go-sql-driver/mysql/pull/1475
-
Fix #1478 remove length check by @ShenFeng312 in https://github.com/go-sql-driver/mysql/pull/1481
-
README: fix markup error by @methane in https://github.com/go-sql-driver/mysql/pull/1480
-
Close connection on ErrPktSync and ErrPktSyncMul by @owbone in https://github.com/go-sql-driver/mysql/pull/1473
-
Spelling, grammar, and link fixes by @scop in https://github.com/go-sql-driver/mysql/pull/1485
-
Make use of strings.Cut by @scop in https://github.com/go-sql-driver/mysql/pull/1486
-
move stale connection check to ResetSession() by @methane in https://github.com/go-sql-driver/mysql/pull/1496
-
fix race condition of TestConcurrent by @shogo82148 in https://github.com/go-sql-driver/mysql/pull/1490
-
mark fail, mustExec and mustQuery as test helpers by @shogo82148 in https://github.com/go-sql-driver/mysql/pull/1488
-
Remove obsolete fuzz.go #1445 by @dolmen in https://github.com/go-sql-driver/mysql/pull/1498
-
testing: expose testing.TB in DBTest instead of full *testing.T by @dolmen in https://github.com/go-sql-driver/mysql/pull/1500
-
symbol removed from installation command by @panvalkar1994 in https://github.com/go-sql-driver/mysql/pull/1510
-
fix issue 1361 by @keeplearning20221 in https://github.com/go-sql-driver/mysql/pull/1462
-
fix fragile test by @methane in https://github.com/go-sql-driver/mysql/pull/1522
-
Fix sql.RawBytes corruption issue by @shogo82148 in https://github.com/go-sql-driver/mysql/pull/1523
-
fix for enum and set field type to column type identifying by @jennifersp in https://github.com/go-sql-driver/mysql/pull/1520
-
Parallelize test by @shogo82148 in https://github.com/go-sql-driver/mysql/pull/1525
-
Fix unsigned int overflow by @shiyuhang0 in https://github.com/go-sql-driver/mysql/pull/1530
-
Introduce
timeTruncate
parameter fortime.Time
arguments by @PauliusLozys in https://github.com/go-sql-driver/mysql/pull/1541 -
add TiDB support in README.md by @crazycs520 in https://github.com/go-sql-driver/mysql/pull/1333
-
Update workflows by @methane in https://github.com/go-sql-driver/mysql/pull/1547
- @EPuncker made their first contribution in https://github.com/go-sql-driver/mysql/pull/1421
- @jypelle made their first contribution in https://github.com/go-sql-driver/mysql/pull/1422
- @frozenbonito made their first contribution in https://github.com/go-sql-driver/mysql/pull/1408
- @wayyoungboy made their first contribution in https://github.com/go-sql-driver/mysql/pull/1426
- @evanelias made their first contribution in https://github.com/go-sql-driver/mysql/pull/1428
- @Daemonxiao made their first contribution in https://github.com/go-sql-driver/mysql/pull/1389
- @uji made their first contribution in https://github.com/go-sql-driver/mysql/pull/1438
- @testwill made their first contribution in https://github.com/go-sql-driver/mysql/pull/1439
- @i7a7467 made their first contribution in https://github.com/go-sql-driver/mysql/pull/1468
- @Netzer7 made their first contribution in https://github.com/go-sql-driver/mysql/pull/1464
- @golddranks made their first contribution in https://github.com/go-sql-driver/mysql/pull/1475
- @ShenFeng312 made their first contribution in https://github.com/go-sql-driver/mysql/pull/1481
- @owbone made their first contribution in https://github.com/go-sql-driver/mysql/pull/1473
- @scop made their first contribution in https://github.com/go-sql-driver/mysql/pull/1485
- @panvalkar1994 made their first contribution in https://github.com/go-sql-driver/mysql/pull/1510
- @zhangyangyu made their first contribution in https://github.com/go-sql-driver/mysql/pull/1470
- @keeplearning20221 made their first contribution in https://github.com/go-sql-driver/mysql/pull/1462
- @oblitorum made their first contribution in https://github.com/go-sql-driver/mysql/pull/1506
- @Gusted made their first contribution in https://github.com/go-sql-driver/mysql/pull/1518
- @jennifersp made their first contribution in https://github.com/go-sql-driver/mysql/pull/1520
- @shiyuhang0 made their first contribution in https://github.com/go-sql-driver/mysql/pull/1530
- @PauliusLozys made their first contribution in https://github.com/go-sql-driver/mysql/pull/1541
- @crazycs520 made their first contribution in https://github.com/go-sql-driver/mysql/pull/1333
- @ItalyPaleAle made their first contribution in https://github.com/go-sql-driver/mysql/pull/1469
Full Changelog: https://github.com/go-sql-driver/mysql/compare/v1.7.1...v1.8.0
v1.7.1
What's Changed
- bump actions/checkout@v3 and actions/setup-go@v3 by @shogo82148 in https://github.com/go-sql-driver/mysql/pull/1375
- Use SET syntax as specified in the MySQL documentation by @beautifulentropy in https://github.com/go-sql-driver/mysql/pull/1402
- Add go1.20 and mariadb10.11 to the testing matrix by @pgporada in https://github.com/go-sql-driver/mysql/pull/1403
- Increase default maxAllowedPacket size. by @methane in https://github.com/go-sql-driver/mysql/pull/1411
- Correct maxAllowedPacket default value mentioned in docs to match the… by @sjmudd in https://github.com/go-sql-driver/mysql/pull/1412
- fix some comments by @cuishuang in https://github.com/go-sql-driver/mysql/pull/1417
- Update changelog for version 1.7.1 by @methane in https://github.com/go-sql-driver/mysql/pull/1418
New Contributors
- @beautifulentropy made their first contribution in https://github.com/go-sql-driver/mysql/pull/1402
- @pgporada made their first contribution in https://github.com/go-sql-driver/mysql/pull/1403
Full Changelog: https://github.com/go-sql-driver/mysql/compare/v1.7.0...v1.7.1
Version 1.7
Changes:
- Drop support of Go 1.12 (#1211)
- Refactoring
(*textRows).readRow
in a more clear way (#1230) - util: Reduce boundary check in escape functions. (#1316)
- enhancement for mysqlConn handleAuthResult (#1250)
New Features:
- support Is comparison on MySQLError (#1210)
- return unsigned in database type name when necessary (#1238)
- Add API to express like a --ssl-mode=PREFERRED MySQL client (#1370)
- Add SQLState to MySQLError (#1321)
Bugfixes:
- Fix parsing 0 year. (#1257)
Version 1.6.0
Major Release
- Migrate the CI service from travis-ci to GitHub Actions (#1176, #1183, #1190)
NullTime
is deprecated (#960, #1144)- Reduce allocations when building SET command (#1111)
- Performance improvement for time formatting (#1118)
- Performance improvement for time parsing (#1098, #1113)
See CHANGELOG.md for full details
Version 1.5.0
Major Release
- Added Go Module support
- Dropped support for Go 1.9 and lower
- Implemented
Connector
interface - Improved buffering
- Added connection liveness check
- Improved marking of bad connnections
- Updated collations and made
utf8mb4
default - Made
mysql.NullTime
compatible withsql.NullTime
- Removed support for CloudSQL via
appengine/cloudsql
See CHANGELOG.md for full details
Version 1.4.1
Bugfix release
- Several fixes of the authentication handling
- Fix TIME format for binary columns
- Fix canceled context broke
mysqlConn
See CHANGELOG.md for full details