node-mysql2 icon indicating copy to clipboard operation
node-mysql2 copied to clipboard

Add support for utf8mb3

Open danielbeardsley opened this issue 1 year ago • 9 comments

Yes, it's an old encoding that mysql is phasing out. However, some DBs out there still use it and this library shouldn't crash in unexpected ways. Some servers (like ours) have some default connection settings that are still set to utf8mb3 even though all our columns / tables are in utf8mb4.

Ironically, if you run a query that has no results (REPLACE, DELETE, ...) then the metadata in the empty resultset is set to the server's default charset. If that happens to be utf8mb3, this library crashes.

Closes #1398

Co-Author @davidrans

danielbeardsley avatar Sep 03 '24 22:09 danielbeardsley